tryParseXmlEncodingDeclarationAscii

fnstring tryParseXmlEncodingDeclarationAscii(const(ubyte)[] bytes) @safe

Attempts to parse the XML declaration encoding='...' pseudo-attribute from raw bytes.

This is used for single-byte encodings where the XML declaration itself can be parsed as ASCII.

Parameters

bytesInput byte sequence.

Returns

The declared encoding label if present, otherwise an empty string.