Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for trimLen (0.05 sec)

  1. utils/utils_test.go

    			trimLen:  5,
    			expected: []int{},
    		},
    		{
    			name:     "Zero trim length",
    			input:    []int{1, 2, 3},
    			trimLen:  0,
    			expected: []int{1, 2, 3},
    		},
    		{
    			name:     "Trim one element from end",
    			input:    []int{1, 2, 3},
    			trimLen:  1,
    			expected: []int{1, 2},
    		},
    		{
    			name:     "Empty slice",
    			input:    []int{},
    			trimLen:  2,
    			expected: []int{},
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Aug 22 11:03:42 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  2. utils/utils.go

    }
    
    // RTrimSlice Right trims the given slice by given length
    func RTrimSlice[T any](v []T, trimLen int) []T {
    	if trimLen >= len(v) { // trimLen greater than slice len means fully sliced
    		return v[:0]
    	}
    	if trimLen < 0 { // negative trimLen is ignored
    		return v[:]
    	}
    	return v[:len(v)-trimLen]
    Registered: Sun Nov 03 09:35:10 UTC 2024
    - Last Modified: Thu Aug 22 11:03:42 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  3. guava/src/com/google/common/base/Splitter.java

       *
       * @param trimmer a {@link CharMatcher} that determines whether a character should be removed from
       *     the beginning/end of a subsequence
       * @return a splitter with the desired configuration
       */
      // TODO(kevinb): throw if a trimmer was already specified!
      public Splitter trimResults(CharMatcher trimmer) {
        checkNotNull(trimmer);
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Oct 17 21:14:05 UTC 2024
    - 24.5K bytes
    - Viewed (0)
  4. okhttp/src/test/java/okhttp3/HeadersJvmTest.kt

        val headers =
          Headers.Builder()
            .add("foo: bar")
            .add(" foo: baz") // Name leading whitespace is trimmed.
            .add("foo : bak") // Name trailing whitespace is trimmed.
            .add("\tkey\t:\tvalue\t") // '\t' also counts as whitespace
            .add("ping:  pong  ") // Value whitespace is trimmed.
            .add("kit:kat") // Space after colon is not required.
            .build()
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  5. android/guava/src/com/google/common/primitives/ImmutableLongArray.java

       */
      public ImmutableLongArray trimmed() {
        return isPartialView() ? new ImmutableLongArray(toArray()) : this;
      }
    
      private boolean isPartialView() {
        return start > 0 || end < array.length;
      }
    
      Object writeReplace() {
        return trimmed();
      }
    
      Object readResolve() {
        return isEmpty() ? EMPTY : this;
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 18:05:56 UTC 2024
    - 22.3K bytes
    - Viewed (0)
  6. guava/src/com/google/common/primitives/ImmutableIntArray.java

       */
      public ImmutableIntArray trimmed() {
        return isPartialView() ? new ImmutableIntArray(toArray()) : this;
      }
    
      private boolean isPartialView() {
        return start > 0 || end < array.length;
      }
    
      Object writeReplace() {
        return trimmed();
      }
    
      Object readResolve() {
        return isEmpty() ? EMPTY : this;
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 18:05:56 UTC 2024
    - 21.4K bytes
    - Viewed (0)
  7. docs/en/docs/js/custom.js

                            useLines.push({
                                type: "input",
                                value: value
                            });
                        } else if (line.startsWith("// ")) {
                            saveBuffer();
                            const value = "💬 " + line.replace("// ", "").trimEnd();
                            useLines.push({
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  8. android/guava-tests/test/com/google/common/primitives/ImmutableDoubleArrayTest.java

        ImmutableDoubleArray trimmed = iia.trimmed();
        assertThat(trimmed).isNotSameInstanceAs(iia);
    
        // Yes, this is apparently how you check array equality in Truth
        assertThat(trimmed.toArray()).isEqualTo(iia.toArray());
      }
    
      private static void assertDoesntActuallyTrim(ImmutableDoubleArray iia) {
        assertThat(iia.trimmed()).isSameInstanceAs(iia);
      }
    
      @J2ktIncompatible
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 18:05:56 UTC 2024
    - 21.2K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/primitives/ImmutableIntArray.java

       */
      public ImmutableIntArray trimmed() {
        return isPartialView() ? new ImmutableIntArray(toArray()) : this;
      }
    
      private boolean isPartialView() {
        return start > 0 || end < array.length;
      }
    
      Object writeReplace() {
        return trimmed();
      }
    
      Object readResolve() {
        return isEmpty() ? EMPTY : this;
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 18:05:56 UTC 2024
    - 22.2K bytes
    - Viewed (0)
  10. android/guava/src/com/google/common/primitives/ImmutableDoubleArray.java

       */
      public ImmutableDoubleArray trimmed() {
        return isPartialView() ? new ImmutableDoubleArray(toArray()) : this;
      }
    
      private boolean isPartialView() {
        return start > 0 || end < array.length;
      }
    
      Object writeReplace() {
        return trimmed();
      }
    
      Object readResolve() {
        return isEmpty() ? EMPTY : this;
      }
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Fri Oct 25 18:05:56 UTC 2024
    - 23K bytes
    - Viewed (0)
Back to top