- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for decodeWTF16 (0.18 sec)
-
src/syscall/export_windows_test.go
var DeleteProcThreadAttributeList = deleteProcThreadAttributeList const PROC_THREAD_ATTRIBUTE_HANDLE_LIST = _PROC_THREAD_ATTRIBUTE_HANDLE_LIST var EncodeWTF16 = encodeWTF16
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 15 09:26:16 UTC 2023 - 500 bytes - Viewed (0) -
src/syscall/wtf8_windows_test.go
f.Add(b) } f.Fuzz(func(t *testing.T, b []byte) { u16 := unsafe.Slice((*uint16)(unsafe.Pointer(unsafe.SliceData(b))), len(b)/2) got := syscall.DecodeWTF16(u16, nil) if utf8.Valid(got) { // if the input is a valid UTF-8 string, then // test that syscall.DecodeWTF16 behaves as // utf16.Decode want := utf16.Decode(u16) if string(got) != string(want) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 15 09:26:16 UTC 2023 - 4.3K bytes - Viewed (0) -
src/syscall/wtf8_windows.go
buf = append(buf, uint16(r)) i += 3 continue } } i += size buf = utf16.AppendRune(buf, r) } return buf } // decodeWTF16 returns the WTF-8 encoding of // the potentially ill-formed UTF-16 s. 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)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 15 09:26:16 UTC 2023 - 2.7K bytes - Viewed (0) -
src/syscall/syscall_windows.go
// If it is half of a pair, we will add 3 for the second surrogate // (total of 6) and overestimate by 2 bytes for the pair, // since the resulting rune only requires 4 bytes. maxLen += 3 } } buf := decodeWTF16(s, make([]byte, 0, maxLen)) return unsafe.String(unsafe.SliceData(buf), len(buf)) } // utf16PtrToString is like UTF16ToString, but takes *uint16 // as a parameter instead of []uint16.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 21 11:49:46 UTC 2024 - 52.7K bytes - Viewed (0)