1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:17:44 +00:00

Utilities: Convert StringBuilder::appendf() => AK::Format

This commit is contained in:
Andreas Kling 2021-05-07 20:48:20 +02:00
parent e2ffd14e4e
commit 977fa4df81
2 changed files with 2 additions and 2 deletions

View file

@ -88,7 +88,7 @@ int main()
if (stat(tty.characters(), &st) == 0) { if (stat(tty.characters(), &st) == 0) {
auto idle_time = now - st.st_mtime; auto idle_time = now - st.st_mtime;
if (idle_time >= 0) { if (idle_time >= 0) {
builder.appendf("%" PRIi64 "s", idle_time); builder.appendff("{}s", idle_time);
idle_string = builder.to_string(); idle_string = builder.to_string();
} }
} }

View file

@ -26,7 +26,7 @@ static String build_header_string(const Vector<const char*>& command, const stru
{ {
StringBuilder builder; StringBuilder builder;
builder.appendff("Every {}", interval.tv_sec); builder.appendff("Every {}", interval.tv_sec);
builder.appendf(".%ds: \x1b[1m", interval.tv_usec / 100000); builder.appendff(".{}s: \x1b[1m", interval.tv_usec / 100000);
builder.join(' ', command); builder.join(' ', command);
builder.append("\x1b[0m"); builder.append("\x1b[0m");
return builder.build(); return builder.build();