Utf8Decoded
struct Utf8Decodedimport Utf8Decoded from Wax;A low-level UTF-8 decode result containing a code point and the number of source bytes consumed. The width is not necessarily the re-encoded width when malformed input becomes U+FFFD.
Members
valuefield
public char valueThe decoded Unicode code point, or U+FFFD for a lossy decode.
widthfield
public int32 widthThe source byte count consumed. A malformed byte consumes one byte in lossy decoding.
constructorconstructor
public constructor (char value, int32 width)Stores a decoded value and its source byte width.
ToStringmethod
public fn ToString() : stringProvided by the compiler.
ToStringBuffermethod
public fn ToStringBuffer(StringBuilder builder) : int32Provided by the compiler.