Open Plecra opened 4 years ago
It'd be handy to have a type that guaranteed the encoding like str does. There could be an optional dependency on something like widestring, or just a very simple wrapper type that users can write conversions for.
str
widestring
pub struct Utf16([u16]); impl Utf16 { pub unsafe fn from_utf16_unchecked(utf16: &[u16]) -> &Self; pub fn as_wide(&self) -> &[u16]; }
I'm not sure if a proc-macro crate can export non-proc-macro items.
If it can, i'd accept some sort of PR for this being an optional thing.
oh but this would probably work in v2!
It'd be handy to have a type that guaranteed the encoding like
str
does. There could be an optional dependency on something likewidestring
, or just a very simple wrapper type that users can write conversions for.