- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for CutSuffix (0.06 sec)
-
src/bytes/example_test.go
} func ExampleCutSuffix() { show := func(s, sep string) { before, found := bytes.CutSuffix([]byte(s), []byte(sep)) fmt.Printf("CutSuffix(%q, %q) = %q, %v\n", s, sep, before, found) } show("Gopher", "Go") show("Gopher", "er") // Output: // CutSuffix("Gopher", "Go") = "Gopher", false // CutSuffix("Gopher", "er") = "Goph", true } func ExampleEqual() {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Aug 07 17:22:36 UTC 2024 - 14.9K bytes - Viewed (0) -
cmd/sftp-server.go
user, found := strings.CutSuffix(c.User(), "=ldap") if found { if !globalIAMSys.LDAPConfig.Enabled() { return nil, errSFTPLDAPNotEnabled } return processLDAPAuthentication(key, pass, user) } user, found = strings.CutSuffix(c.User(), "=svc") if found { goto internalAuth } if globalIAMSys.LDAPConfig.Enabled() {
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Aug 20 20:00:29 UTC 2024 - 16K bytes - Viewed (0) -
src/bytes/bytes.go
} return s[len(prefix):], true } // CutSuffix returns s without the provided ending suffix byte slice // and reports whether it found the suffix. // If s doesn't end with suffix, CutSuffix returns s, false. // If suffix is the empty byte slice, CutSuffix returns s, true. // // CutSuffix returns slices of the original slice s, not copies. func CutSuffix(s, suffix []byte) (before []byte, found bool) {
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Sep 03 20:55:15 UTC 2024 - 35.6K bytes - Viewed (0) -
src/archive/zip/reader.go
} rc, err := e.file.Open() if err != nil { return nil, err } return rc.(fs.File), nil } func split(name string) (dir, elem string, isDir bool) { name, isDir = strings.CutSuffix(name, "/") i := strings.LastIndexByte(name, '/') if i < 0 { return ".", name, isDir } return name[:i], name[i+1:], isDir } var dotFile = &fileListEntry{name: "./", isDir: true}
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Sat Aug 03 01:05:29 UTC 2024 - 28.1K bytes - Viewed (0)