Find()

Finds the first occurrence of a substring in a string, from a specified start position.

The search is case-sensitive.

Find( substring=string, string=string, start=number );

Returns: Number

Argument Description Default
substring
string, required

String for which to search.

string
string, required

String in which to search.

start
number, optional

Start position of search.

1

Examples

writeOutput(find("tree","Grow the tree, Save the world"));//10
<span class="c">//Member function</span>
<span class="nv">str</span><span class="o">=</span><span class="s2">&quot;I love lucee&quot;</span><span class="p">;</span>
<span class="nf">writeOutput</span><span class="p">(</span><span class="nf">str.find</span><span class="p">(</span><span class="s1">&#39;lucee&#39;</span><span class="p">));</span><span class="c">//8</span>

See also