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
These seem unrelated, but they're actually linked:
* If you reverse generic strings by wrapping them in `RevString` then
then this generic `reverseind` is incorrect.
* In order to have a correct generic `reverseind` one needs to assume
that `reverse(s)` returns a string of the same type and encoding as
`s` with code points in reverse order; one also needs to assume that
the code units encoding each character remain the same when reversed.
This is a valid assumption for UTF-8, UTF-16 and (trivially) UTF-32.
Reverse string search functions are pretty messed up by this and I've
fixed them well enough to work but they may be quite inefficient for
long strings now. I'm not going to spend too much time on this since
there's other work going on to generalize and unify searching APIs.
Close#22611Close#24613
See also: #10593#23612#24103
0 commit comments