Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 16 for trimLen (0.1 seconds)

  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{},
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Sat Mar 21 11:31:30 GMT 2026
    - 5.5K bytes
    - Click Count (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]
    Created: Sun Apr 05 09:35:12 GMT 2026
    - Last Modified: Sat Mar 21 11:35:55 GMT 2026
    - 4.9K bytes
    - Click Count (0)
  3. .teamcity/scripts/CheckRemoteProjectRef.java

                String trimmed = line.trim();
                if (trimmed.isEmpty() || trimmed.startsWith("#") || trimmed.startsWith("!")) {
                    continue;
                }
                int idx = trimmed.indexOf('=');
                if (idx < 0) {
                    continue;
                }
                String key = trimmed.substring(0, idx).trim();
                String value = trimmed.substring(idx + 1).trim();
    Created: Wed Apr 01 11:36:16 GMT 2026
    - Last Modified: Tue Jan 20 03:53:25 GMT 2026
    - 3.4K bytes
    - Click Count (0)
  4. okhttp/src/jvmTest/kotlin/okhttp3/HeadersJvmTest.kt

          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()
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue May 27 14:51:25 GMT 2025
    - 5.7K bytes
    - Click Count (0)
  5. src/main/java/org/codelibs/fess/entity/ChatSession.java

                    // Ensure trimmed history starts with a user message, not an assistant message
                    if (start < messages.size() && ChatMessage.ROLE_ASSISTANT.equals(messages.get(start).getRole())) {
                        start = Math.max(0, start - 1);
                    }
                    final List<ChatMessage> trimmed = new ArrayList<>(messages.subList(start, messages.size()));
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Sat Mar 07 01:53:06 GMT 2026
    - 6.7K bytes
    - Click Count (0)
  6. .teamcity/scripts/CheckBadMerge.java

            String stdout = getStdout(new String[] {"git", "show", "--format=%P", "--no-patch", "--no-show-signature", commit});
            String trimmed = stdout.trim();
            if (trimmed.isEmpty()) {
                return Collections.emptyList();
            }
            return Arrays.stream(trimmed.split("\\s+"))
                .map(String::trim)
                .filter(s -> !s.isEmpty())
                .collect(Collectors.toList());
        }
    
    Created: Wed Apr 01 11:36:16 GMT 2026
    - Last Modified: Mon Mar 30 16:25:09 GMT 2026
    - 9K bytes
    - Click Count (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({
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 17:59:48 GMT 2026
    - 7.7K bytes
    - Click Count (2)
  8. src/main/java/org/codelibs/fess/crawler/util/FieldConfigs.java

            /**
             * Array of parsed configuration values split by pipe character and trimmed.
             */
            private final String[] values;
    
            /**
             * Constructs a new Config instance by parsing the provided configuration value.
             * The value is split by pipe character (|) and each part is trimmed.
             *
             * @param value the configuration value string to parse
             */
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Thu Jul 17 08:28:31 GMT 2025
    - 4.3K bytes
    - Click Count (0)
  9. impl/maven-cli/src/test/resources/mavenHome/conf/maven-user.properties

    # user properties at the very beginning of Maven's boot process.
    #
    
    # Comma-separated list of files to include.
    # Each item may be enclosed in quotes to gracefully include spaces. Items are trimmed before being loaded.
    # If the first character of an item is a question mark, the load will silently fail if the file does not exist.
    ${includes} = ?"${maven.user.conf}/maven-user.properties", \
    Created: Sun Apr 05 03:35:12 GMT 2026
    - Last Modified: Thu Jul 03 14:18:26 GMT 2025
    - 1.3K bytes
    - Click Count (0)
  10. impl/maven-cli/src/test/resources/mavenHome/conf/maven-system.properties

    maven.user.conf         = ${user.home}/.m2
    maven.project.conf      = ${session.rootDirectory}/.mvn
    
    # Comma-separated list of files to include.
    # Each item may be enclosed in quotes to gracefully include spaces. Items are trimmed before being loaded.
    # If the first character of an item is a question mark, the load will silently fail if the file does not exist.
    ${includes} = ?"${maven.user.conf}/maven-system.properties", \
    Created: Sun Apr 05 03:35:12 GMT 2026
    - Last Modified: Thu Jul 03 14:18:26 GMT 2025
    - 2.8K bytes
    - Click Count (0)
Back to Top