size_t wcscspn(const wchar_t* kwpString, const wchar_t* kwpCharSet);
#include <cwchar> int main() { wchar_t waString[] = L"XoaX.net"; wchar_t waCharSet[] = L"trn"; // Search a string for a character in a character set int iLocation = wcscspn(waString, waCharSet); wprintf(L"Searching \"%ws\" for characters in \"%ws\"\n", waString, waCharSet); wprintf(L"Found \"%wc\" at index %d\n", waString[iLocation], iLocation); // Keep the window open until "Enter" is pressed getwchar(); return 0; }
© 20072024 XoaX.net LLC. All rights reserved.