diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-10-17 09:56:42 -0400 |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2005-10-17 09:56:42 -0400 |
commit | 12ef4edf64d2dd26cd03bd355b0f710b410f8d29 (patch) | |
tree | 97fa87a793899869df2c1915b6d2ea5c8f0e174c /Source/cmStringCommand.h | |
parent | 6e5cdd6de72de0d9d8f91c9971f0c13e10511c73 (diff) | |
download | cmake-12ef4edf64d2dd26cd03bd355b0f710b410f8d29.tar.gz |
ENH: Add String length and substring
Diffstat (limited to 'Source/cmStringCommand.h')
-rw-r--r-- | Source/cmStringCommand.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/cmStringCommand.h b/Source/cmStringCommand.h index cbdf811f57..8c6a11ca4f 100644 --- a/Source/cmStringCommand.h +++ b/Source/cmStringCommand.h @@ -83,6 +83,8 @@ public: " [@ONLY] [ESCAPE_QUOTES])\n" " STRING(TOUPPER <string1> <output variable>)\n" " STRING(TOLOWER <string1> <output variable>)\n" + " STRING(LENGTH <string> <output variable>)\n" + " STRING(SUBSTRING <string> <begin> <end> <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 " @@ -104,7 +106,9 @@ public: "ASCII will convert all numbers into corresponding ASCII characters.\n" "CONFIGURE will transform a string like CONFIGURE_FILE transforms " "a file.\n" - "TOUPPER/TOLOWER will convert string to upper/lower characters."; + "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."; } cmTypeMacro(cmStringCommand, cmCommand); @@ -118,6 +122,8 @@ protected: bool HandleToUpperLowerCommand(std::vector<std::string> const& args, bool toUpper); bool HandleCompareCommand(std::vector<std::string> const& args); bool HandleReplaceCommand(std::vector<std::string> const& args); + bool HandleLengthCommand(std::vector<std::string> const& args); + bool HandleSubstringCommand(std::vector<std::string> const& args); class RegexReplacement { |