15 inline bool values(
const std::string& a_string,
const std::string& a_sep,
bool a_take_empty,std::vector<T>& a_values){
19 if(a_string.empty())
return true;
20 std::string::size_type lim = (a_take_empty?0:1);
23 if(!to<T>(a_string,
value)) {
27 a_values.push_back(
value);
29 std::string::size_type l = a_string.length();
30 std::string::size_type llimiter = a_sep.length();
31 std::string::size_type pos = 0;
33 std::string::size_type index = a_string.find(a_sep,pos);
34 if(index==std::string::npos){
37 if(!to<T>(a_string.substr(pos,l-pos),
value)) {
41 a_values.push_back(
value);
47 if((index-pos)>=lim) {
49 if(!to<T>(a_string.substr(pos,index-pos),
value)) {
53 a_values.push_back(
value);
55 pos = index + llimiter;