Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java indexof all occurrences

int index = word.indexOf(guess);
while (index >= 0) {
    System.out.println(index);
    index = word.indexOf(guess, index + 1);
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #indexof #occurrences
ADD COMMENT
Topic
Name
5+6 =