- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for SplitAfterN (0.13 sec)
-
src/bytes/bytes.go
// // To split around the first instance of a separator, see [Cut]. func SplitN(s, sep []byte, n int) [][]byte { return genSplit(s, sep, 0, n) } // SplitAfterN slices s into subslices after each instance of sep and // returns a slice of those subslices. // If sep is empty, SplitAfterN splits after each UTF-8 sequence. // The count determines the number of subslices to return:
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Tue Sep 03 20:55:15 UTC 2024 - 35.6K bytes - Viewed (0) -
src/bytes/example_test.go
} func ExampleSplitAfter() { fmt.Printf("%q\n", bytes.SplitAfter([]byte("a,b,c"), []byte(","))) // Output: ["a," "b," "c"] } func ExampleSplitAfterN() { fmt.Printf("%q\n", bytes.SplitAfterN([]byte("a,b,c"), []byte(","), 2)) // Output: ["a," "b,c"] } func ExampleTitle() { fmt.Printf("%s", bytes.Title([]byte("her royal highness"))) // Output: Her Royal Highness }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Aug 07 17:22:36 UTC 2024 - 14.9K bytes - Viewed (0) -
src/bytes/bytes_test.go
{"1 2", " ", 3, []string{"1 ", "2"}}, {"123", "", 2, []string{"1", "23"}}, {"123", "", 17, []string{"1", "2", "3"}}, } func TestSplitAfter(t *testing.T) { for _, tt := range splitaftertests { a := SplitAfterN([]byte(tt.s), []byte(tt.sep), tt.n) // Appending to the results should not change future results. var x []byte for _, v := range a { x = append(v, 'z') } result := sliceOfString(a)
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Mon Aug 19 19:09:04 UTC 2024 - 61.2K bytes - Viewed (0) -
api/go1.txt
pkg bytes, func Replace([]uint8, []uint8, []uint8, int) []uint8 pkg bytes, func Runes([]uint8) []int32 pkg bytes, func Split([]uint8, []uint8) [][]uint8 pkg bytes, func SplitAfter([]uint8, []uint8) [][]uint8 pkg bytes, func SplitAfterN([]uint8, []uint8, int) [][]uint8 pkg bytes, func SplitN([]uint8, []uint8, int) [][]uint8 pkg bytes, func Title([]uint8) []uint8 pkg bytes, func ToLower([]uint8) []uint8
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Aug 14 18:58:28 UTC 2013 - 1.7M bytes - Viewed (0)