chen-w
8/27/2017 - 10:45 PM

string index of

string index of

int indexOf(int ch): It returns the index of the first occurrence of character ch in a String.
int indexOf(int ch, int fromIndex): It returns the index of first occurrence if character ch, starting from the specified index “fromIndex”.
int indexOf(String str): Returns the index of string str in a particular String.
int indexOf(String str, int fromIndex): Returns the index of string str, starting from the specified index “fromIndex”.