### The string module contains functions that primarily work with strings.
## The placeholder {} is replaced by the arguments in the list in order.
##
## > ```tremor
## > string::format("the {} is {}.", "meaning of life", 42)
## > ```
##
## would result in the string
##
## > ```tremor
## > "the meaning of life is 42"
## > ```
##
## To use `{` or `}` as string literals in your format string, it needs to be
## escapedby adding another parenthesis of the same type.
##
## > ```tremor
## > string::format("{{ this is a string format in parenthesis }}")
## > ```
##
## this will output:
##
## > ```tremor
## > "{ this is a string format in parenthesis }"
## > ```
##
## Returns a `string`
intrinsic fn format(format, ...) as string::format;
## Returns if the input string is empty or not.
##
## Returns a `bool`
intrinsic fn is_empty(input) as string::is_empty;
## Returns the length of the input string (counted as utf8 codepoints, not
## bytes!).
##
## Returns an `integer`
intrinsic fn len(input) as string::len;
## Returns the number of bytes composing the input string (may not be equivalent
## to the number of codepoints!).
##
## Returns an `integer`
intrinsic fn bytes(input) as string::bytes;
## Replaces all occurrences of from in Input to to.
##
## Returns a `string`
intrinsic fn replace(input, `from`, `to`) as string::replace;
## Trims whitespaces both at the start and end of the input string. All codepoints with the unicode property `White_Space` are considered whitespace here.
##
## Returns a `string`
intrinsic fn trim(input) as string::trim;
## Trims whitespaces at the start of the input string. All codepoints with the unicode property `White_Space` are considered whitespace here.
##
## Returns a `string`
intrinsic fn trim_start(input) as string::trim_start;
## Trims whitespaces at the end of the input string. All codepoints with the unicode property `White_Space` are considered whitespace here.
##
## Returns a `string`
intrinsic fn trim_end(input) as string::trim_end;
## Turns all characters in the input string to lower case, based on the Unicode `Lowercase` property.
##
## Returns a `string`
intrinsic fn lowercase(input) as string::lowercase;
## Turns all characters in the input string to upper case, based on the Unicode `Uppercase` property
##
## Returns a `string`
intrinsic fn uppercase(input) as string::uppercase;
## Turns the first character in the input string to upper case. This does not
## ignore leading non letters!
##
## Returns a `string`
intrinsic fn capitalize(input) as string::capitalize;
## Get all codepoints from index start to end-1.
##
## Returns a `string`
intrinsic fn substr(input, start, `end`) as string::substr;
## Splits the input string at every occurrence of the separator string and turns
## the result in an array.
##
## Returns a `string`
intrinsic fn split(input, separator) as string::split;
## Returns if the input string contains another string or not.
##
## Returns a `bool`
intrinsic fn contains(input, string) as string::contains;
## Turns a `binary` into a utf8 string, potentally discarding invalid codepoints
##
## Returns a `string`
intrinsic fn from_utf8_lossy(bytes) as string::from_utf8_lossy;
## Turns a `string` into it's binary representation
##
## Returns a `binary`
intrinsic fn into_binary(bytes) as string::into_binary;