Index: /trunk/include/iprt/cpp/ministring.h
===================================================================
--- /trunk/include/iprt/cpp/ministring.h	(revision 50502)
+++ /trunk/include/iprt/cpp/ministring.h	(revision 50503)
@@ -4,5 +4,5 @@
 
 /*
- * Copyright (C) 2007-2012 Oracle Corporation
+ * Copyright (C) 2007-2014 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -853,4 +853,17 @@
     RTCList<RTCString, RTCString *> split(const RTCString &a_rstrSep,
                                           SplitMode a_enmMode = RemoveEmptyParts) const;
+
+    /**
+     * Joins a list of strings together using the provided separator and
+     * an optional prefix for each item in the list.
+     *
+     * @param   a_rList         The list to join.
+     * @param   a_rstrPrefix    The prefix used for appending to each item.
+     * @param   a_rstrSep       The separator used for joining.
+     * @returns joined string.
+     */
+    static RTCString joinEx(const RTCList<RTCString, RTCString *> &a_rList,
+                            const RTCString &a_rstrPrefix /* = "" */,
+                            const RTCString &a_rstrSep /* = "" */);
 
     /**
Index: /trunk/src/VBox/Runtime/common/string/ministring.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/string/ministring.cpp	(revision 50502)
+++ /trunk/src/VBox/Runtime/common/string/ministring.cpp	(revision 50503)
@@ -8,5 +8,5 @@
 
 /*
- * Copyright (C) 2007-2012 Oracle Corporation
+ * Copyright (C) 2007-2014 Oracle Corporation
  *
  * This file is part of VirtualBox Open Source Edition (OSE), as
@@ -395,6 +395,7 @@
 /* static */
 RTCString
-RTCString::join(const RTCList<RTCString, RTCString *> &a_rList,
-                const RTCString &a_rstrSep /* = "" */)
+RTCString::joinEx(const RTCList<RTCString, RTCString *> &a_rList,
+                  const RTCString &a_rstrPrefix /* = "" */,
+                  const RTCString &a_rstrSep /* = "" */)
 {
     RTCString strRet;
@@ -403,4 +404,5 @@
         /* calc the required size */
         size_t cbNeeded = a_rstrSep.length() * (a_rList.size() - 1) + 1;
+        cbNeeded += a_rstrPrefix.length() * (a_rList.size() - 1) + 1;
         for (size_t i = 0; i < a_rList.size(); ++i)
             cbNeeded += a_rList.at(i).length();
@@ -410,4 +412,6 @@
         for (size_t i = 0; i < a_rList.size() - 1; ++i)
         {
+            if (a_rstrPrefix.isNotEmpty())
+                strRet.append(a_rstrPrefix);
             strRet.append(a_rList.at(i));
             strRet.append(a_rstrSep);
@@ -417,7 +421,20 @@
     /* special case: one list item. */
     else if (a_rList.size() > 0)
+    {
+        if (a_rstrPrefix.isNotEmpty())
+            strRet.append(a_rstrPrefix);
         strRet.append(a_rList.last());
+    }
 
     return strRet;
+}
+
+/* static */
+RTCString
+RTCString::join(const RTCList<RTCString, RTCString *> &a_rList,
+                const RTCString &a_rstrSep /* = "" */)
+{
+    return RTCString::joinEx(a_rList,
+                             "" /* a_rstrPrefix */, a_rstrSep);
 }
 
