Function xmldecl::parse [−][src]
pub fn parse(bytes: &[u8]) -> Option<&'static Encoding>
Extracts an encoding from an ASCII-based bogo-XML declaration.
bytes
must the prefix of a text/html
resource. If it is longer
than 1024 bytes, only the first 1024 bytes are examined.
The intended use is that when the meta
prescan fails, the HTML
parser will have buffered the first 1024 bytes at which point they
should be passed to this function.