Clib Append String Method
The Clib Append String method copies characters from one string to the end of another string. It appends up to the value that you specify in the maxLen argument of the string that you specify in the sourceString argument. It does not copy any character that occurs after a null byte. It returns the appended string that the destString argument contains.
The length of the destString argument is the lesser of the maxLen argument or the length of the sourceString argument.
Format
Clib.strncat(destString, sourceString, maxLen)
The following table describes the arguments for the Clib Append String method.
Argument | Description |
---|---|
sourceString |
The string that this method uses to get the characters that it adds. |
destString |
The string where this method adds characters. |
maxLen |
The maximum number of characters to add. |
Example
The following example uses the Clib Append String method:
var string1 = "I love to ";
var string2 = "ride hang-gliders and motor scooters.";
Clib.strncat(string1, string2, 17);
TheApplication().RaiseErrorText(string1);
This example returns the following string:
"I love to ride hang-gliders"
For more information, see Clib Copy String Method.