String
Index
Accessor
Codec
Combinator
Comparator
Constructor
Formatting
Predicate
Type
Other
Accessor
at
Return the character at the
index
position
size
Return the length of the string
Codec
__decode__
Returns the decoded
input
,Result.Ok
orResult.Error()
__encode__
Returns the encoded
input
__schema__
Returns the JSONSchema corresponding to the decoded type
Combinator
concat
Joins the given array of strings.
join
Joins the given array of strings.
Comparator
!=
"Not equal to" operator
<
"Less than" operator
<=
"Less than or equal to" operator
==
"Equal to" operator
>
"Greater than" operator
>=
"Greater than or equal to" operator
clamp
Clamp value between minValue and maxValue
compare
Return an Ordering that represents comparison result
equals
Alias to '=='
max
"maximum" operator
min
"minimum" operator
Constructor
of
Return a new string from all parts passed as arguments
Formatting
asString
Converts the given value to a String.
Predicate
endsWith
Returns true if string ends with searchString
includes
Returns the index of the last occurrence of
searchString
in a string.
isEmpty
Return true if the size of the array is 0
startsWith
Returns true if string starts with searchString
Type
__inspect__
When defined, returns a custom string representation. To be useful, it should be bound to a prototype (ex: Struct)
asInstance
Try to convert anyValue to enum value or else returns
Option.None
hasInstance
Return
true
if the given value is an instance of the class.
Other
typeName
indexOf
Returns the index of the first occurrence of
searchString
in a string.
lastIndexOf
Returns the index of the last occurrence of
searchString
in a string.
padEnd
Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.
padStart
Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.
split
Split a string into substrings using the specified separator and return them as an array.
truncate
Truncates a string to a specified length, adding '...' if necessary.
A collection of functions to manipulate
string