more readable this way
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user