CRE Programmer's Guide
String and Memory Block Functions
Common Run-Time Environment (CRE) Programmer’s Guide—528146-004
8-14
Stpsym
Return Value
The Stpblk functions return the address of the first non-white-space character in str.
Considerations
The end of str is defined by the location of a zero (null) byte.
Example
STRING .s[0:17] := [" Skip Spaces",0];
STRING .start;
!@start gets @s[2]
@start := RTL_Stpblk_(s);
Stpsym
The Stpsym functions copy a symbol from one string to another string. A symbol
consists of an alphabetic character followed by zero or more alphanumeric characters.
These functions are not available in the native CRE library.
source
is a pointer to the string to scan.
sym
is a pointer, on return, to the symbol.
symlen
specifies the number of bytes allocated in sym for the symbol.
Return Value
The Stpsym functions return the address of the next character in str after the symbol.
If a symbol is not found, the address of the start of
str, @str is returned.
INT PROC RTL_Stpsym_( source, sym, symlen );
STRING .source; ! in
STRING .sym; ! out
INT symlen; ! in TNS only
INT(32) PROC RTL_StpsymX_( source, sym, symlen );
STRING .EXT source; ! in
STRING .EXT sym; ! out
INT symlen; ! in TNS only