Extract characters from the string, starting with the first character, that are in the set of characters identified by lpszCharSet.
string SpanIncluding( LPCSTR lpszCharSet )
- [input] A string interpreted as a set of characters.
A substring that contains characters in the string that are in lpszCharSet, beginning with the first character in the string and ending when a character is found in the string that is not in lpszCharSet. SpanIncluding returns an empty substring if the first character in the string is not in the specified set.
string str1("1,2,3 abc");
printf("the string left is \"%s\"\n", str2);
//Should print"1,2,3" since these charactors are also included in "0123456789,"
printf("the string left is \"%s\"\n", str3);
//Should print"" since there is no charactor which is also in "0123456789,"
This member function extracts characters from the string, starting with the first character, that are in the set of characters identified by lpszCharSet. If the first character of the string is not in the character set, then SpanIncluding returns an empty string. Otherwise, it returns a sequence of consecutive characters which are in the set.
header to Include