Skip to main content

Module strings

Module strings 

Source
Expand description

The two string orders Zero uses.

  • UTF-8 byte order (code point order) is what compareUTF8 and SQLite use. Row values, primary keys, and AST normalization sort this way. It is Rust’s own str order.
  • UTF-16 code unit order is what JS < and Array#sort use. Object keys are sorted this way before hashing. It differs from code point order only between U+E000..=U+FFFF and the supplementary planes.

Functions§

utf8
compareUTF8(a, b).
utf16
JS a < b ? -1 : a > b ? 1 : 0 for strings.