Added StringView type (similar to std::string_view)

This commit is contained in:
Twan van Laarhoven
2020-05-21 19:29:42 +02:00
parent 6a299dfe41
commit 1a0e17221b
9 changed files with 153 additions and 106 deletions
+1 -1
View File
@@ -225,7 +225,7 @@ void Reader::readLine(bool in_string) {
}
}
key = canonical_name_form(trim(key));
value = pos == String::npos ? _("") : trim_left(line.substr(pos+1));
value = pos == String::npos ? String() : trim_left(substr(line, pos+1));
if (key.empty() && pos!=String::npos) key = _(" "); // we don't want an empty key if there was a colon
}