You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduce a new core::str_bytes module with types and functions which
handle string-like bytes slices. String-like means that they code
treats UTF-8 byte sequences as characters within such slices but
doesn’t assume that the slices are well-formed.
A `str` is trivially a bytes sequence that the module can handle but
so is OsStr (which is WTF-8 on Windows and unstructured bytes on
Unix).
Move bunch of code (most notably implementation of the two-way
string-matching algorithm) from core::str to core::str_bytes.
Note that this likely introduces regression in some of the str
function performance (since the new code cannot assume well-formed
UTF-8). This is going to be rectified by following commit which will
make it again possible for the code to assume bytes format. This is
not done in this commit to keep it smaller.
0 commit comments