#utf-16 #literals #plugin #encoding

nightly encoding_literals

UTF-16 literals for Rust

3 releases

Uses old Rust 2015

0.1.2 Sep 27, 2015
0.1.1 Sep 22, 2015
0.1.0 Sep 21, 2015

#27 in #utf-16

Download history 8/week @ 2024-02-26 66/week @ 2024-04-01

66 downloads per month

Apache-2.0

6KB
64 lines

UTF-16 literals for Rust

This crate provides a plugin that allows you to add UTF-16 string literals to your Rust code.

Example:

#![plugin(encoding_literals)]

pub fn something() {
    // The type of this variable will be [u8; N] where N is the length of the UTF-16 encoded sequence in bytes.
    let utf_literal = utf16!("This string will be a UTF-16 byte sequence");
}

Dependencies

~2MB
~30K SLoC