Surrogate

object Surrogate

Utility class for dealing with surrogates.

Author

Mark Reinhold

Martin Buchholz

Ulf Zibis

Types

Link copied to clipboard
class Generator

Surrogate generation support. Charset implementations may use instances of this class to handle the details of generating UTF-16 surrogate pairs.

Link copied to clipboard
class Parser

Surrogate parsing support. Charset implementations may use instances of this class to handle the details of parsing UTF-16 surrogate pairs.

Properties

Link copied to clipboard
val MAX: Char
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val MIN: Char
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun high(uc: Int): Char

Returns the high UTF-16 surrogate for the given supplementary UCS-4 character. Use of Character.highSurrogate is generally preferred.

Link copied to clipboard
fun is(c: Int): Boolean

Tells whether or not the given value is in the surrogate range. Use of Character.isSurrogate is generally preferred.

Link copied to clipboard
fun isHigh(c: Int): Boolean

Tells whether or not the given value is in the high surrogate range. Use of Character.isHighSurrogate is generally preferred.

Link copied to clipboard
fun isLow(c: Int): Boolean

Tells whether or not the given value is in the low surrogate range. Use of Character.isLowSurrogate is generally preferred.

Link copied to clipboard
fun low(uc: Int): Char

Returns the low UTF-16 surrogate for the given supplementary UCS-4 character. Use of Character.lowSurrogate is generally preferred.

Link copied to clipboard

Tells whether or not the given UCS-4 character must be represented as a surrogate pair in UTF-16. Use of Character.isSupplementaryCodePoint is generally preferred.

Link copied to clipboard
fun toUCS4(c: Char, d: Char): Int

Converts the given surrogate pair into a 32-bit UCS-4 character. Use of Character.toCodePoint is generally preferred.