25#ifndef MYSQL_HARNESS_STRING_UTILS_INCLUDED
26#define MYSQL_HARNESS_STRING_UTILS_INCLUDED
28#include "harness_export.h"
48std::vector<std::string>
split_string(
const std::string_view &data,
50 bool allow_empty =
true);
90 const std::string &replace_with =
"");
const char * delimiter
Definition: mysqlslap.cc:157
std::string str(const mysqlrouter::ConfigGenerator::Options::Endpoint &ep)
Definition: config_generator.cc:1063
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:35
HARNESS_EXPORT void left_trim(std::string &str)
Removes leading whitespaces from the string.
Definition: string_utils.cc:60
HARNESS_EXPORT void trim(std::string &str)
Removes both leading and trailing whitespaces from the string.
Definition: string_utils.cc:69
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:99
HARNESS_EXPORT void right_trim(std::string &str)
Removes trailing whitespaces from the string.
Definition: string_utils.cc:64