
core
String
/=
defn
(λ [&String, &String] Bool)
=
external
(λ [&String, &String] Bool)
alpha?
defn
(λ [&String] Bool)
Check if a string contains only alpha characters (a-Z).
alphanum?
defn
(λ [&String] Bool)
Checks whether a string is alphanumerical.
append
external
(λ [&String, &String] String)
char-at
external
(λ [&String, Int] Char)
chars
external
(λ [&String] (Array Char))
chomp
defn
(λ [&String] String)
Trims newline from the end of a string.
concat
defn
(λ [(Ref (Array String))] String)
Returns a new string which is the concatenation of the provided `strings`.
copy
external
(λ [&String] String)
count-char
defn
(λ [&String, Char] Int)
Returns the number of occurrences of `c` in the string `s`.
cstr
external
(λ [&String] (Ptr Char))
empty?
defn
(λ [&String] Bool)
Check if the string is the empty string.
external
(λ [&String, &String] String)
head
defn
(λ [&String] Char)
Returns the character at start of string.
hex?
defn
(λ [&String] Bool)
Checks whether a string is hexadecimal.
in?
defn
(λ [&String, &String] Bool)
Checks whether a string contains another string.
join
defn
(λ [String, (Ref (Array String))] String)
Returns a new string which is the concatenation of the provided `strings` separated by string `sep`.
join-with-char
defn
(λ [Char, (Ref (Array String))] String)
Returns a new string which is the concatenation of the provided `strings` separated by char `sep`.
length
external
(λ [&String] Int)
lines
defn
(λ [&String] (Array String))
Split a string into lines.
lower?
defn
(λ [&String] Bool)
Checks whether a string is all lowercase.
num?
defn
(λ [&String] Bool)
Checks whether a string is numerical.
pad-left
defn
(λ [Int, Char, &String] String)
prefix-string
defn
(λ [&String, Int] String)
Return the first `a` characters of the string `s`.
prn
external
(λ [&String] String)
repeat
defn
(λ [Int, &String] String)
Returns a new string which is `inpt` repeated `n` times.
reverse
defn
(λ [&String] String)
Produce a new string which is `s` reversed.
split-by
defn
(λ [&String, (Ref (Array Char))] (Array String))
Split a string by separators.
starts-with?
defn
(λ [&String, &String] Bool)
Check if the string `s` ends with the string `sub`.
str
external
(λ [&String] String)
suffix-string
defn
(λ [&String, Int] String)
Return the last `b` characters of the string `s`.
sum-length
defn
(λ [(Ref (Array String))] Int)
Returns the sum of lengths from an array of Strings.
tail
external
(λ [&String] String)
trim
defn
(λ [&String] String)
Trims whitespace from both sides of a string.
trim-left
defn
(λ [&String] String)
Trims whitespace from the left of a string.
trim-right
defn
(λ [&String] String)
Trims whitespace from the right of a string.
upper?
defn
(λ [&String] Bool)
Checks whether a string is all uppercase.
words
defn
(λ [&String] (Array String))
Split a string into words.
zero
defn
(λ [] String)
The empty string.