Euphoria
|
stringutils.h File Reference
String utility functions. More...
#include <map>
Go to the source code of this file.
Namespaces | |
eu | |
Enumerations | |
enum class | eu::CharToStringStyle { eu::smart , eu::include_hex } |
Functions | |
bool | eu::is_number (char b) |
std::string | eu::strip_last_string (const std::string &str, char sep) |
for hello.dog and . gets hello More... | |
std::pair< std::string, std::string > | eu::get_last_string (const std::string &str, char sep) |
for hello.dog gets .dog More... | |
std::string | eu::get_first_chars (const std::string &str, std::size_t count) |
std::string | eu::get_first_chars_with_ellipsis (const std::string &str, unsigned int count) |
std::string | eu::trim_right (const std::string &string_to_trim, std::string_view trim_characters=space_characters) |
Remove characters from the right, stops at a invalid character. More... | |
std::string | eu::trim_left (const std::string &string_to_trim, std::string_view trim_characters=space_characters) |
Remove characters from the left, stops at invalid character. More... | |
std::string | eu::trim (const std::string &string_to_trim, std::string_view trim_characters=space_characters) |
Remove characters from both the start and the end. More... | |
bool | eu::begins_with (const std::string &string_to_test, const std::string &start) |
Tests if a string starts with another string. More... | |
bool | eu::ends_with (const std::string &string_to_test, const std::string &end) |
Tests if a string ends with another string. More... | |
char | eu::to_lower_char (char b) |
char | eu::to_upper_char (char b) |
std::string | eu::to_lower (const std::string &str) |
Generate a string containing only lower characters. More... | |
std::vector< std::string > | eu::to_lower (const std::vector< std::string > &str) |
std::string | eu::to_upper (const std::string &str) |
std::string | eu::from_char_to_string (char c, CharToStringStyle style) |
std::string::size_type | eu::find_first_index_of_mismatch (const std::string &lhs, const std::string &rhs) |
void | eu::replace_all (std::string *string, const std::string &to_find, const std::string &to_replace) |
Replace all occurrences in a string. More... | |
std::string | eu::replace_all (const std::string &string, const std::string &to_find, const std::string &to_replace) |
Replace all occurrences in a string. More... | |
std::string | eu::replace_with_character (const std::string &string, const std::string &to_find, char to_replace) |
void | eu::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. More... | |
std::string | eu::remove_from_end (const std::string &str, const std::string &end) |
template<typename TKey , typename TValue > | |
std::vector< std::string > | eu::to_string_vector (const std::map< TKey, TValue > &map) |
template<typename TKey , typename TValue > | |
std::vector< std::string > | eu::from_key_to_string_vector (const std::map< TKey, TValue > &map) |
template<typename T > | |
std::vector< std::string > | eu::to_string_vector (const std::vector< T > &data) |
template<typename T , typename C > | |
std::vector< std::string > | eu::to_string_vector (const std::vector< T > &data, C callback) |
std::string | eu::strip (const std::string &str, const std::string &ch) |
std::string | eu::remove_consecutive (const std::string &str, const std::string &ch) |
std::vector< std::string > | eu::split (const std::string &s, char delim) |
std::vector< std::string > | eu::split_on_spaces (const std::string &string) |
std::string | eu::get_string_or_empty (bool b, const std::string &str) |
int | eu::compare_string (const std::string &lhs, const std::string &rhs) |
Variables | |
constexpr std::string_view | eu::space_characters = " \n\r\t" |
Space characters. More... | |
Detailed Description
String utility functions.
Definition in file stringutils.h.