#wide #string #win32 #utf-16 #utf-32

no-std widestring

A wide string Rust library for converting to and from wide strings, such as those often used in Windows API or other FFI libaries. Both u16 and u32 string types are provided, including support for UTF-16 and UTF-32, malformed encoding, C-style strings, etc.

10 unstable releases

Uses new Rust 2021

1.0.0-beta.1 Nov 8, 2021
0.5.1 Oct 23, 2021
0.4.3 Oct 5, 2020
0.4.2 Jun 9, 2020
0.1.0 Jan 25, 2016

#5 in FFI

Download history 62543/week @ 2021-09-27 88057/week @ 2021-10-04 78760/week @ 2021-10-11 73148/week @ 2021-10-18 72269/week @ 2021-10-25 69804/week @ 2021-11-01 67490/week @ 2021-11-08 61499/week @ 2021-11-15 56288/week @ 2021-11-22 57627/week @ 2021-11-29 56572/week @ 2021-12-06 56803/week @ 2021-12-13 39279/week @ 2021-12-20 32418/week @ 2021-12-27 51053/week @ 2022-01-03 57350/week @ 2022-01-10

183,490 downloads per month
Used in 875 crates (92 directly)

MIT/Apache

510KB
6.5K SLoC

widestring

Crates.io Documentation Crates.io Build status

A wide string Rust library for converting to and from wide strings, such as those often used in Windows API or other FFI libaries. Both u16 and u32 string types are provided, including support for UTF-16 and UTF-32, malformed encoding, C-style strings, etc.

Macros for converting string literals to UTF-16 and UTF-32 strings at compile time are also included.

Documentation

Optional Features

  • alloc - Enabled by default. Enable use of the alloc crate when not using the std library.

    This enables the owned string types and aliases.

  • std - Enabled by default. Enable features that depend on the Rust std library, including everything in the alloc feature.

License

This library is distributed under the terms of either of:

at your option.

This project is REUSE-compliant. Copyrights are retained by their contributors. Some files may include explicit copyright notices and/or license SPDX identifiers. For full authorship information, see the version control history.

Contributing

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

No runtime deps

#a