Skip to content

String compare #7

Description

@JonathanWilbur

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:

  1. Akip all leading spaces, then
  2. 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
  3. Case-fold, character by character
  4. 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions