From 3823d13e2131c6174609811c43d212b2b72c339b Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 20 Mar 2020 14:40:17 +0100 Subject: [PATCH] copy: Use StringBuilder::join() --- Userland/copy.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Userland/copy.cpp b/Userland/copy.cpp index 80cfe945fb..a14409029f 100644 --- a/Userland/copy.cpp +++ b/Userland/copy.cpp @@ -66,13 +66,7 @@ Options parse_options(int argc, char* argv[]) } else { // Copy the rest of our command-line args. StringBuilder builder; - bool first = true; - for (auto& word : text) { - if (!first) - builder.append(' '); - first = false; - builder.append(word); - } + builder.join(' ', text); options.data = builder.to_string(); }