MCPcopy Create free account
hub / github.com/antlr/codebuff / isNullOrEmpty

Method isNullOrEmpty

output/java_guava/1.4.19/Strings.java:72–74  ·  view source on GitHub ↗

Returns true if the given string is null or is the empty string. Consider normalizing your string references with #nullToEmpty. If you do, you can use String#isEmpty() instead of this method, and you won't need special null-safe forms of methods like {@link String#toUpper

(@Nullable String string)

Source from the content-addressed store, hash-verified

70
71
72 public static boolean isNullOrEmpty(@Nullable String string) {
73 return string == null || string.isEmpty();
74 }
75
76 /**
77 * Returns a string, of length at least {@code minLength}, consisting of {@code string} prepended

Callers 2

fromStringMethod · 0.95
emptyToNullMethod · 0.95

Calls 1

isEmptyMethod · 0.65

Tested by

no test coverage detected