34inline void trim(Glib::ustring &input, Glib::ustring
const &also_remove =
"")
36 auto const regex = Glib::Regex::create(Glib::ustring(
"^[\\s") + also_remove +
"]*(.+?)[\\s"
37 + also_remove +
"]*$");
38 Glib::MatchInfo match_info;
39 regex->match(input, match_info);
40 if (!match_info.matches()) {
44 input = match_info.fetch(1);
void trim(Glib::ustring &input, Glib::ustring const &also_remove="")
Modifies a string in place, removing leading and trailing whitespace characters.