String64
Constructors
Models
ConcattypeConcatenates two strings at the type level.TrimtypeType-level representation of trimming whitespace from both ends of a string.TrimEndtypeType-level representation of trimming whitespace from the end of a string.TrimStarttypeType-level representation of trimming whitespace from the start of a string.Guards
Getters
Elements
atconstReturns the character at the specified relative index safely, or None if the index is out of bounds.charAtconstReturns the character at the specified non-negative index safely, or None if the index is out of bounds.charCodeAtconstReturns the character code at the specified index safely, or None if the index is out of bounds.codePointAtconstReturns the Unicode code point at the specified index safely, or None if the index is out of bounds.Combining
Comparing
Constants
Instances
Predicates
endsWithconstReturns true if the string ends with the specified search string.includesconstReturns true if searchString appears as a substring of self, at one or more positions that are greater than or equal to position; otherwise, returns false.isEmptyconstChecks whether a string is empty.startsWithconstReturns true if the string starts with the specified search string.Searching
indexOfconstReturns the index of the first occurrence of a substring safely, or None if not found.lastIndexOfconstReturns the index of the last occurrence of a substring safely, or None if not found.matchconstMatches a string against a pattern safely and returns Option.some with the match array, or Option.none when the pattern does not match.matchAllconstReturns an iterator over all regular expression matches in the string using native String.prototype.matchAll semantics.searchconstReturns the index of the first match for a string or regular expression safely, or Option.none when no match is found.Splitting
Transforming
camelCaseconstConverts a string to camelCase.camelToSnakeconstConverts a camelCase string to snake_case.capitalizeconstCapitalizes the first character of a string.configCaseconstConverts a string to CONFIG_CASE (uppercase with underscores) for configuration keys.constantCaseconstConverts a string to CONSTANT_CASE (uppercase with underscores).kebabCaseconstConverts a string to kebab-case (lowercase with hyphens).kebabToSnakeconstConverts a kebab-case string to snake_case.noCaseconstNormalizes a string by splitting it into word parts, transforming each part, and joining the parts with a configurable delimiter.normalizeconstNormalizes a string according to the specified Unicode normalization form.padEndconstPads the string from the end with a given fill string to a specified length.padStartconstPads the string from the start with a given fill string to a specified length.pascalCaseconstConverts a string to PascalCase.pascalToSnakeconstConverts a PascalCase string to snake_case.repeatconstRepeats the string the specified number of times.replaceconstReplaces matches in a string using String.prototype.replace.replaceAllconstReplaces all occurrences of a substring or pattern in a string.sliceconstExtracts a section of a string and returns it as a new string.snakeCaseconstConverts a string to snake_case (lowercase with underscores).snakeToCamelconstConverts a snake_case string to camelCase.snakeToKebabconstConverts a snake_case string to kebab-case.snakeToPascalconstConverts a snake_case string to PascalCase.splitconstSplits a string into an array of substrings using a separator.stripMarginconstStrips a leading | margin prefix from every line.stripMarginWithconstStrips a leading margin prefix from every line using the supplied margin character.substringconstExtracts characters from a string between two specified indices.takeLeftconstKeeps the specified number of characters from the start of a string.takeRightconstKeeps the specified number of characters from the end of a string.toLocaleLowerCaseconstConverts the string to lowercase according to the specified locale.toLocaleUpperCaseconstConverts the string to uppercase according to the specified locale.toLowerCaseconstConverts a string to lowercase.toUpperCaseconstConverts a string to uppercase.trimconstRemoves whitespace from both ends of a string.trimEndconstRemoves whitespace from the end of a string.trimStartconstRemoves whitespace from the start of a string.uncapitalizeconstUncapitalizes the first character of a string.