C Run-Time Library Reference
strspn
length of segment of characters in both strings
Synopsis
#include <string.h>
size_t strspn(const char *s1, const char *s2);
Description
The
function returns the length of the initial segment of
strspn
consists entirely of characters in the string pointed to by
pointed to by
s2
ters in the string is not significant.
Error Conditions
The
function does not return an error condition.
strspn
Example
#include <string.h>
size_t len;
char *ptr1, *ptr2;
ptr1 = "TESTING";
ptr2 = "ERST";
len = strspn(ptr1, ptr2);
See Also
strcspn,
strlen
3-134
is treated as a set of characters. The order of the charac-
VisualDSP++ 3.5 C/C++ Compiler and Library Manual
/* len = 4 */
for ADSP-219x DSPs
which
s1
. The string
s2
Need help?
Do you have a question about the VISUALDSP++ 3.5 and is the answer not in the manual?