- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for TrimRightFunc (0.08 sec)
-
src/bytes/example_test.go
// Output: // 453gopher } func ExampleTrimRightFunc() { fmt.Println(string(bytes.TrimRightFunc([]byte("go-gopher"), unicode.IsLetter))) fmt.Println(string(bytes.TrimRightFunc([]byte("go-gopher!"), unicode.IsPunct))) fmt.Println(string(bytes.TrimRightFunc([]byte("1234go-gopher!567"), unicode.IsNumber))) // Output: // go- // go-gopher // 1234go-gopher! }
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
func TrimLeftFunc(s []byte, f func(r rune) bool) []byte { i := indexFunc(s, f, false) if i == -1 { return nil } return s[i:] } // TrimRightFunc returns a subslice of s by slicing off all trailing // UTF-8-encoded code points c that satisfy f(c). func TrimRightFunc(s []byte, f func(r rune) bool) []byte { i := lastIndexFunc(s, f, false) if i >= 0 && s[i] >= utf8.RuneSelf { _, wid := utf8.DecodeRune(s[i:]) i += wid
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
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 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 pkg bytes, method (*Buffer) Bytes() []uint8 pkg bytes, method (*Buffer) Len() int pkg bytes, method (*Buffer) Next(int) []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)