7 #ifndef ChapiStringUtilities_h
8 #define ChapiStringUtilities_h
14 namespace chapi_string_utilities
23 bool from_string(T& t,
25 std::ios_base& (*f)(std::ios_base&))
27 std::istringstream iss(s);
28 return !(iss >> f >> t).fail();
31 extern std::vector<std::string> slice(std::string A, std::string sep);
32 extern std::map<std::string,std::string> associate_pieces(std::vector<std::string> v, std::string sep);
33 extern void cut_string_after_sub(std::string& input,
const std::string& sub);
34 extern bool good_character(
char* src);
35 extern std::string filter_string(
char* src);