diff options
author | Linus Groh <mail@linusgroh.de> | 2021-05-31 15:43:25 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-06-01 21:30:16 +0100 |
commit | f5c35fccca3394ae54647d89a160d599f4a74f04 (patch) | |
tree | 5daf1ac703d28877439d0de00bcd54091cd02e5e /Userland/Utilities/ps.cpp | |
parent | 4f1889c2cb5273800499550082af48df7e8c022f (diff) | |
download | serenity-f5c35fccca3394ae54647d89a160d599f4a74f04.zip |
Userland: Replace most printf-style APIs with AK::Format APIs :^)
Diffstat (limited to 'Userland/Utilities/ps.cpp')
-rw-r--r-- | Userland/Utilities/ps.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Utilities/ps.cpp b/Userland/Utilities/ps.cpp index 6392dcbafa..068b905120 100644 --- a/Userland/Utilities/ps.cpp +++ b/Userland/Utilities/ps.cpp @@ -85,18 +85,18 @@ int main(int argc, char** argv) auto print_column = [](auto& column, auto& string) { if (!column.width) { - printf("%s", string.characters()); + out("{}", string); return; } if (column.alignment == Alignment::Right) - printf("%*s ", column.width, string.characters()); + out("{1:>{0}} ", column.width, string); else - printf("%-*s ", column.width, string.characters()); + out("{1:{0}} ", column.width, string); }; for (auto& column : columns) print_column(column, column.title); - printf("\n"); + outln(); auto processes = Core::ProcessStatisticsReader::get_all(); if (!processes.has_value()) @@ -132,7 +132,7 @@ int main(int argc, char** argv) for (auto& column : columns) print_column(column, column.buffer); - printf("\n"); + outln(); } return 0; |