Expand description
Port of src/parser/input.ts.
css input: utf-8 bytes (the preferred input: the bindings pass the bytes of an ArrayBuffer) or a string. ascii
input is read from its bytes without copy: the same shared buffer is the text and the code units.
Structs§
- CssCode
Units - the css read by the tokenizer: the code units and the text
Enums§
- CssInput
- css input
Functions§
- is_
empty_ input - true if the input is empty
- rc_
bytes_ to_ str - view shared ascii / utf-8 bytes as a string without copy
- rc_
str_ to_ bytes - view a shared string as bytes without copy
- to_
code_ units - 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