18 #include <boost/algorithm/string.hpp>
21 #ifndef _SCL_SECURE_NO_WARNINGS
22 #define _SCL_SECURE_NO_WARNINGS
34 std::vector< std::string >
36 const std::string &delims,
37 bool keep_empty_tokens =
false)
39 std::vector< std::string > tokens, non_empty_tokens;
44 boost::is_any_of(delims));
51 for(std::vector< std::string >::iterator it = tokens.begin();
55 non_empty_tokens.push_back(*it);
63 return non_empty_tokens;
71 is_equal(
const std::string &str1,
const std::string &str2)
73 return str1.compare(str2) == 0;
79 template<
typename ConvertType >
81 convert(
const std::string &str, ConvertType &elem)
83 std::stringstream ss(str);
90 template<
typename ConvertType >
102 template<
typename ScalarType >
106 std::ostringstream conv;
114 template<
typename ScalarType >
119 convert< ScalarType >(s, st);
129 const std::string &prefix)
131 return (str.substr(0, prefix.size()) == prefix);