• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

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>


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint