CRE Programmer's Guide
String and Memory Block Functions
Common Run-Time Environment (CRE) Programmer’s Guide—528146-004
8-16
Strcat
tokenlen
specifies the number of bytes allocated in token for the token. Tokens greater
than this length are truncated.
stop_chars
is a pointer to a string that consists of token separator characters; that is,
characters that are not part of the token.
Return Value
The Stptok functions return the address of the next character in str after the token
(the delimiter that stopped the scan).
Considerations
•
Both str and stop_chars must be terminated by a zero (null) byte to stop the
scan.
•
White space is not skipped at the beginning of str.
•
A null byte in token immediately following the token.
Example
STRING .s[0:17] := ["Token1, token2",0];
STRING .token[0:9];
STRING .tar[0:3] := [",-;",0];
STRING .next;
!@next gets @s[6]
!token gets ["Token1", 0]
@next := RTL_Stptok_(s, token, 10, tar);
Strcat
The Strcat functions concatenate two strings.
first
is a pointer to the string to which the second string is concatenated.
INT PROC RTL_Strcat_( first, second );
STRING .first; ! in/out
STRING .second; ! in TNS only
INT(32) PROC RTL_StrcatX_( first, second );
STRING .EXT first; ! in/out
STRING .EXT second; ! in TNS only