SpanIncluding

Description

Returns all characters from string, from the beginning to a character that is not in the set of characters. The search is case-sensitive.

Category

String functions

Syntax

SpanIncluding(string, set) 

See also

GetToken, SpanExcluding

Parameters

Parameter
Description
string
A string
set
String that contains one or more characters sought

Example

<!--- Displays SpanIncluding --->
<html>
<head>
<title>SpanIncluding Example</title>
</head>

<body bgcolor = silver>
<H3>SpanIncluding 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, until the characters in the set have been found, is:
<cfoutput>#SpanIncluding(FORM.myString, FORM.mySet)#</cfoutput>
</cfif>

<P>Returns all characters of a string, from beginning until all
characters from the set have been found. The search is case-sensitive.

<form action = "spanincluding.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,H">
<BR><input type = "Submit" name = "">
</FORM>

</body>
</html>