summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-03-20 13:39:45 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-03-20 13:40:40 (GMT)
commitd41abae70f282c718f3109b7f76644adce41ff37 (patch)
treea1e04513a8df7dc1befba5878d1c6d341abe6581 /Help
parent3b99c9689aae478708c83cafa552c4ce7bbf4a1b (diff)
parenta58158727be4585f9fd71449e9cc9e801c59a009 (diff)
downloadCMake-d41abae70f282c718f3109b7f76644adce41ff37.zip
CMake-d41abae70f282c718f3109b7f76644adce41ff37.tar.gz
CMake-d41abae70f282c718f3109b7f76644adce41ff37.tar.bz2
Merge topic 'list-join'
a58158727b list(): add `JOIN` sub-command Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1846
Diffstat (limited to 'Help')
-rw-r--r--Help/command/list.rst11
-rw-r--r--Help/command/string.rst4
-rw-r--r--Help/release/dev/list-join.rst5
3 files changed, 20 insertions, 0 deletions
diff --git a/Help/command/list.rst b/Help/command/list.rst
index e6a7069..3c092bd 100644
--- a/Help/command/list.rst
+++ b/Help/command/list.rst
@@ -54,6 +54,17 @@ GET
Returns the list of elements specified by indices from the list.
+JOIN
+""""
+
+::
+
+ list(JOIN <list> <glue> <output variable>)
+
+Returns a string joining all list's elements using the glue string.
+To join multiple strings, which are not part of a list, use ``JOIN`` operator
+from :command:`string` command.
+
Search
^^^^^^
diff --git a/Help/command/string.rst b/Help/command/string.rst
index cd94bb4..bb07d29 100644
--- a/Help/command/string.rst
+++ b/Help/command/string.rst
@@ -161,6 +161,10 @@ JOIN
Join all the input arguments together using the glue
string and store the result in the named output variable.
+To join list's elements, use preferably the ``JOIN`` operator
+from :command:`list` command. This allows for the elements to have
+special characters like ``;`` in them.
+
TOLOWER
"""""""
diff --git a/Help/release/dev/list-join.rst b/Help/release/dev/list-join.rst
new file mode 100644
index 0000000..0756b60
--- /dev/null
+++ b/Help/release/dev/list-join.rst
@@ -0,0 +1,5 @@
+list-join
+---------
+
+* The :command:`list` command learned a ``JOIN`` sub-command
+ to concatenate list's elements separated by a glue string.