Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 245 for rune1 (0.13 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. src/vendor/golang.org/x/text/unicode/bidi/prop.go

    	return c
    }
    
    // IsBracket reports whether the rune is a bracket.
    func (p Properties) IsBracket() bool { return p.entry&0xF0 != 0 }
    
    // IsOpeningBracket reports whether the rune is an opening bracket.
    // IsBracket must return true.
    func (p Properties) IsOpeningBracket() bool { return p.entry&openMask != 0 }
    
    // TODO: find a better API and expose.
    func (p Properties) reverseBracket(r rune) rune {
    	return xorMasks[p.entry>>xorMaskShift] ^ r
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 11 20:28:54 UTC 2019
    - 5.7K bytes
    - Viewed (0)
  10. test/typeparam/issue23536.go

    // license that can be found in the LICENSE file.
    
    // Test case where a slice of a user-defined byte type (not uint8 or byte) is
    // converted to a string.  Same for slice of runes.
    
    package main
    
    type MyByte byte
    
    type MyRune rune
    
    func f[T []MyByte](x T) string {
    	return string(x)
    }
    
    func g[T []MyRune](x T) string {
    	return string(x)
    }
    
    func main() {
    	var y []MyByte
    	_ = f(y)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 556 bytes
    - Viewed (0)
Back to top