summaryrefslogtreecommitdiffstats
path: root/Help/command
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2018-03-22 19:27:12 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-03-22 19:27:24 (GMT)
commit9f2ec9d241b58aa2184c11bd6d863885d1fcdec7 (patch)
tree5589ebbd92f2d49857deb492c2c03eed57f2ed2d /Help/command
parent82df2fe17e81fa4efa9717ec9d83d2915d56aa33 (diff)
parent768225837db303e8b568e39ade730eea8ac6b573 (diff)
downloadCMake-9f2ec9d241b58aa2184c11bd6d863885d1fcdec7.zip
CMake-9f2ec9d241b58aa2184c11bd6d863885d1fcdec7.tar.gz
CMake-9f2ec9d241b58aa2184c11bd6d863885d1fcdec7.tar.bz2
Merge topic 'list-sublist'
768225837d list: Add SUBLIST sub-command Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1874
Diffstat (limited to 'Help/command')
-rw-r--r--Help/command/list.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/Help/command/list.rst b/Help/command/list.rst
index 3c092bd..6218a2a 100644
--- a/Help/command/list.rst
+++ b/Help/command/list.rst
@@ -65,6 +65,18 @@ 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.
+SUBLIST
+"""""""
+
+::
+
+ list(SUBLIST <list> <begin> <length> <output variable>)
+
+Returns a sublist of the given list.
+If ``<length>`` is 0, an empty list will be returned.
+If ``<length>`` is -1 or the list is smaller than ``<begin>+<length>`` then
+the remaining elements of the list starting at ``<begin>`` will be returned.
+
Search
^^^^^^