- Sort Score
- Result 10 results
- Languages All
Results 1 - 1 of 1 for ExampleCutPrefix (0.11 sec)
-
src/bytes/example_test.go
// Output: // Cut("Gopher", "Go") = "", "pher", true // Cut("Gopher", "ph") = "Go", "er", true // Cut("Gopher", "er") = "Goph", "", true // Cut("Gopher", "Badger") = "Gopher", "", false } func ExampleCutPrefix() { show := func(s, sep string) { after, found := bytes.CutPrefix([]byte(s), []byte(sep)) fmt.Printf("CutPrefix(%q, %q) = %q, %v\n", s, sep, after, found) } show("Gopher", "Go") show("Gopher", "ph")
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Aug 07 17:22:36 UTC 2024 - 14.9K bytes - Viewed (0)