diff options
Diffstat (limited to 'Userland/Utilities')
-rw-r--r-- | Userland/Utilities/checksum.cpp | 2 | ||||
-rw-r--r-- | Userland/Utilities/disk_benchmark.cpp | 2 | ||||
-rw-r--r-- | Userland/Utilities/gunzip.cpp | 2 | ||||
-rw-r--r-- | Userland/Utilities/lsof.cpp | 2 | ||||
-rw-r--r-- | Userland/Utilities/man.cpp | 2 | ||||
-rw-r--r-- | Userland/Utilities/mount.cpp | 2 | ||||
-rw-r--r-- | Userland/Utilities/mv.cpp | 2 | ||||
-rw-r--r-- | Userland/Utilities/pmap.cpp | 2 | ||||
-rw-r--r-- | Userland/Utilities/pro.cpp | 2 |
9 files changed, 9 insertions, 9 deletions
diff --git a/Userland/Utilities/checksum.cpp b/Userland/Utilities/checksum.cpp index d2c6e59e5b..21c0eb43ee 100644 --- a/Userland/Utilities/checksum.cpp +++ b/Userland/Utilities/checksum.cpp @@ -55,7 +55,7 @@ int main(int argc, char** argv) } auto hash_name = program_name.substring_view(0, program_name.length() - 3).to_string().to_uppercase(); - auto paths_help_string = String::format("File(s) to print %s checksum of", hash_name.characters()); + auto paths_help_string = String::formatted("File(s) to print {} checksum of", hash_name); Vector<const char*> paths; diff --git a/Userland/Utilities/disk_benchmark.cpp b/Userland/Utilities/disk_benchmark.cpp index de3ff19849..420c250692 100644 --- a/Userland/Utilities/disk_benchmark.cpp +++ b/Userland/Utilities/disk_benchmark.cpp @@ -108,7 +108,7 @@ int main(int argc, char** argv) umask(0644); - auto filename = String::format("%s/disk_benchmark.tmp", directory); + auto filename = String::formatted("{}/disk_benchmark.tmp", directory); for (auto file_size : file_sizes) { for (auto block_size : block_sizes) { diff --git a/Userland/Utilities/gunzip.cpp b/Userland/Utilities/gunzip.cpp index 58678d1b88..b7081d4a54 100644 --- a/Userland/Utilities/gunzip.cpp +++ b/Userland/Utilities/gunzip.cpp @@ -57,7 +57,7 @@ int main(int argc, char** argv) for (String filename : filenames) { if (!filename.ends_with(".gz")) - filename = String::format("%s.gz", filename.characters()); + filename = String::formatted("{}.gz", filename); const auto input_filename = filename; const auto output_filename = filename.substring_view(0, filename.length() - 3); diff --git a/Userland/Utilities/lsof.cpp b/Userland/Utilities/lsof.cpp index 029565cedc..9a9bafa0bd 100644 --- a/Userland/Utilities/lsof.cpp +++ b/Userland/Utilities/lsof.cpp @@ -84,7 +84,7 @@ static bool parse_name(StringView name, OpenFile& file) static Vector<OpenFile> get_open_files_by_pid(pid_t pid) { - auto file = Core::File::open(String::format("/proc/%d/fds", pid), Core::IODevice::OpenMode::ReadOnly); + auto file = Core::File::open(String::formatted("/proc/{}/fds", pid), Core::IODevice::OpenMode::ReadOnly); if (file.is_error()) { printf("lsof: PID %d: %s\n", pid, file.error().characters()); return Vector<OpenFile>(); diff --git a/Userland/Utilities/man.cpp b/Userland/Utilities/man.cpp index 079660494c..fc54db06e6 100644 --- a/Userland/Utilities/man.cpp +++ b/Userland/Utilities/man.cpp @@ -68,7 +68,7 @@ int main(int argc, char* argv[]) args_parser.parse(argc, argv); auto make_path = [name](const char* section) { - return String::format("/usr/share/man/man%s/%s.md", section, name); + return String::formatted("/usr/share/man/man{}/{}.md", section, name); }; if (!section) { const char* sections[] = { diff --git a/Userland/Utilities/mount.cpp b/Userland/Utilities/mount.cpp index 9e313d7a19..62b45d56d3 100644 --- a/Userland/Utilities/mount.cpp +++ b/Userland/Utilities/mount.cpp @@ -75,7 +75,7 @@ static int get_source_fd(const char* source) fd = open(source, O_RDONLY); if (fd < 0) { int saved_errno = errno; - auto message = String::format("Failed to open: %s\n", source); + auto message = String::formatted("Failed to open: {}\n", source); errno = saved_errno; perror(message.characters()); } diff --git a/Userland/Utilities/mv.cpp b/Userland/Utilities/mv.cpp index de07baf09b..d7f7a365b6 100644 --- a/Userland/Utilities/mv.cpp +++ b/Userland/Utilities/mv.cpp @@ -76,7 +76,7 @@ int main(int argc, char** argv) const char* new_path = original_new_path; if (rc == 0 && S_ISDIR(st.st_mode)) { auto old_basename = LexicalPath(old_path).basename(); - combined_new_path = String::format("%s/%s", original_new_path, old_basename.characters()); + combined_new_path = String::formatted("{}/{}", original_new_path, old_basename); new_path = combined_new_path.characters(); } diff --git a/Userland/Utilities/pmap.cpp b/Userland/Utilities/pmap.cpp index a0cdf12b72..2706b3fc4a 100644 --- a/Userland/Utilities/pmap.cpp +++ b/Userland/Utilities/pmap.cpp @@ -53,7 +53,7 @@ int main(int argc, char** argv) args_parser.add_positional_argument(pid, "PID", "PID", Core::ArgsParser::Required::Yes); args_parser.parse(argc, argv); - auto file = Core::File::construct(String::format("/proc/%s/vm", pid)); + auto file = Core::File::construct(String::formatted("/proc/{}/vm", pid)); if (!file->open(Core::IODevice::ReadOnly)) { fprintf(stderr, "Error: %s\n", file->error_string()); return 1; diff --git a/Userland/Utilities/pro.cpp b/Userland/Utilities/pro.cpp index 95f9a74ed0..9662d2300c 100644 --- a/Userland/Utilities/pro.cpp +++ b/Userland/Utilities/pro.cpp @@ -265,7 +265,7 @@ int main(int argc, char** argv) do { output_name = url.host(); if (i > -1) - output_name = String::format("%s.%d", output_name.characters(), i); + output_name = String::formatted("{}.{}", output_name, i); ++i; } while (Core::File::exists(output_name)); } |