Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 1,328 for runes (0.3 sec)

  1. src/go/constant/value.go

    	s := strconv.Quote(x.string())
    	if utf8.RuneCountInString(s) > maxLen {
    		// The string without the enclosing quotes is greater than maxLen-2 runes
    		// long. Remove the last 3 runes (including the closing '"') by keeping
    		// only the first maxLen-3 runes; then add "...".
    		i := 0
    		for n := 0; n < maxLen-3; n++ {
    			_, size := utf8.DecodeRuneInString(s[i:])
    			i += size
    		}
    		s = s[:i] + "..."
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 34K bytes
    - Viewed (0)
  2. src/html/template/js.go

    	return s
    }
    
    // replace replaces each rune r of s with replacementTable[r], provided that
    // r < len(replacementTable). If replacementTable[r] is the empty string then
    // no replacement is made.
    // It also replaces runes U+2028 and U+2029 with the raw strings `\u2028` and
    // `\u2029`.
    func replace(s string, replacementTable []string) string {
    	var b strings.Builder
    	r, w, written := rune(0), 0, 0
    	for i := 0; i < len(s); i += w {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  3. src/fmt/example_test.go

    	// Result: (110.7+22.5i) (110.7+22.5i) (110.70+22.50i) (1.11e+02+2.25e+01i)
    
    	// Runes are integers but when printed with %c show the character with that
    	// Unicode value. The %q verb shows them as quoted characters, %U as a
    	// hex Unicode code point, and %#U as both a code point and a quoted
    	// printable form if the rune is printable.
    	smile := '😀'
    	fmt.Printf("%v %d %c %q %U %#U\n", smile, smile, smile, smile, smile, smile)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 21:03:10 UTC 2019
    - 11.8K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/third_party/forked/golang/json/fields.go

    // 3) asciiEqualFold, no special, but includes non-letters (including _)
    // 4) simpleLetterEqualFold, no specials, no non-letters.
    //
    // The letters S and K are special because they map to 3 runes, not just 2:
    //  * S maps to s and to U+017F 'Å¿' Latin small letter long s
    //  * k maps to K and to U+212A 'K' Kelvin sign
    // See http://play.golang.org/p/tTxjOc0OGo
    //
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jun 25 16:23:43 UTC 2022
    - 13.1K bytes
    - Viewed (0)
  5. src/regexp/exec.go

    // It records the pair of relevant runes and does not
    // determine the implied flags until absolutely necessary
    // (most of the time, that means never).
    type lazyFlag uint64
    
    func newLazyFlag(r1, r2 rune) lazyFlag {
    	return lazyFlag(uint64(r1)<<32 | uint64(uint32(r2)))
    }
    
    func (f lazyFlag) match(op syntax.EmptyOp) bool {
    	if op == 0 {
    		return true
    	}
    	r1 := rune(f >> 32)
    	if op&syntax.EmptyBeginLine != 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Jun 04 20:10:54 UTC 2022
    - 12.3K bytes
    - Viewed (0)
  6. src/text/template/parse/lex.go

    }
    
    // next returns the next rune in the input.
    func (l *lexer) next() rune {
    	if int(l.pos) >= len(l.input) {
    		l.atEOF = true
    		return eof
    	}
    	r, w := utf8.DecodeRuneInString(l.input[l.pos:])
    	l.pos += Pos(w)
    	if r == '\n' {
    		l.line++
    	}
    	return r
    }
    
    // peek returns but does not consume the next rune in the input.
    func (l *lexer) peek() rune {
    	r := l.next()
    	l.backup()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 04 22:36:12 UTC 2022
    - 18.1K bytes
    - Viewed (0)
  7. src/encoding/csv/reader.go

    type Reader struct {
    	// Comma is the field delimiter.
    	// It is set to comma (',') by NewReader.
    	// Comma must be a valid rune and must not be \r, \n,
    	// or the Unicode replacement character (0xFFFD).
    	Comma rune
    
    	// Comment, if not 0, is the comment character. Lines beginning with the
    	// Comment character without preceding whitespace are ignored.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 21:32:28 UTC 2024
    - 14.2K bytes
    - Viewed (0)
  8. src/cmd/internal/archive/archive.go

    		Data:  Data{off + entryLen, size},
    	})
    }
    
    // exactly16Bytes truncates the string if necessary so it is at most 16 bytes long,
    // then pads the result with spaces to be exactly 16 bytes.
    // Fmt uses runes for its width calculation, but we need bytes in the entry header.
    func exactly16Bytes(s string) string {
    	for len(s) > 16 {
    		_, wid := utf8.DecodeLastRuneInString(s)
    		s = s[:len(s)-wid]
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 15 15:39:57 UTC 2023
    - 12.1K bytes
    - Viewed (0)
  9. src/regexp/syntax/parse_test.go

    		sep := ""
    		for i := 0; i < len(re.Rune); i += 2 {
    			b.WriteString(sep)
    			sep = " "
    			lo, hi := re.Rune[i], re.Rune[i+1]
    			if lo == hi {
    				fmt.Fprintf(b, "%#x", lo)
    			} else {
    				fmt.Fprintf(b, "%#x-%#x", lo, hi)
    			}
    		}
    	}
    	b.WriteByte('}')
    }
    
    func mkCharClass(f func(rune) bool) string {
    	re := &Regexp{Op: OpCharClass}
    	lo := rune(-1)
    	for i := rune(0); i <= unicode.MaxRune; i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 16 16:02:30 UTC 2023
    - 16.2K bytes
    - Viewed (0)
  10. 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)
Back to top