summaryrefslogtreecommitdiff
path: root/Source/cmStringCommand.h
diff options
context:
space:
mode:
authorAlex Turbov <i.zaufi@gmail.com>2018-02-11 21:20:57 +0800
committerBrad King <brad.king@kitware.com>2018-02-16 10:04:47 -0500
commit689eeb67cb87a9ed1d91a4971806488d00e68f42 (patch)
tree403880ec3c332705d11c5293940e143fa1a4aa9c /Source/cmStringCommand.h
parente24cda008e3ea1cbb22d17d29c5c39999facb4b7 (diff)
downloadcmake-689eeb67cb87a9ed1d91a4971806488d00e68f42.tar.gz
string: Add JOIN subcommand
This is just like CONCAT but accepts a glue string to put between each value. `JOIN ""` is equivalent to `CONCAT`.
Diffstat (limited to 'Source/cmStringCommand.h')
-rw-r--r--Source/cmStringCommand.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmStringCommand.h b/Source/cmStringCommand.h
index b287e37b74..569ed83ec8 100644
--- a/Source/cmStringCommand.h
+++ b/Source/cmStringCommand.h
@@ -5,6 +5,7 @@
#include "cmConfigure.h" // IWYU pragma: keep
+#include <cstddef>
#include <string>
#include <vector>
@@ -48,6 +49,7 @@ protected:
bool HandleAppendCommand(std::vector<std::string> const& args);
bool HandlePrependCommand(std::vector<std::string> const& args);
bool HandleConcatCommand(std::vector<std::string> const& args);
+ bool HandleJoinCommand(std::vector<std::string> const& args);
bool HandleStripCommand(std::vector<std::string> const& args);
bool HandleRandomCommand(std::vector<std::string> const& args);
bool HandleFindCommand(std::vector<std::string> const& args);
@@ -56,6 +58,9 @@ protected:
bool HandleGenexStripCommand(std::vector<std::string> const& args);
bool HandleUuidCommand(std::vector<std::string> const& args);
+ bool joinImpl(std::vector<std::string> const& args, std::string const& glue,
+ size_t varIdx);
+
class RegexReplacement
{
public: