| 859 | typename alloc |
| 860 | > |
| 861 | std::pair<std::basic_string<charT,traits,alloc>, std::basic_string<charT,traits,alloc> > |
| 862 | split_on_first ( |
| 863 | const std::basic_string<charT,traits,alloc>& str, |
| 864 | const charT* delim = _dT(charT," \n\r\t") |
| 865 | ) |
| 866 | { |
| 867 | typename std::basic_string<charT,traits,alloc>::size_type delim_pos = str.find_first_of(delim); |
| 868 | if (delim_pos != std::basic_string<charT,traits,alloc>::npos) |
| 869 | return std::make_pair(str.substr(0, delim_pos), str.substr(delim_pos+1)); |
| 870 | else |
| 871 | return std::make_pair(str, _dT(charT,"")); |
| 872 | } |
| 873 | |
| 874 | template < |
| 875 | typename charT, |