Guardian C Library Calls Reference Manual
stcpma (supplementary)
3-184 128833—Guardian TNS C Library Calls Reference Manual
Reference to Library Calls
stcpma (supplementary)
The stcpma function scans a string to determine whether it starts with 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:
Return Value
is the length of the matching substring, if found; otherwise, stcpma returns the
value -1.
Usage Guidelines
•
You can use the backslash (\) as an escape character to match one of the special
characters. For more information, refer to “stcpm (supplementary)” on page 3-182.
#include <stringh>
int stcpma(char *str_ptr, char *pat_ptr);
? matches any single character
chr* matches zero or more occurrences of chr
chr+ matches one or more occurrences of chr
chr matches chr