mirror of
https://github.com/open-goal/jak-project
synced 2026-05-23 06:54:31 -04:00
formatter: Format deftype correctly (#3391)
New configuration options to format column widths in deftype field definitions. Also force each field/method/state to be inlined.
This commit is contained in:
@@ -245,4 +245,13 @@ std::string titlize(const std::string& str) {
|
||||
}
|
||||
return new_str;
|
||||
}
|
||||
|
||||
std::string pad_right(const std::string& input, const int width, const char padding_char) {
|
||||
if (input.length() >= width) {
|
||||
return input; // No need to pad if input length is already greater or equal to width
|
||||
} else {
|
||||
int padding_width = width - input.length();
|
||||
return input + std::string(padding_width, padding_char);
|
||||
}
|
||||
}
|
||||
} // namespace str_util
|
||||
|
||||
Reference in New Issue
Block a user