Euphoria
|
stringutils.cc File Reference
#include "base/stringutils.h"
#include <algorithm>
#include <cstring>
#include <iterator>
#include <type_traits>
#include "assert/assert.h"
#include "base/stringbuilder.h"
Go to the source code of this file.
Namespaces | |
eu | |
Functions | |
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::strip_last_string (const std::string &str, char sep) |
for hello.dog and . gets hello More... | |
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... | |
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::replace_with_character (const std::string &string, const std::string &to_find, char to_replace) |
std::string | eu::remove_from_end (const std::string &str, const std::string &end) |
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) |
bool | eu::is_number (char b) |
int | eu::parse_number (const char **aa) |
int | eu::compare_string (const std::string &lhs, const std::string &rhs) |