| 48 | } |
| 49 | |
| 50 | static std::string trim(const std::string& str, const std::string& whitespace = " \t\n") |
| 51 | { |
| 52 | const auto str_begin = str.find_first_not_of(whitespace); |
| 53 | if (str_begin == std::string::npos) |
| 54 | { |
| 55 | return ""; // no content |
| 56 | } |
| 57 | |
| 58 | const auto str_end = str.find_last_not_of(whitespace); |
| 59 | const auto str_range = str_end - str_begin + 1; |
| 60 | |
| 61 | return str.substr(str_begin, str_range); |
| 62 | } |
| 63 | |
| 64 | void TGFGraphReader::read_node(const std::string& _line) noexcept |
| 65 | { |