1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 02:13:56 +09:00

Userland: Replace most printf-style APIs with AK::Format APIs :^)

This commit is contained in:
Linus Groh 2021-05-31 15:43:25 +01:00
parent 4f1889c2cb
commit f5c35fccca
Notes: sideshowbarker 2024-07-18 17:02:37 +09:00
75 changed files with 642 additions and 644 deletions

View file

@ -4,6 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <AK/String.h>
#include <LibCore/ArgsParser.h>
#include <stdio.h>
#include <unistd.h>
@ -23,12 +24,8 @@ int main(int argc, char** argv)
args_parser.add_positional_argument(values, "Values to print out", "string", Core::ArgsParser::Required::No);
args_parser.parse(argc, argv);
for (size_t i = 0; i < values.size(); ++i) {
fputs(values[i], stdout);
if (i != values.size() - 1)
fputc(' ', stdout);
}
out("{}", String::join(' ', values));
if (!no_trailing_newline)
printf("\n");
outln();
return 0;
}