CRE Programmer's Guide
String and Memory Block Functions
Common Run-Time Environment (CRE) Programmer’s Guide—528146-004
8-20
Strcspn
Example
STRING .des[0:10];
STRING .src[0:100] := ["Example", 0];
CALL RTL_Strcpy_(des, src); ! des gets ["Example",0]
Strcspn
The Strcspn functions scan a string until they find a character that is found in another
string. These functions are not available in the native CRE library.
str
is a pointer to the string to scan.
Figure 8-1. Strings in Memory Before Copying Source to Destination
Figure 8-2. Strings in Memory After Copying Source to Destination
INT PROC RTL_Strcspn_( str, stop_chars );
STRING .str; ! in
STRING .stop_chars; ! in TNS only
INT(32) PROC RTL_StrcspnX_( str, stop_chars );
STRING .EXT str; ! in
STRING .EXT stop_chars; ! in TNS only
801VST .VSD
source
dest
ABCDEFGHI J KL
802VST .VSD
source
dest
ABCDABCDABCD