Guardian C Library Calls Reference Manual

stclen (supplementary)
3-182 128833Guardian TNS C Library Calls Reference Manual
Reference to Library Calls
stclen (supplementary)
The stclen function computes the length of a string. See “strlen” on page 3-201 for an
equivalent ISO C Standard function.
str_ptr
points to the string to measure.
Return Value
is the number of characters in *str_ptr, except for the terminating null character.
stcpm (supplementary)
The stcpm function scans a string to find the first occurrence of a substring that matches
a specified pattern.
str_ptr
points to the string to scan.
pat_ptr
points to the pattern string. The pattern is specified with regular expression
notations:
match_ptr
points to the matched string (if found).
Return Value
is the length of the matching substring, if found; otherwise, stcpm returns the value -
1 and sets *match_ptr to the pointer value NULL.
#include <stringh>
size_t stclen(char *str_ptr);
#include <stringh>
int stcpm(char *str_ptr, char *pat_ptr, char **match_ptr);
? matches any single character
chr* matches zero or more occurrences of chr
chr+ matches one or more occurrences of chr
chr matches chr