decode

Decodes a character from a UTF-16 sequence.

  1. dchar decode(cstring str, ref size_t index)
  2. dchar decode(ref cchar* ref_p, cchar* end)
  3. dchar decode(cwstring str, ref size_t index)
  4. dchar decode(ref cwchar* p, cwchar* end)
    dchar
    decode
    (
    ref cwchar* p
    ,
    cwchar* end
    )
    in { assert (p && p < end, "p is null or at the end of the string"); }
    out (c) { assert (p <= end && (isValidChar(c) || c == ERROR_CHAR)); }
  5. dchar decode(ref cwchar* p)

Parameters

p
Type: cwchar*

Start of the UTF-16 sequence.

end
Type: cwchar*

One past the end of the sequence.

Return Value

Type: dchar

ERROR_CHAR in case of an error in the sequence.

Meta