Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for emptyToNull (0.05 sec)

  1. android/guava-tests/test/com/google/common/base/StringsTest.java

        assertEquals("", Strings.nullToEmpty(""));
        assertEquals("a", Strings.nullToEmpty("a"));
      }
    
      public void testEmptyToNull() {
        assertNull(Strings.emptyToNull(null));
        assertNull(Strings.emptyToNull(""));
        assertEquals("a", Strings.emptyToNull("a"));
      }
    
      public void testIsNullOrEmpty() {
        assertTrue(Strings.isNullOrEmpty(null));
        assertTrue(Strings.isNullOrEmpty(""));
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Aug 27 17:53:41 UTC 2025
    - 10.5K bytes
    - Viewed (0)
  2. guava-gwt/src-super/com/google/common/base/super/com/google/common/base/Platform.native.js

     */
    Platform.nullToEmpty = function(str) {
      return str || "";
    };
    
    
    /**
     * @param {?string} str
     * @return {string} Original str, if it is non-empty. Otherwise null;
     */
    Platform.emptyToNull = function(str) {
      return str || null;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Mar 25 14:03:03 UTC 2020
    - 527 bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/base/Strings.java

       *
       * @param string the string to test and possibly return
       * @return {@code string} itself if it is nonempty; {@code null} if it is empty or null
       */
      public static @Nullable String emptyToNull(@Nullable String string) {
        return Platform.emptyToNull(string);
      }
    
      /**
       * Returns {@code true} if the given string is null or is the empty string.
       *
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Wed Aug 27 17:53:41 UTC 2025
    - 12.2K bytes
    - Viewed (0)
  4. guava-gwt/src-super/com/google/common/base/super/com/google/common/base/Platform.java

        return !string;
      }-*/;
    
      @JsMethod
      static native String nullToEmpty(@Nullable String string) /*-{
        return string || "";
      }-*/;
    
      @JsMethod
      static native String emptyToNull(@Nullable String string) /*-{
        return string || null;
      }-*/;
    
      static CommonPattern compilePattern(String pattern) {
        throw new UnsupportedOperationException();
      }
    
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Mon Feb 03 21:52:39 UTC 2025
    - 2.2K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/base/Platform.java

       *
       * @param string the string to test and possibly return
       * @return {@code string} if it is not empty; {@code null} otherwise
       */
      static @Nullable String emptyToNull(@Nullable String string) {
        return stringIsNullOrEmpty(string) ? null : string;
      }
    
      static String lenientFormat(@Nullable String template, @Nullable Object @Nullable ... args) {
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Aug 07 16:05:33 UTC 2025
    - 4.1K bytes
    - Viewed (0)
Back to top