Source File
utf16.go
Belonging Package
unicode/utf16
package utf16
const (
replacementChar = '\uFFFD' // Unicode replacement character
maxRune = '\U0010FFFF' // Maximum valid Unicode code point.
)
func ( rune) (, rune) {
if < surrSelf || > maxRune {
return replacementChar, replacementChar
}
-= surrSelf
return surr1 + (>>10)&0x3ff, surr2 + &0x3ff
}
[] = uint16()
++
, := EncodeRune()
[] = uint16()
[+1] = uint16()
+= 2
default:
[] = uint16(replacementChar)
++
}
}
return [:]
}
[] = DecodeRune(rune(), rune([+1]))
++
[] = replacementChar
}
++
}
return [:]
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |