2
0

wcscspn.c 334 B

12345678910111213141516
  1. #include <assert.h>
  2. #include <wchar.h>
  3. int main(void) {
  4. assert(wcscspn(L"", L"") == 0);
  5. assert(wcscspn(L"", L"h") == 0);
  6. assert(wcscspn(L"a", L"a") == 0);
  7. assert(wcscspn(L"ba", L"ab") == 0);
  8. assert(wcscspn(L"ba", L"a") == 1);
  9. assert(wcscspn(L"abcdefghijkl$\"£$%", L"zxqrst,./$w") == 12);
  10. return 0;
  11. }