20inline namespace util {
24constexpr char Space[] =
" \t\n\v\f\r";
29 const auto pos =
s.find_first_not_of(
Space);
30 s.remove_prefix(
pos != string_view::npos ?
pos :
s.size());
35 const auto pos =
s.find_first_not_of(
Space);
36 s.erase(0,
pos != string_view::npos ?
pos :
s.size());
41 const auto pos =
s.find_last_not_of(
Space);
42 s.remove_suffix(
s.size() - (
pos != string_view::npos ?
pos + 1 : 0));
47 const auto pos =
s.find_last_not_of(
Space);
48 s.erase(
pos != string_view::npos ?
pos + 1 : 0);
55 if (
pos == string_view::npos) {
68 if (
pos == string::npos) {