tumblr tracker

Find

Library Reference ›› String ››
Parent Previous Next

String.Find


Namespace: String


Returns the first position of param2 in param1 after position in param3.


retval = String.Find(SearchIn, Value, [StartPos])


Parameters:

- SearchIn; string constant or variable or function returning a string; the string to search in

- Value; string constant or variable or function returning a string; the string to search for in param1

- [StartPos]; numeric constant or variable or function returning numeric, optional; position to start the search from; if omitted default is 0


Returns:

Numeric value, the position of param2 within param1 after param3 or -1 if not found.


Example


$pos = String.Contains("This is a test string.", "test");


After execution the $pos variable will contain 10 as test is at the 10th position (starting from 0) within This is a test string.