dctext_to_dcstring

Function dctext_to_dcstring 

Source
pub fn dctext_to_dcstring(document: &[u8]) -> Result<ConversionOutput<DcString>>
Expand description

Parses a DcText document (&[u8]) into a DcList (Vec<u128>).

Plain text characters become their corresponding Unicode codepoint IDs (0..=0x10FFFF). Tokens in @<dcid>@ format are parsed into u128 values. @L<number>@ tokens expand to 1114408 followed by the Dc number representation of <number>. @@ tokens represent codepoint 64 (@).

§Errors

Parses a DcText document (&[u8]) directly into a DcString.

Plain text characters become their corresponding Unicode codepoint IDs (0..=0x10FFFF). Tokens in @<dcid>@ format are parsed into u128 values. @L<number>@ tokens expand to 1114408 followed by the Dc number representation of <number>. @@ tokens represent codepoint 64 (@).

§Errors

Returns an error if the document contains invalid UTF-8 or malformed syntax.