- Sort Score
- Result 10 results
- Languages All
Results 1 - 6 of 6 for SplitAfter (0.13 sec)
-
src/bytes/iter.go
return splitSeq(s, sep, 0) } // SplitAfterSeq returns an iterator over substrings of s split after each instance of sep. // The iterator yields the same strings that would be returned by SplitAfter(s, sep), // but without constructing the slice. // It returns a single-use iterator. func SplitAfterSeq(s, sep []byte) iter.Seq[[]byte] { return splitSeq(s, sep, len(sep)) }
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Aug 14 18:23:13 UTC 2024 - 3.7K bytes - Viewed (0) -
src/cmd/asm/internal/asm/endtoend_test.go
data, err := os.ReadFile(input) if err != nil { t.Error(err) return } lineno := 0 seq := 0 hexByLine := map[string]string{} lines := strings.SplitAfter(string(data), "\n") Diff: for _, line := range lines { lineno++ // Ignore include of textflag.h. if strings.HasPrefix(line, "#include ") { continue } // Ignore GLOBL.
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Thu Dec 07 18:42:59 UTC 2023 - 11.6K bytes - Viewed (0) -
src/bytes/example_test.go
z := bytes.SplitN([]byte("a,b,c"), []byte(","), 0) fmt.Printf("%q (nil = %v)\n", z, z == nil) // Output: // ["a" "b,c"] // [] (nil = true) } 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"] }
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.go
func Split(s, sep []byte) [][]byte { return genSplit(s, sep, 0, -1) } // SplitAfter slices s into all subslices after each instance of sep and // returns a slice of those subslices. // If sep is empty, SplitAfter splits after each UTF-8 sequence. // It is equivalent to SplitAfterN with a count of -1. func SplitAfter(s, sep []byte) [][]byte { return genSplit(s, sep, len(sep), -1) }
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/bytes_test.go
if string(s) != tt.s { t.Errorf(`Join(Split(%q, %q, %d), %q) = %q`, tt.s, tt.sep, tt.n, tt.sep, s) } if tt.n < 0 { b := sliceOfString(SplitAfter([]byte(tt.s), []byte(tt.sep))) if !slices.Equal(result, b) { t.Errorf("SplitAfter disagrees withSplitAfterN(%q, %q, %d) = %v; want %v", tt.s, tt.sep, tt.n, b, a) } } } } type FieldsTest struct { s string a []string
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 Repeat([]uint8, int) []uint8 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
Registered: Tue Nov 05 11:13:11 UTC 2024 - Last Modified: Wed Aug 14 18:58:28 UTC 2013 - 1.7M bytes - Viewed (0)