more readable this way

This commit is contained in:
Drath Vader
2025-11-27 20:20:59 +01:00
parent f86d40241e
commit 47c45e8d9e
2 changed files with 8 additions and 3 deletions

View File

@@ -13,9 +13,9 @@
#include <utils.hpp>
// pads given string to length
std::string pad(std::string s, uint8_t len, bool ljust) {
std::string pad(std::string s, uint8_t len, JUST j) {
if (len > s.size())
s.insert(ljust ? s.end() : s.begin(), len - s.size(), FILL_CHAR);
s.insert(j == JUST::LEFT ? s.end() : s.begin(), len - s.size(), FILL_CHAR);
return s;
}