View comments | RSS feed
Contents > CFML Reference > ColdFusion Functions > SpanExcluding PreviousNext

SpanExcluding

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

A string; characters from string, from the beginning to a character that is in set.

String functions

SpanExcluding(string, set)

GetToken, SpanIncluding

Parameter

Description

string

A string or a variable that contains one

set

A string or a variable that contains one. Must contain one or more characters

<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"> <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>

Contents > CFML Reference > ColdFusion Functions > SpanExcluding PreviousNext

ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting

Version 6.1

Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.

Comments


Greg Hamer said on Jan 11, 2004 at 2:39 PM :
In example, should be <form METHOD=POST action = "spanexcluding.cfm">

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/functa85.htm