- Error types now implement
core::error::Error Str::recode_into- non-allocating variant of recode, returns theStrwrittenStr::get_unchecked{,_mut}- unchecked variants ofStr::get{,_mut}- New Encodings:
- Shift-JIS
- ISO/IEC 8859-1
- UTF-16 BE/LE character boundary detection
- [Perf] Use a perfect hash function for character encoding
String::from_bytesandCString::from_stdnow returnOwnValidateError, which provides access to the original bytes.- Split
Utf32intoUtf32LEandUtf32BE.Utf32is now an alias to the native endian variant.
encoding::AlwaysValid, for encodings with no invalid byte patternsStr::from_bytes_infallible{,_mut}- infallible variant offrom_bytes{,_mut}String::from_bytes_infallible- infallible variant offrom_bytesCStr::from_bytes_{with,til}_nul_valid{,_mut}- no encoding validation variants of equivalent methods.CString::new_valid- no encoding validation variant ofnew
- Mutable
CStrcreation methodsfrom_bytes_with_nul_mutfrom_bytes_til_nul_mut
randfeature, allows encodings to also function as distributions to generate characters valid for that encoding.- Added benchmarks
- New Encodings:
- JIS X 0201
- JIS X 0208
- Mac Roman
- Win1252 encoding validation mistakenly banned 0x82 instead of 0x81, this has been fixed
- Win1251, Win1252, and JisX0201 had incorrect
char_lenimplementations. They will now return the correct values.
- Updated README.md, replace lib.rs docs with README.md
no_stdsupportStrandCStrare always availableStringandCStringare available onallocfeature
CString<E>- encoding-specificCStringequivalent typeCStr<E>- encoding-specificCStrequivalent type- Unlike
CStr,CStr<E>will deref toStr<E>
- Unlike
- New Encodings:
- ISO/IEC 8859-2
- ISO/IEC 8859-15
Initial release. Adds core types and the most common encodings.
Encoding- trait representing a generic encoding such as UTF-8 or Windows-1252String<E>- encoding-specificStringequivalent typeString<Utf8>is free to convert from anstd::string::String
Str<E>- encoding specificstrtypeStr<Utf8>is free to convert from astr
- New Encodings:
- ASCII
- ASCII Extended
- Variant of ASCII that supports all byte values
- UTF{8, 16LE, 16BE, 32}
- Windows-{1251, 1252}
- Windows-1252 Loose
- Variant of 1252 that supports all byte values