summaryrefslogtreecommitdiffstats
path: root/Source/cmStringCommand.h
diff options
context:
space:
mode:
authorKen Martin <ken.martin@kitware.com>2007-04-23 15:04:12 (GMT)
committerKen Martin <ken.martin@kitware.com>2007-04-23 15:04:12 (GMT)
commitc4fc2c19c75df1d3fa9fe4be0f9c775723cb2038 (patch)
treec102388aeac759f562a1e0992a87496cd20aa700 /Source/cmStringCommand.h
parente9361e41f3e9956ce112735c899300bf37a24e6b (diff)
downloadCMake-c4fc2c19c75df1d3fa9fe4be0f9c775723cb2038.zip
CMake-c4fc2c19c75df1d3fa9fe4be0f9c775723cb2038.tar.gz
CMake-c4fc2c19c75df1d3fa9fe4be0f9c775723cb2038.tar.bz2
ENH: Add command to generate random strings
Diffstat (limited to 'Source/cmStringCommand.h')
-rw-r--r--Source/cmStringCommand.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmStringCommand.h b/Source/cmStringCommand.h
index 523162d..283c91a 100644
--- a/Source/cmStringCommand.h
+++ b/Source/cmStringCommand.h
@@ -85,6 +85,7 @@ public:
" STRING(TOLOWER <string1> <output variable>)\n"
" STRING(LENGTH <string> <output variable>)\n"
" STRING(SUBSTRING <string> <begin> <length> <output variable>)\n"
+ " STRING(RANDOM [LENGTH <length>] [ALPHABET <alphabet>] <output variable>)\n"
"REGEX MATCH will match the regular expression once and store the "
"match in the output variable.\n"
"REGEX MATCHALL will match the regular expression as many times as "
@@ -108,7 +109,11 @@ 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.";
+ "SUBSTRING will return a substring of a given string.\n"
+ "RANDOM will return a random string of given length consisting of "
+ "characters from the given alphabet. Default length is 5 "
+ "characters and default alphabet is all numbers and upper and "
+ "lower case letters.";
}
cmTypeMacro(cmStringCommand, cmCommand);
@@ -125,6 +130,7 @@ protected:
bool HandleReplaceCommand(std::vector<std::string> const& args);
bool HandleLengthCommand(std::vector<std::string> const& args);
bool HandleSubstringCommand(std::vector<std::string> const& args);
+ bool HandleRandomCommand(std::vector<std::string> const& args);
class RegexReplacement
{