_mbsspnp
Remonter à string.h - Index
Header File
mbstring.h
Category
Memory and String Manipulation Routines
Prototype
unsigned char *_mbsspnp(const unsigned char *s1, const unsigned char *s2);
Description
Each of these functions search for the first character in s1 that is not contained in s2.
Use the portable macro, _tcsspnp, defined in tchar.h, to access these functions.
Return Value
The functions return a pointer to the first character in s1 that is not found in the character set for s2.
If every character from s1 is found in s2, each of the functions return NULL.
Example
#include <stdio.h> #include <string.h> #include <alloc.h> int main(void) { char *string1 = "1234567890"; char *string2 = "123DC8"; int length; length = strspn(string1, string2); printf("Character where strings differ is at position %d\n", length); return 0; }