fix: update trim function in removeEmptyLines to exclude semicolons

This commit is contained in:
whaffman 2025-10-31 10:05:32 +01:00
parent 0ac362face
commit ce42760b3e
2 changed files with 3 additions and 1 deletions

View File

@ -89,7 +89,7 @@ void removeEmptyLines(std::string &str)
{
if (!utils::trim(line).empty())
{
result += utils::trim(line, " \t\n\r;") + '\n';
result += utils::trim(line, " \t\n\r") + '\n';
}
}
str = result;

View File

@ -10,6 +10,8 @@
namespace utils
{
size_t stoul(const std::string &str, int base = 10);
std::string trimSemi(const std::string &str);
std::string trim(const std::string &str, const std::string &charset = " \t\n\r");
size_t findCorrespondingClosingBrace(const std::string &str, size_t openPos);
void removeEmptyLines(std::string &str);