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

Method emptyToNull

output/java_guava/1.4.19/Strings.java:54–57  ·  view source on GitHub ↗

Returns the given string if it is nonempty; null otherwise. @param string the string to test and possibly return @return string itself if it is nonempty; null if it is empty or null

(@Nullable String string)

Source from the content-addressed store, hash-verified

52 */
53
54 @Nullable
55 public static String emptyToNull(@Nullable String string) {
56 return isNullOrEmpty(string) ? null : string;
57 }
58
59 /**
60 * Returns {@code true} if the given string is null or is the empty string.

Callers

nothing calls this directly

Calls 1

isNullOrEmptyMethod · 0.95

Tested by

no test coverage detected