- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for TrimLeftFunc (0.12 sec)
-
src/bytes/example_test.go
// Output: // gopher8257 } func ExampleTrimLeftFunc() { fmt.Println(string(bytes.TrimLeftFunc([]byte("go-gopher"), unicode.IsLetter))) fmt.Println(string(bytes.TrimLeftFunc([]byte("go-gopher!"), unicode.IsPunct))) fmt.Println(string(bytes.TrimLeftFunc([]byte("1234go-gopher!567"), unicode.IsNumber))) // Output: // -gopher // go-gopher! // go-gopher!567 }
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Mon May 12 16:07:54 UTC 2025 - 16.5K bytes - Viewed (0) -
src/bytes/bytes.go
prev = r return unicode.ToTitle(r) } prev = r return r }, s) } // TrimLeftFunc treats s as UTF-8-encoded bytes and returns a subslice of s by slicing off // all leading UTF-8-encoded code points c that satisfy f(c). func TrimLeftFunc(s []byte, f func(r rune) bool) []byte { i := indexFunc(s, f, false) if i == -1 { return nil } return s[i:] }
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Wed Sep 03 14:04:47 UTC 2025 - 35.5K bytes - Viewed (0) -
src/bytes/bytes_test.go
for _, tc := range trimFuncTests { trimmers := []struct { name string trim func(s []byte, f func(r rune) bool) []byte out []byte }{ {"TrimFunc", TrimFunc, tc.trimOut}, {"TrimLeftFunc", TrimLeftFunc, tc.leftOut}, {"TrimRightFunc", TrimRightFunc, tc.rightOut}, } for _, trimmer := range trimmers { actual := trimmer.trim([]byte(tc.in), tc.f.f) if actual == nil && trimmer.out != nil {
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Mon Jul 28 18:13:58 UTC 2025 - 62.9K bytes - Viewed (0) -
api/go1.txt
pkg bytes, func Trim([]uint8, string) []uint8 pkg bytes, func TrimFunc([]uint8, func(int32) bool) []uint8 pkg bytes, func TrimLeft([]uint8, string) []uint8 pkg bytes, func TrimLeftFunc([]uint8, func(int32) bool) []uint8 pkg bytes, func TrimRight([]uint8, string) []uint8 pkg bytes, func TrimRightFunc([]uint8, func(int32) bool) []uint8 pkg bytes, func TrimSpace([]uint8) []uint8
Registered: Tue Sep 09 11:13:09 UTC 2025 - Last Modified: Wed Aug 14 18:58:28 UTC 2013 - 1.7M bytes - Viewed (0)