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:
parent
4f1889c2cb
commit
f5c35fccca
Notes:
sideshowbarker
2024-07-18 17:02:37 +09:00
Author: https://github.com/linusg
Commit: f5c35fccca
Pull-request: https://github.com/SerenityOS/serenity/pull/7632
Reviewed-by: https://github.com/awesomekling
75 changed files with 642 additions and 644 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue