Skip to main content

to_code_units

Function to_code_units 

Source
pub fn to_code_units(input: Option<&CssInput>) -> CssCodeUnits
Expand description

convert the css input to code units. an ascii input is read from its bytes: the code units are the bytes. the other inputs are decoded (utf-8, without byte order mark) to utf-16 code units: the positions of the tokens are utf-16 positions, like the positions in a javascript string