Copy the contents of a char*-string into another, the contents of s2 will be copied into s1.

Copy the contents of a char*-string into another, the contents of s2 will be copied into s1.

Name Type Default Description
Return String or char*   Parameter s1
s1 String or char* - Target string
s2 String or char* - Original string
startPos int 0 First position to copy
len int -1 Number of bytes to cpoy

-1 : until the end of the string
Preconditions
If s1 is of type char* or char[] it must wide enough to get s2. The target string s1 does not have to be 0-terminated.
int main()
{
    char	*	s1 = alloc(256);
strcpy(s1, "con"); strcpy(s1, "cat");
// s1 = "cat" showmessage(s1);
release(s1);
return 0; }

Since
startPos and len since v3.2.3 R2600, 08.08.2011
Parameter s1 und s2 als String since v4.1 R21457, 10. Jan 2018

Available
priint:comet InDesign® Plug-Ins, comet_pdf, Illustrator

Alphabetic index HTML hierarchy of classes or Java