| 480 | |
| 481 | template<typename T> |
| 482 | inline static std::vector<T> StringToArray(const std::string& str, char delimiter) { |
| 483 | std::vector<std::string> strs = Split(str.c_str(), delimiter); |
| 484 | std::vector<T> ret; |
| 485 | ret.reserve(strs.size()); |
| 486 | __StringToTHelper<T, std::is_floating_point<T>::value> helper; |
| 487 | for (const auto& s : strs) { |
| 488 | ret.push_back(helper(s)); |
| 489 | } |
| 490 | return ret; |
| 491 | } |
| 492 | |
| 493 | template<typename T> |
| 494 | inline static std::vector<T> StringToArray(const std::string& str, int n) { |