Utils: Simplify 'replaced' loop exit in templateCharReplace()

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I33dfa9245dedfc8587fe0019fcc37dbe1076f82a
diff --git a/src/Utils.cpp b/src/Utils.cpp
index 04f8f25..4ebb246 100644
--- a/src/Utils.cpp
+++ b/src/Utils.cpp
@@ -304,14 +304,10 @@
         std::string result = prefix + std::to_string(number);
 
         std::string replaced(find.begin(), find.end());
-        for (auto it2 = split.begin(); it2 != split.end(); it2++)
+        for (auto it2 = split.begin(); it2 != it; it2++)
         {
             replaced += " ";
             replaced += *it2;
-            if (it2 == it)
-            {
-                break;
-            }
         }
         ret = replaced;