Feature gate: #![feature(str_from_utf16_endian)]
This is a tracking issue for versions of String::from_utf16
which take &[u8]
and use a specific endianness.
impl String { fn from_utf16le(v: &[u8]) -> Result<String, FromUtf16Error>; fn from_utf16le_lossy(v: &[u8]) -> String; fn from_utf16be(v: &[u8]) -> Result<String, FromUtf16Error>; fn from_utf16be_lossy(v: &[u8]) -> String; }Steps / History
from_utf16le
, from_utf16_le
, from_le_utf16
, from_le_utf16_bytes
, and other such combinations.with_capacity
+push
implementation used for from_utf16
while collect
doesn't reserve capacity? ( Collecting into a Result<Vec<_>> doesn't reserve the capacity in advance #48994)FromUtf16Error
currently displays as "invalid utf-16: lone surrogate found"
which isn't correct for an error due to odd byte length.
from_utf16
method takes &[u16]
so can't have the odd-length problem that &[u8]
can.RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4