Description
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.
Returns
A string; characters from string, from the beginning to a character that is not in set.
Category
Function syntax
SpanIncluding(string, set) |
See also
GetToken, SpanExcluding; Caching parts of ColdFusion pages in Optimizing ColdFusion applications in the Developing ColdFusion Applications
Parameters
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. |
Example
<cfscript> string="Highway star" strToset="High" writeOutput(SpanIncluding(string,strToset)) // High </cfscript>