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
This library produces a Cow<str> from its functions, which may allocate a new string if there is "prepping" to do. But would there be an efficient way to directly compare two strings as if they were string-prepped without actually doing it?
I would think it would be something like:
Akip all leading spaces, then
Any white space characters get treated like a space character and any number of space characters match one or more spaces in the other string, then
Case-fold, character by character
etc.
The theory is that a stringprep comparison could be done without ever allocating a new string. This would be a great feature to have!
In principle that seems like a thing we could add, but I'd want to make sure it was done in a way that didn't involve duplicating the prep logic twice for each variant.
Activity
sfackler commentedon Sep 1, 2023
In principle that seems like a thing we could add, but I'd want to make sure it was done in a way that didn't involve duplicating the prep logic twice for each variant.