Returns all characters from string from its beginning until it reaches a character from the set of characters. The search is case-sensitive.
See also GetToken and SpanIncluding.
SpanExcluding(string, set)
Any string.
String containing one or more characters being sought.
<!--- Displays SpanExcluding ---> <HTML> <HEAD> <TITLE> SpanExcluding Example </TITLE> </HEAD> <BODY BGCOLOR=silver> <H3>SpanExcluding Example</H3> <CFIF IsDefined("FORM.myString")> <P>Your string was <CFOUTPUT>#FORM.myString#</CFOUTPUT> <P>Your set of characters was <CFOUTPUT>#FORM.mySet#</CFOUTPUT> <P>Your string up until one of the characters in the set is: <CFOUTPUT>#SpanExcluding(FORM.myString, FORM.mySet)#</CFOUTPUT> </CFIF> <P>Returns all characters from string from beginning until it reaches a character from the set of characters. The search is case-sensitive. <FORM ACTION="spanexcluding.cfm" METHOD="POST"> <P>Enter a string: <BR><INPUT TYPE="Text" NAME="myString" VALUE="Hey, you!"> <P>And a set of characters: <BR><INPUT TYPE="Text" NAME="mySet" VALUE="Ey"> <BR><INPUT TYPE="Submit" NAME=""> </FORM> </BODY> </HTML>