Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 530 for rune1 (0.03 sec)

  1. src/strconv/makeisprint.go

    		fmt.Fprintf(&buf, "\t%#04x,\n", r-0x10000)
    	}
    	fmt.Fprintf(&buf, "}\n\n")
    
    	// The list of graphic but not "printable" runes is short. Just make one easy table.
    	fmt.Fprintf(&buf, "// isGraphic lists the graphic runes not matched by IsPrint.\n")
    	fmt.Fprintf(&buf, "var isGraphic = []uint16{\n")
    	for r := rune(0); r <= unicode.MaxRune; r++ {
    		if unicode.IsPrint(r) != unicode.IsGraphic(r) {
    			// Sanity check.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 11 18:56:17 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  2. test/string_lit.go

    	r = -1
    	s = string(r)
    	assert(s, "\xef\xbf\xbd", "negative rune")
    
    	// the large rune tests again, this time using constants instead of a variable.
    	// these conversions will be done at compile time.
    	s = string(0x10ffff) // largest rune value
    	assert(s, "\xf4\x8f\xbf\xbf", "largest rune constant")
    	s = string(0x10ffff + 1)
    	assert(s, "\xef\xbf\xbd", "too-large rune constant")
    	s = string(0xD800)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 13 01:17:02 UTC 2013
    - 3.6K bytes
    - Viewed (0)
  3. src/cmd/go/internal/work/exec_test.go

    	rBuffer := make([]rune, nRunes)
    	buf := bytes.NewBuffer([]byte(string(rBuffer)))
    
    	seed := time.Now().UnixNano()
    	t.Logf("rand seed: %v", seed)
    	rng := rand.New(rand.NewSource(seed))
    
    	for i := 0; i < 50; i++ {
    		// Generate a random string of runes.
    		buf.Reset()
    		for buf.Len() < sys.ExecArgLengthLimit+1 {
    			var r rune
    			for {
    				r = rune(rng.Intn(utf8.MaxRune + 1))
    				if utf8.ValidRune(r) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Oct 02 13:15:42 UTC 2021
    - 1.8K bytes
    - Viewed (0)
  4. src/syscall/wtf8_windows.go

    func decodeWTF16(s []uint16, buf []byte) []byte {
    	for i := 0; i < len(s); i++ {
    		var ar rune
    		switch r := s[i]; {
    		case r < surr1, surr3 <= r:
    			// normal rune
    			ar = rune(r)
    		case surr1 <= r && r < surr2 && i+1 < len(s) &&
    			surr2 <= s[i+1] && s[i+1] < surr3:
    			// valid surrogate sequence
    			ar = utf16.DecodeRune(rune(r), rune(s[i+1]))
    			i++
    		default:
    			// WTF-8 fallback.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 15 09:26:16 UTC 2023
    - 2.7K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/text/unicode/norm/forminfo.go

    func (p Properties) CCC() uint8 {
    	if p.index >= firstCCCZeroExcept {
    		return 0
    	}
    	return ccc[p.ccc]
    }
    
    // LeadCCC returns the CCC of the first rune in the decomposition.
    // If there is no decomposition, LeadCCC equals CCC.
    func (p Properties) LeadCCC() uint8 {
    	return ccc[p.ccc]
    }
    
    // TrailCCC returns the CCC of the last rune in the decomposition.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 13:01:26 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  6. src/unicode/utf8/utf8_test.go

    		if n := runtimeRuneCount(ts); n != count {
    			t.Errorf("%q: len([]rune()) counted %d runes; got %d from RuneCountInString", ts, n, count)
    			break
    		}
    
    		runes := []rune(ts)
    		if n := len(runes); n != count {
    			t.Errorf("%q: []rune() has length %d; got %d from RuneCountInString", ts, n, count)
    			break
    		}
    		i := 0
    		for _, r := range ts {
    			if r != runes[i] {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 07 06:17:15 UTC 2022
    - 16.2K bytes
    - Viewed (0)
  7. src/vendor/golang.org/x/text/unicode/norm/forminfo.go

    func (p Properties) CCC() uint8 {
    	if p.index >= firstCCCZeroExcept {
    		return 0
    	}
    	return ccc[p.ccc]
    }
    
    // LeadCCC returns the CCC of the first rune in the decomposition.
    // If there is no decomposition, LeadCCC equals CCC.
    func (p Properties) LeadCCC() uint8 {
    	return ccc[p.ccc]
    }
    
    // TrailCCC returns the CCC of the last rune in the decomposition.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 10 18:59:52 UTC 2023
    - 8.7K bytes
    - Viewed (0)
  8. test/switch5.go

    // written, not just their values. Particularly useful for runes.
    func f8(r rune) {
    	const x = 10
    	switch r {
    	case 33, 33: // ERROR "duplicate case (33 in switch)?"
    	case 34, '"': // ERROR "duplicate case '"' .value 34. in switch"
    	case 35, rune('#'): // ERROR "duplicate case (rune.'#'. .value 35. in switch)?"
    	case 36, rune(36): // ERROR "duplicate case (rune.36. .value 36. in switch)?"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 14 21:28:48 UTC 2020
    - 2.3K bytes
    - Viewed (0)
  9. src/unicode/utf16/utf16.go

    func Decode(s []uint16) []rune {
    	// Preallocate capacity to hold up to 64 runes.
    	// Decode inlines, so the allocation can live on the stack.
    	buf := make([]rune, 0, 64)
    	return decode(s, buf)
    }
    
    // decode appends to buf the Unicode code point sequence represented
    // by the UTF-16 encoding s and return the extended buffer.
    func decode(s []uint16, buf []rune) []rune {
    	for i := 0; i < len(s); i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 19:08:48 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/text/cases/info.go

    // is undesirable for our purposes. ICU prevents breaks in such cases as well.
    
    // isBreak returns whether this rune should introduce a break.
    func (c info) isBreak() bool {
    	return c.cccVal() == cccBreak
    }
    
    // isLetter returns whether the rune is of break type ALetter, Hebrew_Letter,
    // Numeric, ExtendNumLet, or Extend.
    func (c info) isLetter() bool {
    	ccc := c.cccVal()
    	if ccc == cccZero {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 24 13:01:26 UTC 2024
    - 2.9K bytes
    - Viewed (0)
Back to top