Euphoria
|
stringutils.h
Go to the documentation of this file.
50 trim_right(const std::string& string_to_trim, std::string_view trim_characters = space_characters);
59 trim_left(const std::string& string_to_trim, std::string_view trim_characters = space_characters);
142 replace_all(const std::string& string, const std::string& to_find, const std::string& to_replace);
std::vector< std::string > from_key_to_string_vector(const std::map< TKey, TValue > &map)
Definition: stringutils.h:178
std::string get_first_chars(const std::string &str, std::size_t count)
Definition: stringutils.cc:32
std::string remove_from_end(const std::string &str, const std::string &end)
Definition: stringutils.cc:313
std::string trim_left(const std::string &string_to_trim, std::string_view trim_characters)
Remove characters from the left, stops at invalid character.
Definition: stringutils.cc:72
std::string remove_consecutive(const std::string &str, const std::string &ch)
Definition: stringutils.cc:347
std::string to_lower(const std::string &str)
Generate a string containing only lower characters.
Definition: stringutils.cc:143
void copy(char *dst, const std::string &src, const std::string::size_type &count)
Copy a string to a character buffer, adding null terminator at the end.
Definition: stringutils.cc:293
std::vector< std::string > split_on_spaces(const std::string &string)
Definition: stringutils.cc:444
std::string get_first_chars_with_ellipsis(const std::string &str, unsigned int count)
Definition: stringutils.cc:40
std::string from_char_to_string(char c, CharToStringStyle style)
Definition: stringutils.cc:168
std::vector< std::string > to_string_vector(const std::map< TKey, TValue > &map)
Definition: stringutils.h:164
std::vector< std::string > split(const std::string &s, char delim)
Definition: stringutils.cc:431
std::string replace_with_character(const std::string &string, const std::string &to_find, char to_replace)
Definition: stringutils.cc:301
void replace_all(std::string *string, const std::string &to_find, const std::string &to_replace)
Replace all occurrences in a string.
Definition: stringutils.cc:269
std::string trim_right(const std::string &string_to_trim, std::string_view trim_characters)
Remove characters from the right, stops at a invalid character.
Definition: stringutils.cc:65
int compare_string(const std::string &lhs, const std::string &rhs)
Definition: stringutils.cc:498
std::string get_string_or_empty(bool b, const std::string &str)
Definition: stringutils.cc:457
std::string::size_type find_first_index_of_mismatch(const std::string &lhs, const std::string &rhs)
Definition: stringutils.cc:244
std::pair< std::string, std::string > get_last_string(const std::string &str, char sep)
for hello.dog gets .dog
Definition: stringutils.cc:17
std::string strip(const std::string &str, const std::string &ch)
Definition: stringutils.cc:331
std::string trim(const std::string &string_to_trim, std::string_view trim_characters)
Remove characters from both the start and the end.
Definition: stringutils.cc:79
std::string strip_last_string(const std::string &str, char sep)
for hello.dog and . gets hello
Definition: stringutils.cc:52
bool begins_with(const std::string &string_to_test, const std::string &start)
Tests if a string starts with another string.
Definition: stringutils.cc:87
@ smart
@ include_hex
Definition: assert.h:90