summaryrefslogtreecommitdiffstats
path: root/Help/command
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-11-17 14:40:44 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2014-11-17 14:40:44 (GMT)
commit545d10cc6793555ab881d27207e4ae378f3caade (patch)
tree96d4fa343574b87b5b72b20fdbb6dd46600015f0 /Help/command
parentd42e3149005eea81458a5104d3053928da395918 (diff)
parent474bbb9dbcd6c257e68874e6966c145b3b82dbdd (diff)
downloadCMake-545d10cc6793555ab881d27207e4ae378f3caade.zip
CMake-545d10cc6793555ab881d27207e4ae378f3caade.tar.gz
CMake-545d10cc6793555ab881d27207e4ae378f3caade.tar.bz2
Merge topic 'string-SUBSTRING-truncate'
474bbb9d string: Tolerate SUBSTRING length exceeding end index
Diffstat (limited to 'Help/command')
-rw-r--r--Help/command/string.rst7
1 files changed, 6 insertions, 1 deletions
diff --git a/Help/command/string.rst b/Help/command/string.rst
index 07d0ff3..351385b 100644
--- a/Help/command/string.rst
+++ b/Help/command/string.rst
@@ -73,8 +73,13 @@ TOUPPER/TOLOWER will convert string to upper/lower characters.
LENGTH will return a given string's length.
-SUBSTRING will return a substring of a given string. If length is -1
+SUBSTRING will return a substring of a given string. If length is -1
the remainder of the string starting at begin will be returned.
+If string is shorter than length then end of string is used instead.
+
+.. note::
+ CMake 3.1 and below reported an error if length pointed past
+ the end of string.
STRIP will return a substring of a given string with leading and
trailing spaces removed.