diff options
author | Brad King <brad.king@kitware.com> | 2011-06-02 15:29:13 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2011-06-02 15:29:13 (GMT) |
commit | a5507c3e8654e4fb72366a21c0c79496f00f9d02 (patch) | |
tree | 9a57d7c268fff80d4c782999d963a2a9d5c919e0 /Source | |
parent | 3232136fc880a90488f867139a15c31513e6dfbf (diff) | |
parent | ecdad65a4541db353bd498be7d7090b5ed059ebc (diff) | |
download | CMake-a5507c3e8654e4fb72366a21c0c79496f00f9d02.zip CMake-a5507c3e8654e4fb72366a21c0c79496f00f9d02.tar.gz CMake-a5507c3e8654e4fb72366a21c0c79496f00f9d02.tar.bz2 |
Merge topic 'fix-10740-update-string-docs'
ecdad65 CMake: Update documentation of STRING(SUBSTRING) for length -1 (#10740)
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmStringCommand.cxx | 2 | ||||
-rw-r--r-- | Source/cmStringCommand.h | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx index 3c74dc9..d239c06 100644 --- a/Source/cmStringCommand.cxx +++ b/Source/cmStringCommand.cxx @@ -677,7 +677,7 @@ bool cmStringCommand::HandleSubstringCommand(std::vector<std::string> const& if ( end < -1 || end > leftOverLength ) { cmOStringStream ostr; - ostr << "end index: " << end << " is out of range " << 0 << " - " + ostr << "end index: " << end << " is out of range -1 - " << leftOverLength; this->SetError(ostr.str().c_str()); return false; diff --git a/Source/cmStringCommand.h b/Source/cmStringCommand.h index 9586449..52b83d9 100644 --- a/Source/cmStringCommand.h +++ b/Source/cmStringCommand.h @@ -110,7 +110,8 @@ public: "a file.\n" "TOUPPER/TOLOWER will convert string to upper/lower characters.\n" "LENGTH will return a given string's length.\n" - "SUBSTRING will return a substring of a given string.\n" + "SUBSTRING will return a substring of a given string. If length is " + "-1 the remainder of the string starting at begin will be returned.\n" "STRIP will return a substring of a given string with leading " "and trailing spaces removed.\n" "RANDOM will return a random string of given length consisting of " |