Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for commaSplit (0.12 sec)

  1. src/bufio/scan_test.go

    func commaSplit(data []byte, atEOF bool) (advance int, token []byte, err error) {
    	for i := 0; i < len(data); i++ {
    		if data[i] == ',' {
    			return i + 1, data[:i], nil
    		}
    	}
    	return 0, data, ErrFinalToken
    }
    
    func testEmptyTokens(t *testing.T, text string, values []string) {
    	s := NewScanner(strings.NewReader(text))
    	s.Split(commaSplit)
    	var i int
    	for i = 0; s.Scan(); i++ {
    Registered: Tue Oct 29 11:13:09 UTC 2024
    - Last Modified: Fri Sep 22 16:22:42 UTC 2023
    - 14.3K bytes
    - Viewed (0)
Back to top