MCPcopy Index your code
hub / github.com/HtmlUnit/htmlunit / indexOf

Method indexOf

src/main/java/org/htmlunit/util/StringUtils.java:519–526  ·  view source on GitHub ↗

Returns the index within the specified string of the first occurrence of the specified search character. @param s the string to search @param searchChar the character to search for @param beginIndex the index at which to start the search @param endIndex the index at which to stop the search @return

(final String s, final char searchChar, final int beginIndex, final int endIndex)

Source from the content-addressed store, hash-verified

517 * @return the index of the first occurrence of the character in the string or <code>-1</code>
518 */
519 public static int indexOf(final String s, final char searchChar, final int beginIndex, final int endIndex) {
520 for (int i = beginIndex; i < endIndex; i++) {
521 if (s.charAt(i) == searchChar) {
522 return i;
523 }
524 }
525 return -1;
526 }
527
528 /**
529 * Returns a Color parsed from the given RGB in hexadecimal notation.

Callers 14

parseUrlMethod · 0.95
contentTypeEndsWithMethod · 0.45
getUrlWithNewUserNameMethod · 0.45
resolveUrlMethod · 0.45
sameFileMethod · 0.45
normalizeMethod · 0.45
replaceCharsMethod · 0.45
substringAfterMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected