LCOV - code coverage report
Current view: top level - felix-star/src - util.hpp (source / functions) Hit Total Coverage
Test: coverage.info Lines: 8 9 88.9 %
Date: 2025-06-10 03:23:28 Functions: 1 1 100.0 %

          Line data    Source code
       1             : #include <string>
       2             : #include <vector>
       3             : 
       4             : class Util {
       5             : 
       6             : public:
       7          34 :   static std::vector<std::string> split(const std::string &text, char sep) {
       8          34 :     std::vector<std::string> tokens;
       9          34 :     std::size_t start = 0, end = 0;
      10         102 :     while ((end = text.find(sep, start)) != std::string::npos) {
      11         136 :       tokens.push_back(text.substr(start, end - start));
      12          68 :       start = end + 1;
      13             :     }
      14          68 :     tokens.push_back(text.substr(start));
      15          34 :     return tokens;
      16           0 :   }
      17             : };

Generated by: LCOV version 1.0