| Crates.io | const-utf16 |
| lib.rs | const-utf16 |
| version | 0.2.1 |
| created_at | 2021-02-06 17:23:50.224458+00 |
| updated_at | 2021-03-11 13:55:05.54527+00 |
| description | Utf8 to utf16 conversion functions for use in const contexts |
| homepage | |
| repository | https://github.com/rylev/const-utf16 |
| max_upload_size | |
| id | 351584 |
| size | 20,464 |
utf8 to utf16 conversion functions useable in const contexts.
const HELLO_WORLD_UTF16: &[u16] = const_utf16::encode!("Hello, world!");
This crate requires Rust 1.46.0 or newer due to the use of some const expression features.
This code is largely inspired by the Rust core utf16 conversion code.