CRE Programmer's Guide

String and Memory Block Functions
Common Run-Time Environment (CRE) Programmer’s Guide528146-004
8-17
Strchr
second
is a pointer to the string that is concatenated to the first string.
Return Value
The Strcat functions return the address of the resulting string, @first.
Considerations
Both first and second must be terminated by a zero (null) byte to stop the scan.
You must ensure that there are enough bytes at the end of first to accommodate
the bytes in
second.
The Strcat functions append a null byte to the result.
Example
STRING fir[0:100] := ["Front",0];
STRING .sec[0:100] := ["Back",0];
STRING .temp;
! @temp gets @fir
! fir gets ["FrontBack",0]
@temp := RTL_Strcat_(fir, sec);
Strchr
The Strchr functions scan a string for the first occurrence of a specified character.
str
is a pointer to the string to scan.
char
is the character to search for. Only bits <8:15> of char are used for the search
character.
INT PROC RTL_Strchr_( str, char );
STRING .str; ! in
INT char; ! in TNS only
INT(32) PROC RTL_StrchrX_( str, char );
STRING .EXT str; ! in
INT char; ! in TNS only