- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for nullToEmpty (0.08 sec)
-
guava-gwt/src-super/com/google/common/base/super/com/google/common/base/Platform.native.js
* @public */ Platform.stringIsNullOrEmpty = function(str) { return !str; }; /** * @param {?string} str * @return {string} Original str, if it is non-null. Otherwise empty string. */ Platform.nullToEmpty = function(str) { return str || ""; }; /** * @param {?string} str * @return {string} Original str, if it is non-empty. Otherwise null; */ Platform.emptyToNull = function(str) {
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Wed Mar 25 14:03:03 UTC 2020 - 527 bytes - Viewed (0) -
android/guava-tests/test/com/google/common/base/StringsTest.java
@ElementTypesAreNonnullByDefault @GwtCompatible(emulated = true) public class StringsTest extends TestCase { public void testNullToEmpty() { assertEquals("", Strings.nullToEmpty(null)); assertEquals("", Strings.nullToEmpty("")); assertEquals("a", Strings.nullToEmpty("a")); } public void testEmptyToNull() { assertNull(Strings.emptyToNull(null)); assertNull(Strings.emptyToNull(""));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Sep 17 18:14:12 UTC 2024 - 10.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/base/StringsTest.java
@ElementTypesAreNonnullByDefault @GwtCompatible(emulated = true) public class StringsTest extends TestCase { public void testNullToEmpty() { assertEquals("", Strings.nullToEmpty(null)); assertEquals("", Strings.nullToEmpty("")); assertEquals("a", Strings.nullToEmpty("a")); } public void testEmptyToNull() { assertNull(Strings.emptyToNull(null)); assertNull(Strings.emptyToNull(""));
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Tue Sep 17 18:14:12 UTC 2024 - 10.4K bytes - Viewed (0) -
guava-gwt/src-super/com/google/common/base/super/com/google/common/base/Platform.java
@JsMethod static native boolean stringIsNullOrEmpty(@Nullable String string) /*-{ return !string; }-*/; @JsMethod static native String nullToEmpty(@Nullable String string) /*-{ return string || ""; }-*/; @JsMethod static native String emptyToNull(@Nullable String string) /*-{ return string || null; }-*/;
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon May 27 13:56:56 UTC 2024 - 2K bytes - Viewed (0) -
guava/src/com/google/common/base/Platform.java
* * @param string the string to test and possibly return * @return {@code string} if it is not null; {@code ""} otherwise */ static String nullToEmpty(@CheckForNull String string) { return (string == null) ? "" : string; } /** * Returns the string if it is not empty, or a null string otherwise. *
Registered: Fri Nov 01 12:43:10 UTC 2024 - Last Modified: Mon Apr 15 22:32:14 UTC 2024 - 3.9K bytes - Viewed (0)