Strings.firstOccurs_13kaya
Return the position of the first occurence of a substring
Usage
Int firstOccurs( String needle, String haystack )
Arguments
needle The string to check for
haystack The string to check
Overview
Returns the position of the first occurence of the needle substring in the haystack string (or the length of the string if the substring is not in the string).
-
str = "abcdefgabcde";
i = firstOccurs("ab",str); // i = 0
i = firstOccurs("de",str); // i = 3
i = firstOccurs("efa",str); // i = 12
Releases
4 releases since Debian 5.0 (Lenny); the text changed 3 times.