29 namespace StringUtilities
32 const std::string& delimiter,
33 std::vector<std::string>& results )
36 std::string::size_type first_pos = input.find_first_not_of(delimiter, 0);
38 std::string::size_type pos = input.find(delimiter, first_pos);
40 while (std::string::npos != pos || std::string::npos != first_pos)
43 results.push_back(input.substr(first_pos, pos - first_pos));
46 first_pos = input.find_first_not_of(delimiter, pos);
49 pos = input.find(delimiter, first_pos);
54 const std::string& delimiter,
55 std::vector<libMesh::Real>& results )
57 std::vector<std::string> string_vec;
61 results.resize(string_vec.size());
63 for (
unsigned int i=0; i<string_vec.size(); i++)
64 results[i] = string_to_T<libMesh::Real>(string_vec[i]);
void split_string_real(const std::string &input, const std::string &delimiter, std::vector< libMesh::Real > &results)
void split_string(const std::string &input, const std::string &delimiter, std::vector< std::string > &results)