mirror of
https://github.com/open-goal/jak-project
synced 2026-06-12 05:27:57 -04:00
formatter: extract formatting into a rules abstraction, add inner formatting (body vs argument functions) (#2684)
This commit is contained in:
@@ -27,6 +27,8 @@ std::string ltrim(const std::string& s) {
|
||||
return (start == std::string::npos) ? "" : s.substr(start);
|
||||
}
|
||||
|
||||
// TODO - used a lot in formatting, and its slow because i bet it iterates from the start and not
|
||||
// the end
|
||||
std::string rtrim(const std::string& s) {
|
||||
size_t end = s.find_last_not_of(WHITESPACE);
|
||||
return (end == std::string::npos) ? "" : s.substr(0, end + 1);
|
||||
|
||||
Reference in New Issue
Block a user