implicit final class LumAICommonStringWrapper extends AnyVal
- Alphabetic
- By Inheritance
- LumAICommonStringWrapper
- AnyVal
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new LumAICommonStringWrapper(str: String)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
##(): Int
- Definition Classes
- Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
canonicalUnicode: String
Canonical unicode representation.
Canonical unicode representation. Uses NFC as recommended by the W3C in https://www.w3.org/TR/charmod-norm/
-
def
capitalizeFully: String
Converts all the whitespace separated words in the string into capitalized words, that is each word is made up of a titlecase character and then a series of lowercase characters.
-
def
center(size: Int, padStr: String): String
Centers a String in a larger String of the specified size.
Centers a String in a larger String of the specified size. Uses a supplied String as the value to pad the String with.
-
def
center(size: Int, padChar: Char): String
Centers a String in a larger String of the specified size.
Centers a String in a larger String of the specified size. Uses a supplied character as the value to pad the String with.
-
def
center(size: Int): String
Centers a String in a larger String of the specified size using the space character (' ').
-
def
escapeCsv: String
Returns a String value for a CSV column enclosed in double quotes, if required.
-
def
escapeHtml: String
Escapes the characters in a String using HTML entities.
-
def
escapeJava: String
Escapes the characters in a String using Java String rules.
-
def
escapeJson: String
Escapes the characters in a String using Json String rules.
-
def
escapeRegex: String
Returns a literal pattern String for the specified String.
Returns a literal pattern String for the specified String. This method differs from scala.util.matching.Regex.quote() in that it adds backslashes to regex metacharacters instead of surrounding the string with \Q and \E
-
def
escapeXml: String
Escapes the characters in a String using XML entities.
-
def
getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
-
def
graphemes: Array[(String, Int, Int)]
Segments string into "graphemes" (what a person would consider a character) according to the guidelines specified here: https://unicode.org/reports/tr29/ Each grapheme is represented as a tuple (grapheme, start_offset, end_offset).
-
def
initials: String
Extracts the initial characters from each word in the String.
-
def
isAllLowerCase: Boolean
Checks if the string contains only lowercase characters.
-
def
isAllUpperCase: Boolean
Checks if the string contains only uppercase characters.
-
def
isAlphabetic: Boolean
Checks if the string contains only Unicode letters.
-
def
isAlphanumeric: Boolean
Checks if the string contains only Unicode letters or digits.
-
def
isAscii: Boolean
Checks if string contains only ASCII characters.
Checks if string contains only ASCII characters. Note that we consider the empty string to be ascii.
-
def
isAsciiPrintable: Boolean
Checks if the string contains only ASCII printable characters.
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
isNumeric: Boolean
Checks if the string contains only Unicode digits.
-
def
isPunctuation: Boolean
Checks if string contains only ASCII punctuation characters.
Checks if string contains only ASCII punctuation characters. One of !"#$%&'()*+,-./:;<=>?@[\]^_
{|}~ -
def
isWhitespace: Boolean
Checks if string contains only whitespace.
Checks if string contains only whitespace. Note that we consider the empty string to be whitespace.
-
def
leftPad(size: Int, padStr: String): String
Left pad a String with a specified String.
Left pad a String with a specified String. The String is padded to the specified size.
-
def
leftPad(size: Int, padChar: Char): String
Left pad a String with a specified character.
Left pad a String with a specified character. The String is padded to the specified size.
-
def
leftPad(size: Int): String
Left pad a String with spaces (' ').
Left pad a String with spaces (' '). The String is padded to the specified size.
-
def
normalizeSpace: String
Removes leading and trailing whitespace and replaces sequences of whitespace characters by a single space.
-
def
normalizeUnicode(casefold: Boolean, removeDiacritics: Boolean, preMapping: Map[String, String], postMapping: Map[String, String]): String
Unicode normalization
-
def
normalizeUnicode: String
Unicode normalization
-
def
normalizeUnicodeAggressively: String
Unicode normalization.
Unicode normalization. NFKCCasefold, remove diacritics, replace some chars to ascii versions, collapse spaces.
-
def
replaceVariables(values: Map[String, String]): String
Replaces all the occurrences of variables with their matching values from the map.
-
def
rightPad(size: Int, padStr: String): String
Right pad a String with a specified String.
Right pad a String with a specified String. The String is padded to the specified size.
-
def
rightPad(size: Int, padChar: Char): String
Right pad a String with a specified character.
Right pad a String with a specified character. The String is padded to the specified size.
-
def
rightPad(size: Int): String
Right pad a String with spaces (' ').
Right pad a String with spaces (' '). The String is padded to the specified size.
-
def
sentences: Array[(String, Int, Int)]
Segments string into "sentences" according to the guidelines specified here: https://unicode.org/reports/tr29/ Each sentence is represented as a tuple (sentence, start_offset, end_offset).
- def splitCamelCase: Array[String]
-
def
splitOnWhitespace: Array[String]
Splits the provided text on whitespace.
- val str: String
-
def
stripAccents: String
Removes diacritics from a string.
-
def
swapCase: String
Swaps the case of a String changing upper and title case to lower case, and lower case to upper case.
-
def
toJavaLiteral: String
Returns a string with the java string literal that would produce the original string.
Returns a string with the java string literal that would produce the original string. Similar to python's
repr(string). -
def
toString(): String
- Definition Classes
- Any
-
def
unescapeCsv: String
Returns a String value for an unescaped CSV column.
-
def
unescapeHtml: String
Unescapes a string containing entity escapes to a string containing the actual Unicode characters corresponding to the escapes.
-
def
unescapeJava: String
Unescapes any Java literals found in the String.
-
def
unescapeJson: String
Unescapes any Json literals found in the String.
-
def
unescapeXml: String
Unescapes a string containing XML entity escapes to a string containing the actual Unicode characters corresponding to the escapes.
-
def
wordWrap(wrapLength: Int): String
Wraps a single line of text, identifying words by ' '.
-
def
words: Array[(String, Int, Int)]
Segments string into "words" according to the guidelines specified here: https://unicode.org/reports/tr29/ Each word is represented as a tuple (word, start_offset, end_offset).