| | |
| | | |
| | | #include "precomp.h" |
| | | |
| | | namespace funasr { |
| | | float *LoadParams(const char *filename) |
| | | { |
| | | |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | bool is_target_file(const std::string& filename, const std::string target) { |
| | | std::size_t pos = filename.find_last_of("."); |
| | | if (pos == std::string::npos) { |
| | | return false; |
| | | } |
| | | std::string extension = filename.substr(pos + 1); |
| | | return (extension == target); |
| | | } |
| | | |
| | | std::vector<std::string> split(const std::string &s, char delim) { |
| | | std::vector<std::string> elems; |
| | | std::stringstream ss(s); |
| | | std::string item; |
| | | while(std::getline(ss, item, delim)) { |
| | | elems.push_back(item); |
| | | } |
| | | return elems; |
| | | } |
| | | |
| | | } // namespace funasr |