const-utf16

Crates.ioconst-utf16
lib.rsconst-utf16
version0.2.1
sourcesrc
created_at2021-02-06 17:23:50.224458
updated_at2021-03-11 13:55:05.54527
descriptionUtf8 to utf16 conversion functions for use in const contexts
homepage
repositoryhttps://github.com/rylev/const-utf16
max_upload_size
id351584
size20,464
Ryan Levick (rylev)

documentation

https://docs.rs/const-utf16

README

crates.io docs.rs Build and Test

const-utf16

utf8 to utf16 conversion functions useable in const contexts.

Use

const HELLO_WORLD_UTF16: &[u16] = const_utf16::encode!("Hello, world!");

Minimum Supported Rust Version (MSRV)

This crate requires Rust 1.46.0 or newer due to the use of some const expression features.

Attribution

This code is largely inspired by the Rust core utf16 conversion code.

Commit count: 19

cargo fmt