Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for SplitAfter (0.28 sec)

  1. 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)
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Feb 19 19:51:15 GMT 2024
    - 33.8K bytes
    - Viewed (0)
  2. 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.
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Thu Dec 07 18:42:59 GMT 2023
    - 11.6K bytes
    - Viewed (0)
  3. 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"]
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Mon Mar 04 15:54:40 GMT 2024
    - 15K bytes
    - Viewed (1)
  4. src/bytes/bytes_test.go

    		}
    
    		s := Join(a, nil)
    		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 := SplitAfter([]byte(tt.s), []byte(tt.sep))
    			if !reflect.DeepEqual(a, 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
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jan 24 16:07:25 GMT 2024
    - 56.2K bytes
    - Viewed (0)
  5. 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
    Plain Text
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Aug 14 18:58:28 GMT 2013
    - 1.7M bytes
    - Viewed (1)
Back to top