Method
public int LastIndexOf(string str)
|
public int LastIndexOf(FastString str)
|
public int LastIndexOf(string str, int startIndex)
|
public int LastIndexOf(FastString str, int startIndex)
|
public int LastIndexOf(char c)
|
public int LastIndexOf(char c, int startIndex)
|
Parameters
str
|
string
|
String to find
|
startIndex
|
int
|
Index to start searching at
|
c
|
char
|
Character to find
|
Returns
int
Index of the string, or -1 if not found
DescriptionReturn last index of given string. startIndex can be specified to start search from the given index. Example FastString fstr = new FastString(256);
void Update() { fstr.Set("retroblit is retro"); Debug.Log(fstr.LastIndexOf("retro")); Debug.Log(fstr.LastIndexOf("retro"), 8); Debug.Log(fstr.LastIndexOf("missing"), 1); } |
See AlsoFastString.IndexOf |