Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for runnerFor (0.48 sec)

  1. src/time/format.go

    			// given how rarely we expect to hit these edge cases, speed and
    			// conciseness are better.
    			var width int
    			if c == runeError {
    				width = 1
    				if i+2 < len(s) && s[i:i+3] == string(runeError) {
    					width = 3
    				}
    			} else {
    				width = len(string(c))
    			}
    			for j := 0; j < width; j++ {
    				buf = append(buf, `\x`...)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 17:09:28 UTC 2024
    - 49.3K bytes
    - Viewed (0)
  2. src/strings/strings_test.go

    		{"foo", '☹', -1},
    		{"foo", 'o', 1},
    		{"foo☺bar", '☺', 3},
    		{"foo☺☻☹bar", '☹', 9},
    		{"a A x", 'A', 2},
    		{"some_text=some_value", '=', 9},
    		{"☺a", 'a', 3},
    		{"a☻☺b", '☺', 4},
    
    		// RuneError should match any invalid UTF-8 byte sequence.
    		{"�", '�', 0},
    		{"\xff", '�', 0},
    		{"☻x�", '�', len("☻x")},
    		{"☻x\xe2\x98", '�', len("☻x")},
    		{"☻x\xe2\x98�", '�', len("☻x")},
    		{"☻x\xe2\x98x", '�', len("☻x")},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 12:58:37 UTC 2024
    - 53K bytes
    - Viewed (0)
  3. src/time/time_test.go

    	{"\xffff", `"\xffff"`},
    	{"hello \xffff world", `"hello \xffff world"`},
    	{"\uFFFD", `"\xef\xbf\xbd"`},                                             // utf8.RuneError
    	{"\uFFFD hello \uFFFD world", `"\xef\xbf\xbd hello \xef\xbf\xbd world"`}, // utf8.RuneError
    	// overflow
    	{"9223372036854775810ns", `"9223372036854775810ns"`},
    	{"9223372036854775808ns", `"9223372036854775808ns"`},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:13:47 UTC 2024
    - 56.5K bytes
    - Viewed (0)
  4. src/bytes/bytes_test.go

    		{"foo", '☹', -1},
    		{"foo", 'o', 1},
    		{"foo☺bar", '☺', 3},
    		{"foo☺☻☹bar", '☹', 9},
    		{"a A x", 'A', 2},
    		{"some_text=some_value", '=', 9},
    		{"☺a", 'a', 3},
    		{"a☻☺b", '☺', 4},
    
    		// RuneError should match any invalid UTF-8 byte sequence.
    		{"�", '�', 0},
    		{"\xff", '�', 0},
    		{"☻x�", '�', len("☻x")},
    		{"☻x\xe2\x98", '�', len("☻x")},
    		{"☻x\xe2\x98�", '�', len("☻x")},
    		{"☻x\xe2\x98x", '�', len("☻x")},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 12:58:37 UTC 2024
    - 56.5K bytes
    - Viewed (0)
  5. src/regexp/syntax/parse.go

    	for s != "" {
    		rune, size := utf8.DecodeRuneInString(s)
    		if rune == utf8.RuneError && size == 1 {
    			return &Error{Code: ErrInvalidUTF8, Expr: s}
    		}
    		s = s[size:]
    	}
    	return nil
    }
    
    func nextRune(s string) (c rune, t string, err error) {
    	c, size := utf8.DecodeRuneInString(s)
    	if c == utf8.RuneError && size == 1 {
    		return 0, "", &Error{Code: ErrInvalidUTF8, Expr: s}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 13:59:01 UTC 2024
    - 52.1K bytes
    - Viewed (0)
Back to top