Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for SplitSeq (0.11 sec)

  1. src/bytes/iter.go

    		for len(s) > 0 {
    			_, size := utf8.DecodeRune(s)
    			if !yield(s[:size:size]) {
    				return
    			}
    			s = s[size:]
    		}
    	}
    }
    
    // splitSeq is SplitSeq or SplitAfterSeq, configured by how many
    // bytes of sep to include in the results (none or all).
    func splitSeq(s, sep []byte, sepSave int) iter.Seq[[]byte] {
    	if len(sep) == 0 {
    		return explodeSeq(s)
    	}
    	return func(yield func([]byte) bool) {
    		for {
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Aug 14 18:23:13 UTC 2024
    - 3.7K bytes
    - Viewed (0)
  2. api/next/61901.txt

    pkg bytes, func SplitSeq([]uint8, []uint8) iter.Seq[[]uint8] #61901
    pkg strings, func FieldsFuncSeq(string, func(int32) bool) iter.Seq[string] #61901
    pkg strings, func FieldsSeq(string) iter.Seq[string] #61901
    pkg strings, func Lines(string) iter.Seq[string] #61901
    pkg strings, func SplitAfterSeq(string, string) iter.Seq[string] #61901
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Aug 14 18:23:13 UTC 2024
    - 676 bytes
    - Viewed (0)
  3. doc/next/6-stdlib/99-minor/strings/61901.md

    The [strings] package adds several functions that work with iterators:
    - [Lines] returns an iterator over
      the newline-terminated lines in the string s.
    - [SplitSeq] returns an iterator over
      all substrings of s separated by sep.
    - [SplitAfterSeq] returns an iterator
      over substrings of s split after each instance of sep.
    - [FieldsSeq] returns an iterator over
      substrings of s split around runs of whitespace characters,
      as defined by unicode.IsSpace.
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Aug 14 18:23:13 UTC 2024
    - 580 bytes
    - Viewed (0)
  4. doc/next/6-stdlib/99-minor/bytes/61901.md

    The [bytes] package adds several functions that work with iterators:
    - [Lines] returns an iterator over the
      newline-terminated lines in the byte slice s.
    - [SplitSeq] returns an iterator over
      all substrings of s separated by sep.
    - [SplitAfterSeq] returns an iterator
      over substrings of s split after each instance of sep.
    - [FieldsSeq] returns an iterator over
      substrings of s split around runs of whitespace characters,
      as defined by unicode.IsSpace.
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Wed Aug 14 18:23:13 UTC 2024
    - 582 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(SplitSeq([]byte(tt.s), []byte(tt.sep))))
    			if !slices.Equal(b, tt.a) {
    				t.Errorf(`collect(SplitSeq(%q, %q)) = %v; want %v`, tt.s, tt.sep, b, tt.a)
    			}
    		}
    
    		if tt.n == 0 || len(a) == 0 {
    			continue
    		}
    
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Mon Aug 19 19:09:04 UTC 2024
    - 61.2K bytes
    - Viewed (0)
Back to top