Siebel eScript Language Reference > Siebel eScript Commands > The Clib Object String Methods >

Clib.strncpy() Method

This method copies a specified number of characters from one string to another.


Clib.strncpy(destString, sourceString, maxLen)



The string to which characters are to be added


The string from which characters are to be read


The maximum number of characters to add


The ASCII code of the first character of destString.


This method copies characters from sourceString to destString. The number of characters copied is the lesser of maxLen and the length of sourceString. If MaxLen is greater than the length of sourceString, the remainder of destString is filled with null bytes. A null byte is appended to destString if MaxLen bytes are copied. If destString is not already defined, the function defines it. It is safe to copy from one part of a string to another part of the same string.

See Also

Clib.strncat() Method

Siebel eScript Language Reference