Guardian C Library Calls Reference Manual
Reference to Library Calls
Guardian TNS C Library Calls Reference Manual—128833 3-189
stpsym (supplementary)
stpsym (supplementary)
The stpsym function gets a symbol from a string and stores it in another specified string.
str_ptr
points to the string to scan.
dest_ptr
points to the string where stpsym stores the symbol.
dest_size
specifies the size in bytes of *dest_ptr.
Return Value
points to the next character in the string after the symbol. If stpsym does not find a
symbol, it returns the pointer str_ptr.
Usage Guidelines
•
A symbol consists of an alphabetic character followed by zero or more alphanumeric
characters.
•
The stpsym function does not skip leading space characters.
•
Note that if you want to retrieve a symbol of length n, you need to ensure that
*dest_ptr can accommodate at least n+1 elements, and that you pass n+1 as
dest_size. This extra element allows for the terminating null character.
#include <stringh>
char *stpsym(char *str_ptr, char *dest_ptr, int dest_size);