LCOV - code coverage report
Current view: top level - core - text_utils.h (source / functions) Coverage Total Hit
Test: coverage.info Lines: 100.0 % 10 10
Test Date: 2026-10-20 13:34:58 Functions: 100.0 % 1 1
Branches: 100.0 % 12 12

             Branch data     Line data    Source code
       1                 :             : #ifndef DBC_TEXT_UTILS_H
       2                 :             : #define DBC_TEXT_UTILS_H
       3                 :             : 
       4                 :             : #include <cctype>
       5                 :             : #include <string>
       6                 :             : 
       7                 :             : namespace dbc_detail {
       8                 :        2913 :     inline std::string TrimText(const std::string &text) {
       9                 :        2913 :         std::string::size_type begin = 0U;
      10   [ +  +  +  + ]:        5727 :         while ((begin < text.size()) &&
      11         [ +  + ]:        2692 :                std::isspace(static_cast<unsigned char>(text[begin])))
      12                 :         122 :             ++begin;
      13                 :             : 
      14                 :        2913 :         std::string::size_type end = text.size();
      15   [ +  +  +  + ]:        5491 :         while ((end > begin) &&
      16         [ +  + ]:        2574 :                std::isspace(static_cast<unsigned char>(text[end - 1U])))
      17                 :           4 :             --end;
      18                 :             : 
      19                 :        2913 :         return text.substr(begin, end - begin);
      20                 :             :     }
      21                 :             : }
      22                 :             : 
      23                 :             : #endif
        

Generated by: LCOV version 2.0-1