stringPosition()

Synopsis

Returns the position in a string where a substring begins. If the substring is not found the function returns 0.

Syntax

stringPosition ( str As String, subString As String ) As Integer 
Argument Type Description
str String a string to search in.
subString String a substring of characters to look for.

Example 1

Intent >stringPosition("Three big dogs are chasing", "dog")
--> 11 

Example 2

Intent >stringPosition("Two small cats", "dog")
--> 0