Returns all characters from string, from the beginning to a character from the set of characters. The search is case-sensitive.
SpanExcluding(string, set)
| Parameter |
Description |
|---|---|
| string |
A string |
| set |
String that contains one or more characters 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 to 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>