modernize code

This commit is contained in:
mmichlol
2026-02-06 16:04:23 +01:00
commit 1884950f6f
12 changed files with 1095 additions and 0 deletions

8
PCCcompiler/utils.cpp Normal file
View File

@@ -0,0 +1,8 @@
#include "utils.h"
std::string trim(const std::string& str) {
size_t first = str.find_first_not_of(" \t");
if (first == std::string::npos) return "";
size_t last = str.find_last_not_of(" \t");
return str.substr(first, last - first + 1);
}