Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 53 for runnerFor (1.14 sec)

  1. src/regexp/onepass.go

    	}
    
    	// Have prefix; gather characters.
    	var buf strings.Builder
    	for iop(i) == syntax.InstRune && len(i.Rune) == 1 && syntax.Flags(i.Arg)&syntax.FoldCase == 0 && i.Rune[0] != utf8.RuneError {
    		buf.WriteRune(i.Rune[0])
    		pc, i = i.Out, &p.Inst[i.Out]
    	}
    	if i.Op == syntax.InstEmptyWidth &&
    		syntax.EmptyOp(i.Arg)&syntax.EmptyEndText != 0 &&
    		p.Inst[i.Out].Op == syntax.InstMatch {
    		complete = true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:36:03 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  2. src/runtime/string.go

    func intstring(buf *[4]byte, v int64) (s string) {
    	var b []byte
    	if buf != nil {
    		b = buf[:]
    		s = slicebytetostringtmp(&b[0], len(b))
    	} else {
    		s, b = rawstring(4)
    	}
    	if int64(rune(v)) != v {
    		v = runeError
    	}
    	n := encoderune(b, rune(v))
    	return s[:n]
    }
    
    // rawstring allocates storage for a new string. The returned
    // string and byte slice both refer to the same storage.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 13.4K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. src/encoding/json/decode.go

    		rr, size := utf8.DecodeRune(s[r:])
    		if rr == utf8.RuneError && size == 1 {
    			break
    		}
    		r += size
    	}
    	if r == len(s) {
    		return s, true
    	}
    
    	b := make([]byte, len(s)+2*utf8.UTFMax)
    	w := copy(b, s[0:r])
    	for r < len(s) {
    		// Out of room? Can only happen if s is full of
    		// malformed UTF-8 and we're replacing each
    		// byte with RuneError.
    		if w >= len(b)-2*utf8.UTFMax {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 35.3K bytes
    - Viewed (0)
  6. src/internal/poll/fd_windows.go

    						// Save half surrogate pair for next time.
    						fd.readuint16 = fd.readuint16[:1]
    						fd.readuint16[0] = uint16(r)
    						break
    					}
    					r = utf8.RuneError
    				} else {
    					r = utf16.DecodeRune(r, rune(uint16s[i+1]))
    					if r != utf8.RuneError {
    						i++
    					}
    				}
    			}
    			buf = utf8.AppendRune(buf, r)
    		}
    		fd.readbyte = buf
    		fd.readbyteOffset = 0
    		if nw == 0 {
    			break
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 31 16:50:42 UTC 2024
    - 34.1K bytes
    - Viewed (0)
  7. src/fmt/scan_test.go

    	{"%%%d", "42", args(&intVal), args(42), "missing literal %"},
    
    	// Bad UTF-8: should see every byte.
    	{"%c%c%c", "\xc2X\xc2", args(&r1, &r2, &r3), args(utf8.RuneError, 'X', utf8.RuneError), ""},
    
    	// Fixed bugs
    	{"%v%v", "FALSE23", args(&truth, &i), args(false, 23), ""},
    }
    
    var readers = []struct {
    	name string
    	f    func(string) io.Reader
    }{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 23 20:25:13 UTC 2023
    - 39.3K bytes
    - Viewed (0)
  8. src/regexp/regexp.go

    //
    // or any book about automata theory.
    //
    // All characters are UTF-8-encoded code points.
    // Following [utf8.DecodeRune], each byte of an invalid UTF-8 sequence
    // is treated as if it encoded utf8.RuneError (U+FFFD).
    //
    // There are 16 methods of [Regexp] that match a regular expression and identify
    // the matched text. Their names are matched by this regular expression:
    //
    //	Find(All)?(String)?(Submatch)?(Index)?
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 20:50:01 UTC 2024
    - 38.5K bytes
    - Viewed (0)
  9. src/bytes/buffer_test.go

    		}
    	}
    }
    
    func TestWriteInvalidRune(t *testing.T) {
    	// Invalid runes, including negative ones, should be written as
    	// utf8.RuneError.
    	for _, r := range []rune{-1, utf8.MaxRune + 1} {
    		var buf Buffer
    		buf.WriteRune(r)
    		check(t, fmt.Sprintf("TestWriteInvalidRune (%d)", r), &buf, "\uFFFD")
    	}
    }
    
    func TestNext(t *testing.T) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 13:31:36 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/mod/sumdb/note/note.go

    		known = VerifierList()
    	}
    
    	// Must have valid UTF-8 with no non-newline ASCII control characters.
    	for i := 0; i < len(msg); {
    		r, size := utf8.DecodeRune(msg[i:])
    		if r < 0x20 && r != '\n' || r == utf8.RuneError && size == 1 {
    			return nil, errMalformedNote
    		}
    		i += size
    	}
    
    	// Must end with signature block preceded by blank line.
    	split := bytes.LastIndex(msg, sigSplit)
    	if split < 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jul 12 20:38:21 UTC 2023
    - 20.1K bytes
    - Viewed (0)
Back to top