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.

Syntax

Clib.strncpy(destString, sourceString, maxLen)

Parameter
Description

destString

The string to which characters are to be added

sourceString

The string from which characters are to be read

maxLen

The maximum number of characters to add

Returns

The ASCII code of the first character of destString.

Usage

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