Strings.firstOccurs3kaya
Return the position of the first occurence of a character
Usage
Int firstOccurs( Char c, String str )
Arguments
c The character to check for
str The string to check
Overview
Returns the position of the first occurence of the character in the string (or the length of the string if the character is not in the string).
-
str = "abcdefgabcde";
i = firstOccurs('a',str); // i = 0
i = firstOccurs('d',str); // i = 3
i = firstOccurs('h',str); // i = 12
Releases
4 releases since Debian 5.0 (Lenny); the text changed 3 times.