rustdesk/vendor/utf16string
2024-10-11 18:43:02 +03:00
..
benches Performed vendorization 2024-10-11 18:43:02 +03:00
src Performed vendorization 2024-10-11 18:43:02 +03:00
.cargo-checksum.json Performed vendorization 2024-10-11 18:43:02 +03:00
Cargo.toml Performed vendorization 2024-10-11 18:43:02 +03:00
LICENSE-APACHE Performed vendorization 2024-10-11 18:43:02 +03:00
LICENSE-MIT Performed vendorization 2024-10-11 18:43:02 +03:00
README.md Performed vendorization 2024-10-11 18:43:02 +03:00

UTF-16 string types

This crate provides two string types to work with UTF-16 encoded bytes, they are directly analogous to how String and &str work with UTF-8 encoded bytes.

UTF-16 can be encoded in little- and big-endian byte order, this crate identifies which encoding the types contain to using a generic byteorder type, thus the main types exposed are:

  • &WStr<ByteOrder>
  • WString<ByteOrder>

These types aim to behave very similar to the standard libarary &str and String types. While many APIs are already covered, feel free to contribute more methods.

Documentation is at docs.rs. Currently a lot of documentation is rather terse, referring to the matching methods on the string types in the standard library is best in those cases. Feel free to contribute more exhaustive in-line docs.