how to find index of elemnt in string code example
Example 1: character at index of string java
String str = "Grepper";
char ch = str.charAt(0);
//ch is assigned the value of G
Example 2: js indexof string
str.indexOf(searchValue[, fromIndex])
String str = "Grepper";
char ch = str.charAt(0);
//ch is assigned the value of G
str.indexOf(searchValue[, fromIndex])