Closed roxas232 closed 4 years ago
This example shows why the previous test values were off by one:
#include <iostream> #include <string.h> using namespace std; int main() { auto len = strspn("abcdefg", "abc"); cout<< len << endl; // 3 len = strspn("abcdefg", "abcdefg"); cout<< len; // 7 return 0; }
This example shows why the previous test values were off by one: