SourcePoint AMD Help

Table of Contents

strcpy

Copy one string into another.

Syntax

strcpy(string-expr1, string-expr2)

Where:

string-expr1

specifies an nstring variable.

string-expr2

specifies an nstring variable or a quoted string constant.

Discussion

The strcpy command copies the second string (string-expr2) into the first string (string-expr1) until the second string terminating null character is copied. This function overwrites any data in the first string. The second string remains unchanged.

Example

Command input:

define nstring month = "October"
define nstring year = "2010"
define nstring date
strcpy(date, month)
date

Result:

October

Command input:

strcpy(date, year)
date

Result:

2010

Related Topics: