4. The String library

the string lib implements string formatting and regular expression matching routines.

4.1. Global Symbols

ends_with(str, cmp)

returns true if the end of the string str matches a the string cmp otherwise returns false

starts_with(str, cmp)

returns true if the beginning of the string str matches the string cmp; otherwise returns false

strip_left(str)

Strips white-space-only characters that might appear at the beginning of the given string and returns the new stripped string.

strip_right(str)

Strips white-space-only characters that might appear at the end of the given string and returns the new stripped string.

strip(str)

Strips white-space-only characters that might appear at the beginning or end of the given string and returns the new stripped string.

find(str, substr[, at])

Return index where substr czn be found within str (starting from optional at), or -1 if not found

length(str)

Return length of string

reverse(str)

Return reversed string

to_lower(str)

Return all lower case string

to_upper(str)

Return all upper case string

slice(str, start[, end])

Return all part of the strings starting at start and ending by end. Start can be negative (-1 means “1 from the end”).

4.2. String builder