Stuff
public cpp v1 · immutable inline std::string strip_whitespace(const std::string& s) { if (s.empty()) return ""; std::string::size_type start = s.find_first_not_of(" \t\n\r"); if (start == std::string::npos) return ""; std::string::size_type end = s.find_last_not_of(" \t\n\r"); return std::string(s, start, end-start+1); }