Question: please explain your codes * Returns the length of the initial portion of str1 which consists only of characters that are part of str2. *
please explain your codes
* Returns the length of the initial portion of str1 which consists only of characters that are part of str2. * The search does not include the terminating null-characters of either strings, but ends there. * * Example, string Span("abcdefgh", "abXXcdeZZh"); // returns 5 * * ALLOWED: Pointer operators: *, & Binary integer operators: -, +, *, ==, !=, Unary integer operators: ! Shorthand operators based on the above: ex. >, ^, /, % Unary integer operators: ~, * * int stringSpan(char * stri, char * str2) { // Your code here return 2; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
