Returns a new string, only containing the code point at the index index in the string s. If index is negative, the length of s is added to it.
Arguments
s - str
index - int
Returns
str
Returns a non-negative integer that is the unicode code point at the given index. If index is negative, the length of s will be added to it.
Arguments
s - str
index - int
Returns
int
Returns true if the end of s fully matches prefix.
Arguments
s - str
suffix - str
Returns
bool
Finds all occurances of sub in s, returning an iterator over the indices of the first code points of the occurances of sub.
Arguments
s - str
sub - str
Returns
|| -> ( #next int | #end unit | ... )
Returns a copy of s, replacing underscores in s with the corresponding elements in v. If the number of underscores in s is less than the number of elements in v, a panic will be triggered. Underscores for which there is no corresponding element in v will simply be left untouched.
Arguments
s - str
v - [str]
Returns
str
Returns a string constructed from the given sequence of code points.
Arguments
cps - [int]
Returns
str
Returns an iterator over all code points in s.
Arguments
s - str
Returns
|| -> ( #next str | #end unit | ... )
Joins the strings provided by the iterator strings into a single string, inserting sep inbetween joined strings.
Arguments
strings - || -> ( #next str | #end any )
sep - str
Returns
str
Returns a new string with a minimum length of target_length, padded by repeating padding as many times as needed and appending it to the end of s. This means that if padding is more than one code point long, the returned string may be longer than target_length.
Arguments
s - str
target_length - int
padding - str
Returns
str
Returns a new string with a minimum length of target_length, padded by repeating padding as many times as needed and inserting it before the start of s. This means that if padding is more than one code point long, the returned string may be longer than target_length.
Arguments
s - str
target_length - int
padding - str
Returns
str
Attempts to parse source as a float.
Arguments
source - str
Returns
( #some float | #none unit | ... )
Attempts to parse source as an integer.
Arguments
source - str
Returns
( #some int | #none unit | ... )
Returns repeated repeated times times.
Arguments
repeated - str
times - int
Returns
str
Returns src, replacing all occurances of replaced in src with replacement.
Arguments
src - str
replaced - str
replacement - str
Returns
str
Splits s into parts separated by occurances of sep, returning an iterator over each part.
Arguments
s - str
sep - str
Returns
|| -> ( #next str | #end unit | ... )
Returns true if the beginning of s fully matches prefix.
Arguments
s - str
prefix - str
Returns
bool
Returns the part of the string s starting at the index start_index up to the end of the string. If start_index is negative, the length of s is added to it.
Arguments
s - str
start_index - int
Returns
str
Returns the part of the string s starting at the index 0 up to (not including) the index end_index. If end_index is negative, the length of s is added to it.
Arguments
s - str
end_index - int
Returns
str