Improve lint_off to allow multiple messages and comments (#2755 partial).

This commit is contained in:
Wilson Snyder
2025-10-07 22:49:42 -04:00
parent 2631af977a
commit 1a8f9f0483
13 changed files with 95 additions and 47 deletions
+8
View File
@@ -327,6 +327,14 @@ string VString::replaceWord(const string& str, const string& from, const string&
return result;
}
std::deque<string> VString::split(const string& str, char delimiter) {
std::deque<std::string> results;
std::istringstream is{str};
std::string token;
while (std::getline(is, token, delimiter)) results.push_back(token);
return results;
}
bool VString::endsWith(const string& str, const string& suffix) {
if (str.length() < suffix.length()) return false;
return str.compare(str.length() - suffix.length(), suffix.length(), suffix) == 0;