| Summary |
#include <string.h>
int fstrcspn (
const char far *src, /* source string */
const char far *set); /* characters to find */
|
| Description | The fstrcspn function searches the src string for any of the characters in the set string. Note - This function uses far pointers to objects and may be used in any memory model other than Tiny Model.
|
| Return Value | The fstrcspn function returns the index of the first character located in src that matches a character in set. If the first character in src matches a character in set, a value of 0 is returned. If there are no matching characters in src, the length of the src is returned. |
| See Also | fstrcat, fstrchr, fstrcmp, fstrcpy, fstrlen, fstrncat, fstrncmp, fstrncpy, fstrpbrk, fstrpos, fstrrchr, fstrrpbrk, fstrrpos, fstrspn |
| Example |
#include <string.h>
#include <stdio.h> /* for printf */
void tst_strcspn (char far *buf) {
int i;
i = fstrcspn (buf, ".,");
if (buf [i] != '\0')
printf ("Found a %c.\n", (char) buf [i]);
}
|