Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 1,197 for runes (0.1 sec)

  1. src/strconv/quote.go

    			}
    			continue // All other multibyte runes are correctly encoded and assumed printable.
    		}
    		if r == utf8.RuneError {
    			return false
    		}
    		if (r < ' ' && r != '\t') || r == '`' || r == '\u007F' {
    			return false
    		}
    	}
    	return true
    }
    
    func unhex(b byte) (v rune, ok bool) {
    	c := rune(b)
    	switch {
    	case '0' <= c && c <= '9':
    		return c - '0', true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:21:28 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  2. 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")
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 13:31:36 UTC 2024
    - 18.6K bytes
    - Viewed (0)
  3. src/go/scanner/scanner.go

    }
    
    func digitVal(ch rune) int {
    	switch {
    	case '0' <= ch && ch <= '9':
    		return int(ch - '0')
    	case 'a' <= lower(ch) && lower(ch) <= 'f':
    		return int(lower(ch) - 'a' + 10)
    	}
    	return 16 // larger than any legal digit val
    }
    
    func lower(ch rune) rune     { return ('a' - 'A') | ch } // returns lower-case ch iff ch is ASCII letter
    func isDecimal(ch rune) bool { return '0' <= ch && ch <= '9' }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 24.3K bytes
    - Viewed (0)
  4. src/cmd/go/internal/work/gc.go

    		if err != nil {
    			return err
    		}
    		fi, err := src.Stat()
    		if err != nil {
    			src.Close()
    			return err
    		}
    		// Note: Not using %-16.16s format because we care
    		// about bytes, not runes.
    		name := fi.Name()
    		if len(name) > 16 {
    			name = name[:16]
    		} else {
    			name += strings.Repeat(" ", 16-len(name))
    		}
    		size := fi.Size()
    		fmt.Fprintf(w, "%s%-12d%-6d%-6d%-8o%-10d`\n",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 15:37:44 UTC 2024
    - 23K bytes
    - Viewed (0)
  5. src/regexp/exec_test.go

    				// RE2's \B considers every byte position,
    				// so it sees 'not word boundary' in the
    				// middle of UTF-8 sequences. This package
    				// only considers the positions between runes,
    				// so it disagrees. Skip those cases.
    				continue
    			}
    			res := strings.Split(line, ";")
    			if len(res) != len(run) {
    				t.Fatalf("%s:%d: have %d test results, want %d", file, lineno, len(res), len(run))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:36:03 UTC 2024
    - 20.7K bytes
    - Viewed (0)
  6. src/fmt/scan.go

    // If the first byte is hex and the second is not, processing stops.
    func (s *ss) hexByte() (b byte, ok bool) {
    	rune1 := s.getRune()
    	if rune1 == eof {
    		return
    	}
    	value1, ok := hexDigit(rune1)
    	if !ok {
    		s.UnreadRune()
    		return
    	}
    	value2, ok := hexDigit(s.mustReadRune())
    	if !ok {
    		s.errorString("illegal hex digit")
    		return
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 21:56:20 UTC 2024
    - 31.9K bytes
    - Viewed (0)
  7. src/bufio/bufio.go

    	b.lastRuneSize = -1
    	return nil
    }
    
    // ReadRune reads a single UTF-8 encoded Unicode character and returns the
    // rune and its size in bytes. If the encoded rune is invalid, it consumes one byte
    // and returns unicode.ReplacementChar (U+FFFD) with a size of 1.
    func (b *Reader) ReadRune() (r rune, size int, err error) {
    	for b.r+utf8.UTFMax > b.w && !utf8.FullRune(b.buf[b.r:b.w]) && b.err == nil && b.w-b.r < len(b.buf) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 12 14:39:08 UTC 2023
    - 21.8K bytes
    - Viewed (0)
  8. src/strings/strings.go

    	// the closure once per rune.
    	prev := ' '
    	return Map(
    		func(r rune) rune {
    			if isSeparator(prev) {
    				prev = r
    				return unicode.ToTitle(r)
    			}
    			prev = r
    			return r
    		},
    		s)
    }
    
    // TrimLeftFunc returns a slice of the string s with all leading
    // Unicode code points c satisfying f(c) removed.
    func TrimLeftFunc(s string, f func(rune) bool) string {
    	i := indexFunc(s, f, false)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 16:48:16 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  9. src/html/template/escape.go

    	i := bytes.IndexAny(s, delimEnds[c.delim])
    	if i == -1 {
    		i = len(s)
    	}
    	if c.delim == delimSpaceOrTagEnd {
    		// https://www.w3.org/TR/html5/syntax.html#attribute-value-(unquoted)-state
    		// lists the runes below as error characters.
    		// Error out because HTML parsers may differ on whether
    		// "<a id= onclick=f("     ends inside id's or onclick's value,
    		// "<a class=`foo "        ends inside a value,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 02 15:18:39 UTC 2023
    - 32.4K bytes
    - Viewed (0)
  10. src/go/internal/gccgoimporter/parser.go

    	}
    
    	defer func(w uint64) {
    		p.scanner.Whitespace = w
    	}(p.scanner.Whitespace)
    	p.scanner.Whitespace = 0
    
    	// We should now have p.tok pointing to the final newline.
    	// The next runes from the scanner should be the type data.
    
    	var sb strings.Builder
    	for sb.Len() < total {
    		r := p.scanner.Next()
    		if r == scanner.EOF {
    			p.error("unexpected EOF")
    		}
    		sb.WriteRune(r)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 02 23:14:07 UTC 2024
    - 31.2K bytes
    - Viewed (0)
Back to top