- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 44 for foldName (0.33 sec)
-
src/encoding/json/fold.go
// license that can be found in the LICENSE file. package json import ( "unicode" "unicode/utf8" ) // foldName returns a folded string such that foldName(x) == foldName(y) // is identical to bytes.EqualFold(x, y). func foldName(in []byte) []byte { // This is inlinable to take advantage of "function outlining". var arr [32]byte // large enough for most JSON names
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 27 17:37:27 UTC 2023 - 1.1K bytes - Viewed (0) -
src/encoding/json/fold_test.go
{"AesKey", "AESKey"}, {"AESKey", "aeskey"}, {"DESKey", "aeskey"}, {"AES Key", "aeskey"}, } { f.Add([]byte(ss[0]), []byte(ss[1])) } equalFold := func(x, y []byte) bool { return string(foldName(x)) == string(foldName(y)) } f.Fuzz(func(t *testing.T, x, y []byte) { got := equalFold(x, y) want := bytes.EqualFold(x, y) if got != want { t.Errorf("equalFold(%q, %q) = %v, want %v", x, y, got, want) } })
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 27 17:37:27 UTC 2023 - 1.3K bytes - Viewed (0) -
src/encoding/json/encode.go
for i, field := range fields { exactNameIndex[field.name] = &fields[i] // For historical reasons, first folded match takes precedence. if _, ok := foldedNameIndex[string(foldName(field.nameBytes))]; !ok { foldedNameIndex[string(foldName(field.nameBytes))] = &fields[i] } } return structFields{fields, exactNameIndex, foldedNameIndex} } // dominantField looks through the fields, all of which are known to
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:18:55 UTC 2024 - 36.2K bytes - Viewed (0) -
src/encoding/json/decode.go
mapElem = reflect.New(elemType).Elem() } else { mapElem.SetZero() } subv = mapElem } else { f := fields.byExactName[string(key)] if f == nil { f = fields.byFoldedName[string(foldName(key))] } if f != nil { subv = v destring = f.quoted for _, i := range f.index { if subv.Kind() == reflect.Pointer { if subv.IsNil() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:18:55 UTC 2024 - 35.3K bytes - Viewed (0) -
src/os/file_windows.go
oldname = filepathlite.FromSlash(oldname) // need the exact location of the oldname when it's relative to determine if it's a directory destpath := oldname if v := filepathlite.VolumeName(oldname); v == "" { if len(oldname) > 0 && IsPathSeparator(oldname[0]) { // oldname is relative to the volume containing newname. if v = filepathlite.VolumeName(newname); v != "" {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 30 15:38:38 UTC 2024 - 13.4K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/CallablesTest.java
return null; } }; Callables.threadRenaming(callable, newName).call(); assertEquals(oldName, Thread.currentThread().getName()); } @J2ktIncompatible @GwtIncompatible // threads public void testRenaming_exceptionalReturn() throws Exception { String oldName = Thread.currentThread().getName(); final Supplier<String> newName = Suppliers.ofInstance("MyCrazyThreadName");
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue Feb 13 14:28:25 UTC 2024 - 5.4K bytes - Viewed (0) -
guava-tests/test/com/google/common/util/concurrent/CallablesTest.java
return null; } }; Callables.threadRenaming(callable, newName).call(); assertEquals(oldName, Thread.currentThread().getName()); } @J2ktIncompatible @GwtIncompatible // threads public void testRenaming_exceptionalReturn() throws Exception { String oldName = Thread.currentThread().getName(); final Supplier<String> newName = Suppliers.ofInstance("MyCrazyThreadName");
Registered: Wed Jun 12 16:38:11 UTC 2024 - Last Modified: Tue Feb 13 14:28:25 UTC 2024 - 5.4K bytes - Viewed (0) -
src/os/file_unix.go
if ofi, err := Lstat(oldname); err != nil { if pe, ok := err.(*PathError); ok { err = pe.Err } return &LinkError{"rename", oldname, newname, err} } else if newname == oldname || !SameFile(fi, ofi) { return &LinkError{"rename", oldname, newname, syscall.EEXIST} } } err = ignoringEINTR(func() error { return syscall.Rename(oldname, newname) }) if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 13:52:34 UTC 2024 - 14.9K bytes - Viewed (0) -
src/cmd/compile/internal/types2/lookup.go
} return lookupFieldOrMethod(T, addressable, pkg, name, false) } // lookupFieldOrMethod is like LookupFieldOrMethod but with the additional foldCase parameter // (see Object.sameId for the meaning of foldCase). func lookupFieldOrMethod(T Type, addressable bool, pkg *Package, name string, foldCase bool) (obj Object, index []int, indirect bool) { // Methods cannot be associated to a named pointer type.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 22 19:32:17 UTC 2024 - 19.8K bytes - Viewed (0) -
src/go/types/lookup.go
} return lookupFieldOrMethod(T, addressable, pkg, name, false) } // lookupFieldOrMethod is like LookupFieldOrMethod but with the additional foldCase parameter // (see Object.sameId for the meaning of foldCase). func lookupFieldOrMethod(T Type, addressable bool, pkg *Package, name string, foldCase bool) (obj Object, index []int, indirect bool) { // Methods cannot be associated to a named pointer type.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 19.9K bytes - Viewed (0)