CRE Programmer's Guide
String and Memory Block Functions
Common Run-Time Environment (CRE) Programmer’s Guide—528146-004
8-12
Stcu_D
pat
is a pointer to the pattern string. The pattern is specified using regular expression
notation:
Return Value
The Stcpma functions return the length of the matching substring, if found. If a
matching substring is not found, they returns -1.
Considerations
•
The ends of str and pat are defined by the location of a zero (null) byte.
•
You can use a backslash (\) as an escape character if you need to match a special
character.
Example
STRING .s[0:17] := ["FORTUNE 500",0];
STRING .pattern[0:4] := ["FO?T",0];
INT i;
i := RTL_Stcpma_(s, pattern); ! i gets 4
Stcu_D
The Stcu_D functions convert an unsigned integer to a string of decimal characters.
These functions are not available in the native CRE library.
str
is a pointer to the converted decimal string.
? matches any character.
s
*
matches zero or more occurrences of
s.
s+ matches one or more occurrences of s.
s matches s.
INT PROC RTL_Stcu_D_( str, integer, max_bytes );
STRING .str; ! out
INT integer; ! in
INT max_bytes; ! in TNS only
INT PROC RTL_Stcu_DX_( str, integer, max_bytes );
STRING .EXT str; ! out
INT integer; ! in
INT max_bytes; ! in TNS only