Find

Description

Finds the first occurrence of a substring in a string, from a specified start position. The search is case sensitive.

Returns

A number; the position of substring in string; or 0, if substring is not in string.

Category

String functions

Function syntax

Find(substring, string [, start ])

See also

FindNoCaseCompareFindOneOfREFindReplace

Parameters

Parameter

Description

substring

The string that you are searching for.

string

The string in which to search for the substring.

start

The position to start searching in the string (starts at 1).

Example

<cfoutput> 
    <cfset stringToSearch = "The quick brown fox jumped over the lazy dog."> 
    #find("the",stringToSearch)#<br> 
    #find("the",stringToSearch,35)#<br> 
    #find("no such substring",stringToSearch)#<br> 
</cfoutput>

 Adobe

Daha hızlı ve daha kolay yardım alın

Yeni kullanıcı mısınız?

Adobe MAX 2024

Adobe MAX
Yaratıcılık Konferansı

14–16 Ekim Miami Beach ve çevrimiçi

Adobe MAX

Yaratıcılık Konferansı

14–16 Ekim Miami Beach ve çevrimiçi

Adobe MAX 2024

Adobe MAX
Yaratıcılık Konferansı

14–16 Ekim Miami Beach ve çevrimiçi

Adobe MAX

Yaratıcılık Konferansı

14–16 Ekim Miami Beach ve çevrimiçi