- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 64 for chars (0.07 sec)
-
src/strings/strings.go
} // IndexAny returns the index of the first instance of any Unicode code point // from chars in s, or -1 if no Unicode code point from chars is present in s. func IndexAny(s, chars string) int { if chars == "" { // Avoid scanning all of s. return -1 } if len(chars) == 1 { // Avoid scanning all of s. r := rune(chars[0]) if r >= utf8.RuneSelf { r = utf8.RuneError } return IndexRune(s, r) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 16:48:16 UTC 2024 - 31.2K bytes - Viewed (0) -
src/cmd/vendor/rsc.io/markdown/inline.go
p.list = p.mergePlain(p.list) p.list = p.autoLinkText(p.list) return p.list } func (ps *parseState) emph(dst, src []Inline) []Inline { const chars = "_*~\"'" var stack [len(chars)][]*emphPlain stackOf := func(c byte) int { return strings.IndexByte(chars, c) } trimStack := func() { for i := range stack { stk := &stack[i] for len(*stk) > 0 && (*stk)[len(*stk)-1].i >= len(dst) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 16:19:04 UTC 2024 - 21.9K bytes - Viewed (0) -
src/fmt/scan_test.go
func (t *TwoLines) Scan(state ScanState, verb rune) error { chars := make([]rune, 0, 100) for nlCount := 0; nlCount < 2; { c, _, err := state.ReadRune() if err != nil { return err } chars = append(chars, c) if c == '\n' { nlCount++ } } *t = TwoLines(string(chars)) return nil } func TestMultiLine(t *testing.T) { input := "abc\ndef\n"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 23 20:25:13 UTC 2023 - 39.3K bytes - Viewed (0) -
src/os/removeall_test.go
} defer RemoveAll(startPath) err = Chdir(startPath) if err != nil { t.Fatalf("Could not chdir %s: %s", startPath, err) } // Removing paths with over 4096 chars commonly fails for i := 0; i < 41; i++ { name := strings.Repeat("a", 100) err = Mkdir(name, 0755) if err != nil { t.Fatalf("Could not mkdir %s: %s", name, err) } err = Chdir(name)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:21:29 UTC 2024 - 12.3K bytes - Viewed (0) -
src/unicode/letter_test.go
0x2f800, 0x2fa1d, } var notletterTest = []rune{ 0x20, 0x35, 0x375, 0x619, 0x700, 0x1885, 0xfffe, 0x1ffff, 0x10ffff, } // Contains all the special cased Latin-1 chars. var spaceTest = []rune{ 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x20, 0x85, 0xA0, 0x2000, 0x3000, } type caseT struct { cas int in, out rune }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Sep 09 01:46:03 UTC 2023 - 14.8K bytes - Viewed (0) -
src/net/net_windows_test.go
if err != nil { return err } defer c.Close() b := []byte(data) n, err := c.Write(b) if err != nil { return err } if n != len(b) { return fmt.Errorf(`Only %d chars of string "%s" sent`, n, data) } return nil } if envaddr := os.Getenv("GOTEST_DIAL_ADDR"); envaddr != "" { // In child process. c, err := Dial("tcp", envaddr) if err != nil { t.Fatal(err)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 16.3K bytes - Viewed (0) -
src/encoding/json/encode.go
if s == "" { return false } for _, c := range s { switch { case strings.ContainsRune("!#$%&()*+-./:;<=>?@[]^_{|}~ ", c): // Backslash and quote chars are reserved, but // otherwise any punctuation chars are allowed // in a tag name. case !unicode.IsLetter(c) && !unicode.IsDigit(c): return false } } return true }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 00:18:55 UTC 2024 - 36.2K bytes - Viewed (0) -
src/text/tabwriter/tabwriter.go
// unicode width of the text. func (b *Writer) endEscape() { switch b.endChar { case Escape: b.updateWidth() if b.flags&StripEscape == 0 { b.cell.width -= 2 // don't count the Escape chars } case '>': // tag of zero width case ';': b.cell.width++ // entity, count as one rune } b.pos = len(b.buf) b.endChar = 0 }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 29 16:46:34 UTC 2024 - 17.8K bytes - Viewed (0) -
src/encoding/base64/base64.go
// of an input buffer of length n. func (enc *Encoding) EncodedLen(n int) int { if enc.padChar == NoPadding { return n/3*4 + (n%3*8+5)/6 // minimum # chars at 6 bits per char } return (n + 2) / 3 * 4 // minimum # 4-char quanta, 3 bytes each } /* * Decoder */ type CorruptInputError int64 func (e CorruptInputError) Error() string {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 19:04:28 UTC 2023 - 17.6K bytes - Viewed (0) -
src/net/mail/message.go
// Re-using some addrParser methods which support obsolete text, i.e. non-printable ASCII p := addrParser{date, nil} p.skipSpace() // RFC 5322: zone = (FWS ( "+" / "-" ) 4DIGIT) / obs-zone // zone length is always 5 chars unless obsolete (obs-zone) if ind := strings.IndexAny(p.s, "+-"); ind != -1 && len(p.s) >= ind+5 { date = p.s[:ind+5] p.s = p.s[ind+5:] } else { ind := strings.Index(p.s, "T") if ind == 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Mar 19 11:31:03 UTC 2024 - 23.5K bytes - Viewed (0)