Check whether a string contains only white space characters
| 109 | |
| 110 | //! Check whether a string contains only white space characters |
| 111 | bool onlyWhitespaces(const std::string& s) { |
| 112 | // According to the DSC 3.0 specification, 4.4 Parsing Rules, |
| 113 | // only spaces and tabs are considered to be white space characters. |
| 114 | return s.find_first_not_of(" \t") == std::string::npos; |
| 115 | } |
| 116 | |
| 117 | //! Read the next line of a buffer, allow for changing line ending style |
| 118 | size_t readLine(std::string& line, const byte* data, size_t startPos, size_t size) { |
no outgoing calls
no test coverage detected