MCPcopy Create free account
hub / github.com/BaseXdb/basex / toBoolean

Method toBoolean

basex-core/src/main/java/org/basex/util/Strings.java:70–72  ·  view source on GitHub ↗

Converts the specified string to a boolean value. @param string string to be checked @return result of check, or null if the input is invalid

(final String string)

Source from the content-addressed store, hash-verified

68 * @return result of check, or {@code null} if the input is invalid
69 */
70 public static Boolean toBoolean(final String string) {
71 return isTrue(string) ? Boolean.TRUE : isFalse(string) ? Boolean.FALSE : null;
72 }
73
74 /**
75 * Checks if the specified string is "yes", "true", "on" or "1".

Callers 6

CsvSerializerMethod · 0.95
parseMethod · 0.95
putMethod · 0.95
noTargetsMethod · 0.95
assignMethod · 0.95
normalizeEnumMethod · 0.95

Calls 2

isTrueMethod · 0.95
isFalseMethod · 0.95

Tested by

no test coverage detected