- Sort Score
- Num 10 results
- Language All
Results 1 - 3 of 3 for CutSuffix (0.07 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
src/bytes/example_test.go
} func ExampleCutSuffix() { show := func(s, suffix string) { before, found := bytes.CutSuffix([]byte(s), []byte(suffix)) fmt.Printf("CutSuffix(%q, %q) = %q, %v\n", s, suffix, before, found) } show("Gopher", "Go") show("Gopher", "er") // Output: // CutSuffix("Gopher", "Go") = "Gopher", false // CutSuffix("Gopher", "er") = "Goph", true } func ExampleEqual() {
Created: Tue Apr 07 11:13:11 GMT 2026 - Last Modified: Mon May 12 16:07:54 GMT 2025 - 16.5K bytes - Click Count (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() {
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Sun Sep 28 20:59:21 GMT 2025 - 16.5K bytes - Click Count (0) -
src/bytes/bytes_test.go
{"", "d", "", false}, {"", "", "", true}, } func TestCutSuffix(t *testing.T) { for _, tt := range cutSuffixTests { if before, found := CutSuffix([]byte(tt.s), []byte(tt.sep)); string(before) != tt.before || found != tt.found { t.Errorf("CutSuffix(%q, %q) = %q, %v, want %q, %v", tt.s, tt.sep, before, found, tt.before, tt.found) } } } func TestBufferGrowNegative(t *testing.T) { defer func() {Created: Tue Apr 07 11:13:11 GMT 2026 - Last Modified: Wed Mar 11 03:07:05 GMT 2026 - 62.9K bytes - Click Count (0)