← Standard library

Utf8Decoded

struct Utf8Decoded
import 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.

String.wax:1199

Members

valuefield

public char value

The decoded Unicode code point, or U+FFFD for a lossy decode.

String.wax:1203

widthfield

public int32 width

The source byte count consumed. A malformed byte consumes one byte in lossy decoding.

String.wax:1207

constructorconstructor

public constructor (char value, int32 width)

Stores a decoded value and its source byte width.

String.wax:1211

ToStringmethod

public fn ToString() : string

Provided by the compiler.

ToStringBuffermethod

public fn ToStringBuffer(StringBuilder builder) : int32

Provided by the compiler.