Strings consist of zero or more characters.
A character is a tagged unsigned 32-bit integer.
They usually store uni-code code points.
The subtype std_types::octet_string of std_types::string is used for binary data, often for storing utf8 encoded strings.
The most efficient string operation is std::push which adds a character to the end of the string. Appending two or more strings is also done in an efficient way.
Reading a character at any position is also efficient.
The most basic string operations are builtin.
Strings have a lot in common with std_types::list.
Lists |
std::LATIN1 | used as a value for specifying a text encoding |
std::UTF8 | used as a value for specifying a text encoding |
std::append | appends two or more collections to form a single collection |
std::before | returns the substring before the specified expression |
std::behind | returns the substring behind the specified expression |
std::between | returns the substring between the two specified expressions |
std::bin | converts a positive integer value into a string consisting of binary digits |
std::contains | checks whether a string contains a specific expression |
std::count_occurrences | returns the number of occurences of the specified expression |
std::create_string | returns the concatenation of all of the list's items converted to strings |
std::delete_all | deletes all occurences of the specfified expressions |
std::drop | removes the last item of a collection without returning it |
std::dup | creates a concatenation of *n* copies of the specified collection |
std::format | formats its arguments using the specified template string |
std::from | returns the substring starting with the specified expression |
std::from_utf8 | converts a string from utf-8 encoding to code points |
std::get | removes and returns the first item of a collection |
std::hash | returns a hash value |
std::hex | converts a positive integer value into a string consisting of hexadecimal digits |
std::indented | increases the indent of the specified (multi-line) string |
std::is_a_character | tests if an object is a character |
std::is_a_digit | checks wheter its argument is a digit |
std::is_a_letter | checks wheter its argument is a letter (upper or lower case) |
std::is_a_lowercase_letter | checks wheter its argument is a lowercase letter |
std::is_a_string | tests if an object is a string |
std::is_an_octet_string | tests if an object is an octet string |
std::is_an_uppercase_letter | checks wheter its argument is an uppercase letter |
std::is_empty | checks whether a collection contains any items |
std::is_not_empty | checks whether a collection contains at least one item |
std::join | concatenates the list items using the specified separator |
std::length_of | returns the number of items within a collection |
std::map_characters | applies a function to each character of the string |
std::match | match the grammar object with the start of the specified string |
std::match_back | match the grammar object with the end of the specified string |
std::normalize | trims the string and replaces whitespace by a single space |
std::oct | converts a positive integer value into a string consisting of octal digits |
std::pad_left | extends a string to the specified width |
std::pad_right | extends a string to the specified width |
std::parse_hex | extracts a hexadecimal value from the start of the string |
std::parse_integer | extracts an integer value from the start of the string |
std::parse_number | extracts a numeric value from the start of the string |
std::partition | partitions a string into several parts and returns a list of these parts |
std::peek | returns the last item of a collection without removing it |
std::pop | remove and return the last item of a collection |
std::push | add a single item at the end of a collection |
std::put | adds a single item at the front of a collection |
std::range | returns a subrange of a collection |
std::replace_all | replaces all occurences of the specified expressions |
std::replace_first | replaces the first occurence of the specified expressions |
std::rows_and_columns | returns the number of rows and the width of the longest row in the text |
std::search | search from the grammar object from the start or end of the specified string |
std::serialize | returns a machine readable string representation of the object |
std::spaces | returns the specified number of spaces |
std::split | splits a string into several parts and returns a list of these parts |
std::split_into_groups | splits already indented lines into groups |
std::split_into_indented_lines | splits a text into indented lines |
std::string | returns the concatenation of all its arguments converted to strings |
std::tabs_and_spaces | returns a sequence of tabulator- and space-characters |
std::to_lower_case | converts all upper case characters to lower case |
std::to_sentence_case | converts a string to "Sentence case" |
std::to_string | returns a human readable presentation of the object |
std::to_title_case | converts the contents to Title Case |
std::to_upper_case | converts all lower case characters to UPPER CASE |
std::to_utf8 | returns an utf8-encoded octet string |
std::trim | removes leading and trailing whitespace |
std::trim_left | removes leading whitespace |
std::trim_right | removes trailing whitespace |
std::truncate_before | returns the substring starting with the specified expression |
std::truncate_behind | returns the substring ending with the specified expression |
std::truncate_from | returns the substring before the specified expression |
std::truncate_until | returns the substring behind the specified expression |
std::until | returns the substring ending with the specified expression |
std::with_tabs | replaces leading spaces with tab-characters |
std::without_prefix | removes a specific expression at the start of a string |
std::without_suffix | removes a specific expression at the end of a string |
std::wrap_words | wraps a string consisting of words onto multiple lines |
std_types::character.std::is_a_character | a character is a character |
std_types::character/std::match | matches the start of a string with the character |
std_types::character/std::match_back | matches the end of a string with the character |
std_types::character/std::search | searches for the character from the start or the end of a string |
std_types::character/std::serialize | serializes the character |
std_types::date_and_time/std::to_string | returns a string representation of the date-and-time object |
std_types::generic_list/std::dup | creates a list containing *n* copies of the specified list |
std_types::object.std::is_a_character | by default, an object is not a character |
std_types::object.std::is_a_string | by default, objects are not strings |
std_types::object.std::is_an_octet_string | by default, objects are not octet strings |
std_types::octet_string.std::is_an_octet_string | octet strings are octet strings |
std_types::set/std::match | matches the start of a string with the set's characters |
std_types::set/std::match_back | matches the end of a string with the set's characters |
std_types::set/std::search | searches for one of the alternatives from the start or the end of a string |
std_types::string.std::is_a_string | strings are strings |
std_types::string/std::before | returns the substring before the specified expression |
std_types::string/std::behind | returns the substring after the specified expression |
std_types::string/std::between | returns the substring between two expressions |
std_types::string/std::contains | succeeds if the specified expression occurrs at least once within the string |
std_types::string/std::dup | creates a string containing n copies of the specified string |
std_types::string/std::from | returns the substring starting with the specified expression |
std_types::string/std::has_prefix | checks whether the string has the specified prefix |
std_types::string/std::has_suffix | checks whether the string has the specified suffix |
std_types::string/std::match | matches the start of the stream with the string |
std_types::string/std::put | adds a character at the front of the string |
std_types::string/std::search | searches for the start of the string within the stream |
std_types::string/std::serialize | returns a string representation of the string |
std_types::string/std::to_integer | converts the whole string into an integer value |
std_types::string/std::to_lower_case | returns the string converted to lower case |
std_types::string/std::to_number | converts the whole string into a number value |
std_types::string/std::to_sentence_case | converts the spefied string to "Sentence case" |
std_types::string/std::to_string | returns its argument unaltered |
std_types::string/std::to_title_case | returns the string converted to "Title Case" |
std_types::string/std::to_upper_case | returns the string converted to UPPER CASE |
std_types::string/std::truncate_before | returns the substring starting with the specified expression |
std_types::string/std::truncate_behind | returns the substring until (including) the specified expression |
std_types::string/std::truncate_from | returns the substring before the specified expression |
std_types::string/std::truncate_until | returns the substring behind the specified expression |
std_types::string/std::until | returns the substring until (including) the specified expression |
std_types::string/std::without_prefix | returns the string without the specified prefix |
std_types::string/std::without_suffix | returns the string without the specified suffix |