Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for nullToEmpty (0.19 sec)

  1. .cm/plugins/filters/nullToEmpty/index.js

    /**
     * @module nullToEmpty
     * @description Returns the specified value if non-null, otherwise an empty array.
     * @param {Object} input - The object to investigate
     * @returns Object - The specified value if non-null, otherwise an empty array
     * @example {{ readField('jvm', 'files') | nullToEmpty }}
     */
    function nullToEmpty(input) {
        let output;
        if (input) {
            output = input;
        } else {
            output = [];
        }
    JavaScript
    - Registered: Wed May 01 11:36:15 GMT 2024
    - Last Modified: Mon Apr 22 16:43:16 GMT 2024
    - 526 bytes
    - Viewed (0)
  2. guava/src/com/google/common/base/Strings.java

       *
       * @param string the string to test and possibly return
       * @return {@code string} itself if it is non-null; {@code ""} if it is null
       */
      public static String nullToEmpty(@CheckForNull String string) {
        return Platform.nullToEmpty(string);
      }
    
      /**
       * Returns the given string if it is nonempty; {@code null} otherwise.
       *
       * @param string the string to test and possibly return
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Fri Sep 17 20:47:03 GMT 2021
    - 12.6K bytes
    - Viewed (0)
  3. 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) {
    JavaScript
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Mar 25 14:03:03 GMT 2020
    - 527 bytes
    - Viewed (0)
  4. 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(""));
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 10.3K bytes
    - Viewed (0)
  5. 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(""));
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri Feb 09 15:49:48 GMT 2024
    - 10.3K bytes
    - Viewed (0)
  6. 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 non-null; {@code ""} if it is null
       */
      public static String nullToEmpty(@CheckForNull String string) {
        return Platform.nullToEmpty(string);
      }
    
      /**
       * Returns the given string if it is nonempty; {@code null} otherwise.
       *
       * @param string the string to test and possibly return
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Fri Apr 09 00:49:18 GMT 2021
    - 12.3K bytes
    - Viewed (0)
  7. .cm/platform_labels.cm

      platform_label_{{ platform.name }}:
        if:
          - {{ ('platform_labels' | isEnabledAutomation(pr)) }}
          - {{ files | byPlatform | categorize(branch.diff.files_metadata) | readField(platform.name, 'files') | nullToEmpty | some }}
        run:
          - action: add-label@v1
            args:
              label: 'platform:{{ platform.name }}'
              color: '0000FF'
      {% endfor %}
    
    Plain Text
    - Registered: Wed May 01 11:36:15 GMT 2024
    - Last Modified: Mon Apr 22 15:32:31 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  8. 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;
      }-*/;
    
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Jun 26 17:58:45 GMT 2023
    - 2K bytes
    - Viewed (0)
  9. 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.
       *
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Jun 26 17:58:45 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  10. 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 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.
       *
    Java
    - Registered: Fri May 03 12:43:13 GMT 2024
    - Last Modified: Mon Apr 15 22:32:14 GMT 2024
    - 3.8K bytes
    - Viewed (0)
Back to top