psil

str

This is the documentation for the str module.


2str

2str (string) converts any value to a string.

Parameters:


is-str?

is-str? (boolean) checks if the given rand is a string.

Parameters:


str-cat

str-cat (string) concatenates two (or more) strings (or other values) into one. If a rand is not a string, it will be converted into one.

Parameters:


str-contains?

str-contains? (boolean) checks if the second rand is contained in the first rand.

Parameters:


str-empty?

str-empty? (boolean) checks if the given string is the empty string ("").

Parameters:


str-insert

str-insert (string) inserts the second string into the first at the given index.

Parameters:


str-len

str-len (natural number) returns the length of a given string.

Parameters:


str-low

str-low (string) returns the lowercase version of the given string.

Parameters:


str-repeat

str-repeat (string) returns the string repeated a certain number of times.

Parameters:


str-replace

str-replace (string) returns the first string with all instances of the second (the “old text”) replaced by the third (the “new text”).

Parameters:


str-starts-with?

str-starts-with? (boolean) checks if the first rand starts with the second rand.

Parameters:


str-strip

str-strip (string) removes leading/trailing whitespace from the given string.

Parameters:


str-trunc

str-trunc (string) shortens the given string to a given length.

Parameters:


str-up

str-up (string) returns the uppercase version of the given string.

Parameters: