Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for surr2 (0.04 sec)

  1. src/unicode/utf16/utf16.go

    // the Unicode replacement code point U+FFFD.
    func DecodeRune(r1, r2 rune) rune {
    	if surr1 <= r1 && r1 < surr2 && surr2 <= r2 && r2 < surr3 {
    		return (r1-surr1)<<10 | (r2 - surr2) + surrSelf
    	}
    	return replacementChar
    }
    
    // EncodeRune returns the UTF-16 surrogate pair r1, r2 for the given rune.
    // If the rune is not a valid Unicode code point or does not need encoding,
    // EncodeRune returns U+FFFD, U+FFFD.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 19:08:48 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  2. 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)
  3. src/unicode/utf16/utf16_test.go

    	{'\U0010FFFD', false}, // PRIVATE USE CHARACTER-10FFFD (last Unicode code point)
    
    	{rune(0xd7ff), false}, // surr1-1
    	{rune(0xd800), true},  // surr1
    	{rune(0xdc00), true},  // surr2
    	{rune(0xe000), false}, // surr3
    	{rune(0xdfff), true},  // surr3-1
    }
    
    func TestIsSurrogate(t *testing.T) {
    	for i, tt := range surrogateTests {
    		got := IsSurrogate(tt.r)
    		if got != tt.want {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 19:08:48 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  4. src/runtime/os_windows.go

    )
    
    // writeConsole writes bufLen bytes from buf to the console File.
    // It returns the number of bytes written.
    func writeConsole(handle uintptr, buf unsafe.Pointer, bufLen int32) int {
    	const surr2 = (surrogateMin + surrogateMax + 1) / 2
    
    	// Do not use defer for unlock. May cause issues when printing a panic.
    	lock(&utf16ConsoleBackLock)
    
    	b := (*[1 << 30]byte)(buf)[:bufLen]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 22:55:25 UTC 2024
    - 41.5K bytes
    - Viewed (0)
  5. src/unicode/utf16/export_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package utf16
    
    // Extra names for constants so we can validate them during testing.
    const (
    	Surr1           = surr1
    	Surr3           = surr3
    	SurrSelf        = surrSelf
    	MaxRune         = maxRune
    	ReplacementChar = replacementChar
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 07 19:08:48 UTC 2024
    - 394 bytes
    - Viewed (0)
  6. RELEASE.md

    Richtsfeld, Rodrigo Silveira, Ruizhi, Santosh Kumar, Seb Bro, Sergei Lebedev,
    sfujiwara, Shaba Abhiram, Shashi, SneakyFish5, Soila Kavulya, Stefan Dyulgerov,
    Steven Winston, Sunitha Kambhampati, Surry Shome, Taehoon Lee, Thor Johnsen,
    Tristan Rice, TShapinsky, tucan, tucan9389, Vicente Reyes, Vilmar-Hillow, Vitaly
    Lavrukhin, wangershi, weidan.kong, weidankong, Wen-Heng (Jack) Chung, William D.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 23:24:08 UTC 2024
    - 730.3K bytes
    - Viewed (0)
Back to top