Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for SplitAfterSeq (0.04 sec)

  1. src/bytes/iter_test.go

    	for range b.N {
    		for range SplitAfterSeq(benchInputHard, nil) {
    		}
    	}
    }
    
    func BenchmarkSplitAfterSeqSingleByteSeparator(b *testing.B) {
    	sep := []byte("/")
    	for range b.N {
    		for range SplitAfterSeq(benchInputHard, sep) {
    		}
    	}
    }
    
    func BenchmarkSplitAfterSeqMultiByteSeparator(b *testing.B) {
    	sep := []byte("hello")
    	for range b.N {
    		for range SplitAfterSeq(benchInputHard, sep) {
    		}
    	}
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Tue May 06 02:08:23 UTC 2025
    - 1.1K bytes
    - Viewed (0)
  2. src/bytes/iter.go

    	return splitSeq(s, sep, 0)
    }
    
    // SplitAfterSeq returns an iterator over subslices of s split after each instance of sep.
    // The iterator yields the same subslices that would be returned by [SplitAfter](s, sep),
    // but without constructing a new slice containing the subslices.
    // It returns a single-use iterator.
    func SplitAfterSeq(s, sep []byte) iter.Seq[[]byte] {
    	return splitSeq(s, sep, len(sep))
    }
    
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Wed Sep 03 14:04:47 UTC 2025
    - 3.6K bytes
    - Viewed (0)
  3. api/go1.24.txt

    pkg bytes, func FieldsFuncSeq([]uint8, func(int32) bool) iter.Seq[[]uint8] #61901
    pkg bytes, func FieldsSeq([]uint8) iter.Seq[[]uint8] #61901
    pkg bytes, func Lines([]uint8) iter.Seq[[]uint8] #61901
    pkg bytes, func SplitAfterSeq([]uint8, []uint8) iter.Seq[[]uint8] #61901
    pkg bytes, func SplitSeq([]uint8, []uint8) iter.Seq[[]uint8] #61901
    pkg crypto/cipher, func NewCFBDecrypter //deprecated #69445
    pkg crypto/cipher, func NewCFBEncrypter //deprecated #69445
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Tue Dec 17 21:28:29 UTC 2024
    - 14.2K bytes
    - Viewed (0)
  4. src/bytes/example_test.go

    		fmt.Printf("%q\n", part)
    	}
    
    	// Output:
    	// "a"
    	// "b"
    	// "c"
    	// "d"
    }
    
    func ExampleSplitAfterSeq() {
    	s := []byte("a,b,c,d")
    	for part := range bytes.SplitAfterSeq(s, []byte(",")) {
    		fmt.Printf("%q\n", part)
    	}
    
    	// Output:
    	// "a,"
    	// "b,"
    	// "c,"
    	// "d"
    }
    
    func ExampleFieldsSeq() {
    	text := []byte("The quick brown fox")
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Mon May 12 16:07:54 UTC 2025
    - 16.5K bytes
    - Viewed (0)
  5. src/bytes/bytes_test.go

    			t.Errorf(`Split(%q, %q, %d) = %v; want %v`, tt.s, tt.sep, tt.n, result, tt.a)
    			continue
    		}
    
    		if tt.n < 0 {
    			b := sliceOfString(slices.Collect(SplitAfterSeq([]byte(tt.s), []byte(tt.sep))))
    			if !slices.Equal(b, tt.a) {
    				t.Errorf(`collect(SplitAfterSeq(%q, %q)) = %v; want %v`, tt.s, tt.sep, b, tt.a)
    			}
    		}
    
    		if want := tt.a[len(tt.a)-1] + "z"; string(x) != want {
    Registered: Tue Sep 09 11:13:09 UTC 2025
    - Last Modified: Mon Jul 28 18:13:58 UTC 2025
    - 62.9K bytes
    - Viewed (0)
Back to top