Name
FindOneOf
Synopsis
FindOneOf(set, string
[,startpos
])
Returns the position of the first occurrence of any character from
set
in string
.
If no characters from set
are found,
FindOneOf( )
returns 0. An optional starting
position for the search can be specified by the
startpos
parameter. FindOneOf( )
performs a case-sensitive search. Example:
<CFSET MyString="This is a case-sensitive example of using the FindOneOf function to find a character from a set of charcters within a string."> <CFSET MySet="zFx"> <CFOUTPUT> <B>String:</B> #MyString#<BR> <B>Set:</B> #MySet# <P>The first occurrence of any character from the set <B>#MySet#</B> is at position #FindOneOf(MySet, MyString)#. </CFOUTPUT>
Get Programming ColdFusion now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.