Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for leadingSpace (0.13 sec)

  1. src/go/doc/comment/parse.go

    		lines = lines[:len(lines)-1]
    	}
    	if len(lines) == 0 {
    		return nil
    	}
    
    	// Compute and remove common indentation.
    	prefix := leadingSpace(lines[0])
    	for _, line := range lines[1:] {
    		if !isBlank(line) {
    			prefix = commonPrefix(prefix, leadingSpace(line))
    		}
    	}
    
    	out := make([]string, len(lines))
    	for i, line := range lines {
    		line = strings.TrimPrefix(line, prefix)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 33.5K bytes
    - Viewed (0)
  2. src/encoding/csv/reader_test.go

    	FieldsPerRecord:    0,
    }, {
    	Name:             "TrimSpace",
    	Input:            " §a,  §b,   §c\n",
    	Output:           [][]string{{"a", "b", "c"}},
    	TrimLeadingSpace: true,
    }, {
    	Name:   "LeadingSpace",
    	Input:  "§ a,§  b,§   c\n",
    	Output: [][]string{{" a", "  b", "   c"}},
    }, {
    	Name:    "Comment",
    	Input:   "#1,2,3\n§a,§b,§c\n#comment",
    	Output:  [][]string{{"a", "b", "c"}},
    	Comment: '#',
    }, {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 14 04:25:13 UTC 2022
    - 19.1K bytes
    - Viewed (0)
  3. src/cmd/internal/quoted/quoted_test.go

    		value   string
    		want    []string
    		wantErr string
    	}{
    		{name: "empty", value: "", want: nil},
    		{name: "space", value: " ", want: nil},
    		{name: "one", value: "a", want: []string{"a"}},
    		{name: "leading_space", value: " a", want: []string{"a"}},
    		{name: "trailing_space", value: "a ", want: []string{"a"}},
    		{name: "two", value: "a b", want: []string{"a", "b"}},
    		{name: "two_multi_space", value: "a  b", want: []string{"a", "b"}},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 27 16:39:27 UTC 2021
    - 2.9K bytes
    - Viewed (0)
Back to top