26#ifndef MYSQL_HARNESS_STRING_UTILS_INCLUDED 
   27#define MYSQL_HARNESS_STRING_UTILS_INCLUDED 
   29#include "harness_export.h" 
   33#include <system_error> 
   52std::vector<std::string> 
split_string(
const std::string_view &data,
 
   54                                      bool allow_empty = 
true);
 
   86HARNESS_EXPORT 
bool ieq(
const std::string_view &a, 
const std::string_view &b);
 
  101std::string 
limit_lines(
const std::string &
str, 
const size_t limit,
 
  102                        const std::string &replace_with = 
"");
 
  118void upper(std::string &s);
 
  130void lower(std::string &s);
 
  142std::string 
replace(std::string_view s, std::string_view from,
 
  143                    std::string_view to);
 
Definition: expected.h:286
 
const char * delimiter
Definition: mysqlslap.cc:161
 
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1078
 
HARNESS_EXPORT std::string make_lower(std::string s)
lower-case a string.
Definition: string_utils.cc:99
 
HARNESS_EXPORT void upper(std::string &s)
upper-case a string.
Definition: string_utils.cc:85
 
HARNESS_EXPORT stdx::expected< bool, std::error_code > bool_from_string(std::string str)
Returns a boolean value parsed from a string.
Definition: string_utils.cc:163
 
HARNESS_EXPORT std::vector< std::string > split_string(const std::string_view &data, const char delimiter, bool allow_empty=true)
Splits a string using a delimiter.
Definition: string_utils.cc:37
 
HARNESS_EXPORT std::string make_upper(std::string s)
upper-case a string.
Definition: string_utils.cc:89
 
HARNESS_EXPORT bool ieq(const std::string_view &a, const std::string_view &b)
Compares two string values for equality (case insensitive).
Definition: string_utils.cc:76
 
HARNESS_EXPORT void lower(std::string &s)
lower-case a string.
Definition: string_utils.cc:95
 
HARNESS_EXPORT void left_trim(std::string &str)
Removes leading whitespaces from the string.
Definition: string_utils.cc:62
 
HARNESS_EXPORT std::string replace(std::string_view s, std::string_view from, std::string_view to)
Replace string.
Definition: string_utils.cc:170
 
HARNESS_EXPORT void trim(std::string &str)
Removes both leading and trailing whitespaces from the string.
Definition: string_utils.cc:71
 
HARNESS_EXPORT std::string limit_lines(const std::string &str, const size_t limit, const std::string &replace_with="")
Returns the input string with number of lines reduced to selected value.
Definition: string_utils.cc:130
 
HARNESS_EXPORT void right_trim(std::string &str)
Removes trailing whitespaces from the string.
Definition: string_utils.cc:66