]> git.mxchange.org Git - simgear.git/blobdiff - simgear/misc/strutils.cxx
Remove ambient component of additional lights
[simgear.git] / simgear / misc / strutils.cxx
index 5a669a6b0f51655e14cde98925f5d8636b984700..b1f74318eb60279689959a6dffc08ddfadd7ee72 100644 (file)
@@ -278,6 +278,19 @@ namespace simgear {
         return v1parts.size() - v2parts.size();
     }
     
+    string join(const string_list& l, const string& joinWith)
+    {
+        string result;
+        unsigned int count = l.size();
+        for (unsigned int i=0; i < count; ++i) {
+            result += l[i];
+            if (i < (count - 1)) {
+                result += joinWith;
+            }
+        }
+        
+        return result;
+    }
     
     } // end namespace strutils