1
0

unit tests: coverage, settings

This commit is contained in:
2026-02-21 14:15:08 +02:00
parent ad55b1109d
commit 753a6e0e1d
7 changed files with 305 additions and 3 deletions

View File

@@ -5,10 +5,10 @@ namespace wavefront {
auto start = source.data();
// size is the size of buffer, data() + size() is the first available byte after the string.
auto end = source.data() + source.size() - 1;
while (start < end && std::isspace(*start)) {
while (start <= end && std::isspace(*start)) {
++start;
}
while (start < end && (std::isspace(*end) || *end == 0)) {
while (start <= end && (std::isspace(*end) || *end == 0)) {
--end;
}
return std::string_view(start, end - start + 1);