is_surrogate
XuAPI
pub fn is_surrogate(r int) boolPurpose
Whether it is surrogate.
Parameters
rint- rune (Unicode code point) (int)
Returns
bool — true or false
API
#unicode/utf16UTF-16 surrogates and encode/decode.
is_surrogatepub fn is_surrogate(r int) boolWhether it is surrogate.
r intbool — true or false
decode_runepub fn decode_rune(r1 int, r2 int) intDecode.
r1 intr2 intint — a value of this type
struct Pairpub struct Pair {
pub r1 int
pub r2 int
}Public struct `Pair`.
r1 intr2 intencode_runepub fn encode_rune(r int) PairEncode.
r intPair — a value of this type
encodepub fn encode(s &string) []intEncode. Throws on failure.
s &string[]int — slice result
decodepub fn decode(u &[]int) stringDecode. Throws on failure.
u &[]intstring — result string