SourcePoint AMD Help

Table of Contents

strncat

Append the specified number of characters from one string to another.

Syntax

strncat(string-expr1, string-expr2, expr)

Where:

string-expr1

specifies an nstring variable.

string-expr2

specifies an nstring variable or a string constant.

expr

specifies a number or an expression of type int4 that specifies the maximum number of characters to concatenate.

Discussion

The strncat command appends the specified number of characters (expr) from the second string (string-expr2) to the end of the first string (string-expr1). Copying of the second string continues until a null terminating character is copied or the specified number of character have been copied. The string-expr2 is left unchanged.

Example

Command input:

define nstring a = "10.86"
define nstring b = "22."
strncat(b, a, 2)
b

Result:

"22.10"

Related Topics: