#cstring #wide #string #widestring #c-style

u16cstr

A macro for creating c-style u16 wide strings at compile time

9 unstable releases (4 breaking)

Uses new Rust 2021

0.5.0 Jun 22, 2022
0.4.0 Jun 21, 2022
0.3.1 Jun 7, 2022
0.3.0 Oct 14, 2021
0.1.1 Jul 30, 2021

#235 in Rust patterns

Download history 95/week @ 2022-03-12 87/week @ 2022-03-19 19/week @ 2022-03-26 15/week @ 2022-04-02 40/week @ 2022-04-09 153/week @ 2022-04-16 211/week @ 2022-04-23 144/week @ 2022-04-30 79/week @ 2022-05-07 124/week @ 2022-05-14 43/week @ 2022-05-21 69/week @ 2022-05-28 96/week @ 2022-06-04 45/week @ 2022-06-11 110/week @ 2022-06-18 200/week @ 2022-06-25

460 downloads per month
Used in netcorehost

MIT license

5KB

This project has been deprecated as it is now a part of widestring.

u16cstr

Build crates.io Documentation dependency status MIT

A macro for creating c-style u16 wide strings at compile time.

Example

use u16cstr::{u16cstr, u16str};
use widestring::{U16CString, U16String, U16CStr, U16Str};

// c-style terminated wide string
const wide_c_string: &U16CStr = u16cstr!("Test");
assert_eq!(wide_c_string, U16CString::from_str("Test").unwrap().as_ucstr());

// non-terminated wide string
const wide_string: &U16Str = u16str!("Test");
assert_eq!(wide_string, U16String::from_str("Test").as_ustr());

License

Licensed under MIT license (LICENSE or http://opensource.org/licenses/MIT)

Dependencies

~515KB