StringUtil
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
StringUtil.type
Members list
Value members
Concrete methods
Computes the lexical distance between strings A and B.
Computes the lexical distance between strings A and B.
The "distance" between two strings is given by counting the minimum number of edits needed to transform string A into string B. An edit can be an insertion, deletion, or substitution of a single character, or a swap of two adjacent characters.
This distance can be useful for detecting typos in input or sorting
Attributes
- Returns
-
distance in number of edits
Given [ A, B, C ] return '"A", "B" or "C"'.
Given [ A, B, C ] return '"A", "B" or "C"'.
Attributes
Given an invalid input string and a list of valid options, returns a filtered list of valid options sorted based on their similarity with the input.
Given an invalid input string and a list of valid options, returns a filtered list of valid options sorted based on their similarity with the input.
Attributes
Deprecated methods
Produces the value of a block string from its parsed raw value, similar to Coffeescript's block string, Python's docstring trim or Ruby's strip_heredoc.
Produces the value of a block string from its parsed raw value, similar to Coffeescript's block string, Python's docstring trim or Ruby's strip_heredoc.
This implements the GraphQL spec's BlockStringValue() static algorithm.
Attributes
- Deprecated
- true