size_t strspn(const char* kcpString, const char* kcpChars);
#include <cstdio>
#include <cstring>
int main()
{
char caString[] = "XoaX.net";
char caChars[] = ".aXo";
// Find the first not of ".aXo" inside of "XoaX.net"
int iPos = strspn(caString, caChars);
printf("First not of %s found at %i\n", caChars, iPos);
printf("First not in %s is %c\n", caChars, caString[iPos]);
return 0;
}
© 20072024 XoaX.net LLC. All rights reserved.