Gets characters from a string_,_ from the beginning and stops when it encounters any character that is not in a specified set of characters. The search is case sensitive. For example, SpanIncluding("mystring", "mystery") returns "mystr". Because, in the string "mystring", after "mystr", the character 'i' (which is not present in the second string "mystery") is encountered.
A string; characters from string, from the beginning to a character that is not in set.
SpanIncluding(string, set) |
GetToken, SpanExcluding; Caching parts of ColdFusion pages in Optimizing ColdFusion applications in the Developing ColdFusion Applications
Parameter |
Description |
|---|---|
string |
A string or a variable that contains the search string. |
set |
A string or a variable that contains a set of characters. Must contain one or more characters. |
<cfscript>
string="Highway star"
strToset="High"
writeOutput(SpanIncluding(string,strToset)) // High
</cfscript>
Sign in to your account