#include <iostream>
using std::cout;
int main()
{
cout <<
"[" <<
trim(
"\n \b trim(), default whitespace\t \r") <<
"]\n";
cout <<
"[" <<
trim(
".:.:.:trim(), custom whitespace.:.:.:.",
".:") <<
"]\n";
cout <<
"[" <<
trim_left(
"\n \b trim_left(), default whitespace ") <<
"]\n";
cout <<
"[" <<
trim_right(
".:.:.:trim_right(), custom whitespace.:.:.:.",
".:") <<
"]\n";
cout <<
"[" <<
trim_left_sv(
"\n \b trim_left_sv(), default whitespace ") <<
"]\n";
cout <<
"[" <<
trim_right_sv(
".:.:.:trim_right_sv(), custom whitespace.:.:.:.",
".:") <<
"]\n";
std::string str = " string_view ";
cout << "[" << sv << "]\n";
str[5] = 'o';
cout << "[" << sv << "]\n";
return 0;
}
GUL_EXPORT std::string trim(string_view str, string_view ws_chars=default_whitespace_characters)
Trim leading and trailing whitespace (or a custom set of characters) from a string,...
Definition: trim.cc:29
GUL_EXPORT string_view trim_right_sv(string_view str, string_view ws_chars=default_whitespace_characters)
Trim trailing whitespace (or a custom set of characters) from a string, returning a view into the ori...
Definition: trim.cc:66
GUL_EXPORT std::string trim_left(string_view str, string_view ws_chars=default_whitespace_characters)
Trim leading whitespace (or a custom set of characters) from a string, returning a new std::string.
Definition: trim.cc:46
GUL_EXPORT string_view trim_sv(string_view str, string_view ws_chars=default_whitespace_characters)
Trim leading and trailing whitespace (or a custom set of characters) from a string,...
Definition: trim.cc:34
GUL_EXPORT std::string trim_right(string_view str, string_view ws_chars=default_whitespace_characters)
Trim trailing whitespace (or a custom set of characters) from a string, returning a new std::string.
Definition: trim.cc:61
GUL_EXPORT string_view trim_left_sv(string_view str, string_view ws_chars=default_whitespace_characters)
Trim leading whitespace (or a custom set of characters) from a string, returning a view into the orig...
Definition: trim.cc:51
Declarations of trim(), trim_left(), trim_right(), trim_sv(), trim_left_sv(), and trim_right_sv().