Expand description
String helpers: case conversion, UTF-8-safe truncation, unique-shorthand resolution, and “did you mean?” suggestions.
Structs§
- Ambiguity
- The candidates a shorthand matched when more than one qualified.
Constants§
- DEFAULT_
SUGGESTION_ DISTANCE - The default maximum edit distance for a suggestion to be offered.
Functions§
- nearest
- Return the candidate nearest to
inputwithinDEFAULT_SUGGESTION_DISTANCE. - nearest_
within - Return the candidate nearest to
inputwithinmax_distanceedits. - resolve_
unique - Resolve
inputto the unique candidate whose key equals it. - to_
camel_ case - Convert a string to
camelCase. - to_
kebab_ case - Convert a string to
kebab-case. - to_
snake_ case - Convert a string to
snake_case. - truncate
- Safely truncates a string to a UTF-8-safe prefix sized for
truncate_owned. - truncate_
owned - Safely truncates an owned string to a max byte-length.