- Sort Score
- Num 10 results
- Language All
Results 1 - 2 of 2 for TrimLeftFunc (0.07 seconds)
-
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:] }
Created: Tue Apr 07 11:13:11 GMT 2026 - Last Modified: Thu Mar 12 17:56:55 GMT 2026 - 36.3K bytes - Click Count (0) -
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 }
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)