- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for CompareString (0.18 sec)
-
src/strings/compare.go
// slices.SortFunc, for example). It is usually clearer and always faster // to use the built-in string comparison operators ==, <, >, and so on. func Compare(a, b string) int { return bytealg.CompareString(a, b)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 23:39:07 UTC 2024 - 628 bytes - Viewed (0) -
src/internal/bytealg/compare_native.go
package bytealg import _ "unsafe" // For go:linkname //go:noescape func Compare(a, b []byte) int func CompareString(a, b string) int { return abigen_runtime_cmpstring(a, b) } // The declaration below generates ABI wrappers for functions // implemented in assembly in this package but declared in another // package.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 23:39:07 UTC 2024 - 726 bytes - Viewed (0) -
src/io/fs/readdir.go
if !ok { return nil, &PathError{Op: "readdir", Path: name, Err: errors.New("not implemented")} } list, err := dir.ReadDir(-1) slices.SortFunc(list, func(a, b DirEntry) int { return bytealg.CompareString(a.Name(), b.Name()) }) return list, err } // dirInfo is a DirEntry based on a FileInfo. type dirInfo struct { fileInfo FileInfo } func (di dirInfo) IsDir() bool { return di.fileInfo.IsDir()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 1.9K bytes - Viewed (0) -
src/internal/bytealg/compare_generic.go
if c1 < c2 { return -1 } if c1 > c2 { return +1 } } samebytes: if len(a) < len(b) { return -1 } if len(a) > len(b) { return +1 } return 0 } func CompareString(a, b string) int { return runtime_cmpstring(a, b) } // runtime.cmpstring calls are emitted by the compiler. // // runtime.cmpstring should be an internal detail,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 17:58:53 UTC 2024 - 1.5K bytes - Viewed (0) -
src/os/dir.go
f, err := openDir(name) if err != nil { return nil, err } defer f.Close() dirs, err := f.ReadDir(-1) slices.SortFunc(dirs, func(a, b DirEntry) int { return bytealg.CompareString(a.Name(), b.Name()) }) return dirs, err } // CopyFS copies the file system fsys into the directory dir, // creating dir if necessary. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 6.1K bytes - Viewed (0)