]> git.mxchange.org Git - simgear.git/blobdiff - simgear/misc/strutils.hxx
Fixed mingw build.
[simgear.git] / simgear / misc / strutils.hxx
index 091ba8239393231a96cd95e8462683e1ffa53530..9bd1dbe1851fc20637cb8a5829cb32de05691e26 100644 (file)
@@ -33,6 +33,7 @@
 #include <vector>
 #include <cstdlib>
 
+typedef std::vector < std::string > string_list;
 
 namespace simgear {
   namespace strutils {
@@ -93,11 +94,17 @@ namespace simgear {
         * resulting in at most maxsplit+1 words.
         * @return Array of words.
         */
-       std::vector<std::string>
+       string_list
        split( const std::string& s,
               const char* sep = 0,
               int maxsplit = 0 );
 
+       /**
+        * create a single string by joining the elements of a list with
+        * another string.
+        */
+       std::string join(const string_list& l, const std::string& joinWith = "");
+
        /**
         * Test if a string starts with a string 
         *