Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 41 for cutInt (0.12 sec)

  1. src/cmd/vendor/golang.org/x/tools/internal/versions/gover.go

    		return gover{}
    	}
    	v.kind, x = x[:i], x[i:]
    	if x == "" {
    		return v
    	}
    	v.pre, x, ok = cutInt(x)
    	if !ok || x != "" {
    		return gover{}
    	}
    
    	return v
    }
    
    // cutInt scans the leading decimal number at the start of x to an integer
    // and returns that value and the rest of the string.
    func cutInt(x string) (n, rest string, ok bool) {
    	i := 0
    	for i < len(x) && '0' <= x[i] && x[i] <= '9' {
    		i++
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 20 21:52:54 UTC 2023
    - 4.2K bytes
    - Viewed (0)
  2. src/internal/gover/gover.go

    	}
    	v.Kind, x = x[:i], x[i:]
    	if x == "" {
    		return v
    	}
    	v.Pre, x, ok = cutInt(x)
    	if !ok || x != "" {
    		return Version{}
    	}
    
    	return v
    }
    
    // cutInt scans the leading decimal number at the start of x to an integer
    // and returns that value and the rest of the string.
    func cutInt(x string) (n, rest string, ok bool) {
    	i := 0
    	for i < len(x) && '0' <= x[i] && x[i] <= '9' {
    		i++
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 06 23:20:32 UTC 2023
    - 5.8K bytes
    - Viewed (0)
  3. platforms/core-execution/hashing/src/main/java/org/gradle/internal/hash/HasherExtensions.java

            hasher.putInt(array.length);
            for (double d : array) {
                hasher.putDouble(d);
            }
        }
    
        public static void putFloats(Hasher hasher, float[] array) {
            hasher.putInt(array.length);
            for (float f : array) {
                hasher.putInt(Float.floatToRawIntBits(f));
            }
        }
    
        public static void putLongs(Hasher hasher, long[] array) {
            hasher.putInt(array.length);
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Jan 11 20:22:02 UTC 2024
    - 2K bytes
    - Viewed (0)
  4. src/cmd/go/internal/toolchain/path_windows.go

    	pathExts.once.Do(initPathExts)
    	name, _, ok := cutExt(de.Name(), pathExts.list)
    	if !ok {
    		return "", false
    	}
    	v := gover.FromToolchain(name)
    	if v == "" {
    		return "", false
    	}
    	return v, true
    }
    
    // cutExt looks for any of the known extensions at the end of file.
    // If one is found, cutExt returns the file name with the extension trimmed,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 31 15:15:19 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  5. platforms/core-execution/hashing/src/main/java/org/gradle/internal/hash/Hashing.java

            public void putHash(HashCode hashCode) {
                hasher.putInt(hashCode.length());
                hasher.putHash(hashCode);
            }
    
            @Override
            public void putInt(int value) {
                hasher.putInt(4);
                hasher.putInt(value);
            }
    
            @Override
            public void putLong(long value) {
                hasher.putInt(8);
                hasher.putLong(value);
            }
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Apr 26 16:02:30 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  6. src/strings/strings.go

    }
    
    // TrimLeft returns a slice of the string s with all leading
    // Unicode code points contained in cutset removed.
    //
    // To remove a prefix, use [TrimPrefix] instead.
    func TrimLeft(s, cutset string) string {
    	if s == "" || cutset == "" {
    		return s
    	}
    	if len(cutset) == 1 && cutset[0] < utf8.RuneSelf {
    		return trimLeftByte(s, cutset[0])
    	}
    	if as, ok := makeASCIISet(cutset); ok {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 16:48:16 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  7. platforms/core-execution/hashing/src/test/groovy/org/gradle/internal/hash/HashingTest.groovy

            hasher.putInt(1)
            hasher.hash()
    
            when:
            hasher.hash()
    
            then:
            thrown(IllegalStateException)
        }
    
        def 'hashers can overlap'() {
            when:
            def hasher1 = Hashing.newHasher()
            hasher1.putInt(1)
    
            and:
            def hasher2 = Hashing.newHasher()
            hasher2.putInt(1)
    
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Sep 22 08:43:29 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  8. platforms/software/dependency-management/src/main/java/org/gradle/api/internal/artifacts/repositories/descriptor/UrlRepositoryDescriptor.java

                cacheHasher.putString(implementation.getName());
                cacheHasher.putInt(metadataResources.size());
                for (ResourcePattern ivyPattern : metadataResources) {
                    cacheHasher.putString(ivyPattern.getPattern());
                }
                cacheHasher.putInt(artifactResources.size());
                for (ResourcePattern artifactPattern : artifactResources) {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed May 15 00:21:07 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  9. platforms/core-configuration/model-core/src/main/java/org/gradle/internal/snapshot/impl/AbstractMapSnapshot.java

        }
    
        public ImmutableList<MapEntrySnapshot<T>> getEntries() {
            return entries;
        }
    
        @Override
        public void appendToHasher(Hasher hasher) {
            hasher.putString("Map");
            hasher.putInt(entries.size());
            for (MapEntrySnapshot<T> entry : entries) {
                entry.getKey().appendToHasher(hasher);
                entry.getValue().appendToHasher(hasher);
            }
        }
    
        @Override
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  10. platforms/core-configuration/model-core/src/main/java/org/gradle/internal/snapshot/impl/IntegerValueSnapshot.java

        public IntegerValueSnapshot(Integer value) {
            super(value);
        }
    
        @Override
        public void appendToHasher(Hasher hasher) {
            hasher.putInt(getValue());
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Sep 28 09:51:04 UTC 2023
    - 968 bytes
    - Viewed (0)
Back to top