X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Fmisc%2Fstrutils.hxx;h=9bd1dbe1851fc20637cb8a5829cb32de05691e26;hb=619163d40e6beeaf08759944d80256692395ec9e;hp=091ba8239393231a96cd95e8462683e1ffa53530;hpb=3104898c7cfbaa593846abfa433ec53623d2e162;p=simgear.git diff --git a/simgear/misc/strutils.hxx b/simgear/misc/strutils.hxx index 091ba823..9bd1dbe1 100644 --- a/simgear/misc/strutils.hxx +++ b/simgear/misc/strutils.hxx @@ -33,6 +33,7 @@ #include #include +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 + 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 *