diff options
author | Marc Chevrier <marc.chevrier@sap.com> | 2018-03-16 13:12:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-03-21 16:54:53 (GMT) |
commit | 768225837db303e8b568e39ade730eea8ac6b573 (patch) | |
tree | 8438f1112f7eae9ee54afbbdd958af55f57e94c2 /Help/command/list.rst | |
parent | d41abae70f282c718f3109b7f76644adce41ff37 (diff) | |
download | CMake-768225837db303e8b568e39ade730eea8ac6b573.zip CMake-768225837db303e8b568e39ade730eea8ac6b573.tar.gz CMake-768225837db303e8b568e39ade730eea8ac6b573.tar.bz2 |
list: Add SUBLIST sub-command
Issue: #17823
Diffstat (limited to 'Help/command/list.rst')
-rw-r--r-- | Help/command/list.rst | 12 |
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 ^^^^^^ |