Search the string for the first occurrence of any character in the specified set lpszCharSet.
string SpanExcluding( LPCSTR lpszCharSet )
A substring that contains characters in the string that are not in lpszCharSet, starting with the first character in the string and up to but excluding the first character in the string that is found lpszCharSet. It returns the entire string if no character in lpszCharSet is found in the string.
string str1("Hello World! Goodbye!");
printf("the string left is \"%s\"\n", str2);
//Should print"Hello World" since the substring after'!' is excluded
string str3("Hello World Goodbye");
printf("the string left is \"%s\"\n", str4);
//Should print"Hello World Goodbye" since no specified characters (".!?") found in str2
This member function searches the string for the first occurrence of any character in the specified set lpszCharSet. SpanExcluding extracts and returns all characters preceding the first occurrence of a character from lpszCharSet(in other words, the character from lpszCharSet and all characters following it in the string, are not returned). If no character from lpszCharSet is found in the string, then SpanExcluding returns the entire string.