MCPcopy Create free account
hub / github.com/HtmlUnit/htmlunit / equalsChar

Method equalsChar

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

@param expected the char that we expect @param s the string to check @return true if the provided string has only one char and this matches the expectation

(final char expected, final CharSequence s)

Source from the content-addressed store, hash-verified

152 * @return true if the provided string has only one char and this matches the expectation
153 */
154 public static boolean equalsChar(final char expected, final CharSequence s) {
155 return s != null && s.length() == 1 && expected == s.charAt(0);
156 }
157
158 /**
159 * Tests if a CharSequence starts with a specified prefix.

Callers 13

equalsCharMethod · 0.95
provideElementsMethod · 0.95
getElementsByTagNameMethod · 0.95
printNodeMethod · 0.95
postMessageMethod · 0.95
getElementsByTagNameMethod · 0.95
setSearchMethod · 0.95
endElementMethod · 0.95
getNthElementMethod · 0.95
setSearchMethod · 0.45
getValueMethod · 0.45
getValueMethod · 0.45

Calls 1

lengthMethod · 0.65

Tested by 1

equalsCharMethod · 0.76