string SpanIncluding (string string, string charset)
A substring that contains
characters in the string that are in charset, beginning with the first
character in the string and ending when a character is found in the
string that is not in charset. SpanIncluding returns an empty
substring if the first character in the string is not in the
string – source
charset – string interpreted as a set of characters.
Extracts characters from the string, starting with the first
character, that are in the set of characters identified by
The following example demonstrates the use of SpanIncluding.
string str = "cabbage"
string res = SpanIncluding(str, "abc")
if(res == "cabba")
res = SpanIncluding(str, "xyz")
if (res == "")