Skip to main content

strip_bom

Function strip_bom 

Source
pub fn strip_bom(src: &str) -> &str
Expand description

Strip a leading UTF-8 BOM (\u{feff}) from src, if present.

Pass the result consistently to parse_module, anchor_of_subslice, and SpanIndex::new so that all byte offsets are relative to the same buffer.