object StringUtil
- Alphabetic
- By Inheritance
- StringUtil
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
blockStringValue(rawString: String): String
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.
- def camelCaseToUnderscore(name: String): String
- def charHex(ch: Char): String
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def escapeBlockString(str: String): String
- def escapeString(str: String): String
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
lexicalDistance(a: String, b: String): Int
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
- returns
distance in number of edits
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def orList(items: Seq[String], limit: Int = 5): String
-
def
quotedOrList(items: Seq[String], limit: Int = 5): String
Given [ A, B, C ] return '"A", "B" or "C"'.
-
def
suggestionList(input: String, options: Seq[String]): Seq[String]
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.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()