Whatever message this page gives is out now! Go check it out!

FindOneOf

Last update:
May 18, 2026

Description

Finds the first occurrence of any one of a set of characters in a string, from a specified start position. The search is case sensitive.

Returns

The position of the first member of set found in string; or 0, if no member of set is found in string.

Category

Function syntax

FindOneOf(set, string [, start ])

See also

Parameters

Parameter
Description
set
A string or a variable that contains one. String that contains one or more characters to search for.
string
A string or a variable that contains one. String in which to search.
start
Start position of search.

Example

<cfscript>
    stringToSearch = "The quick brown fox jumped over the lazy dog."
    writeOutput(findoneof("aeiou",stringToSearch) & "<br/>")
    writeOutput(findoneof("aeiou",stringToSearch,4) & "<br/>")
    writeOutput(findoneof("@%^*()",stringToSearch))
</cfscript>
Output
3

6

0

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page