summaryrefslogtreecommitdiff
path: root/Source/cmStringCommand.h
diff options
context:
space:
mode:
authorTim Hütz <tim@huetz.biz>2011-02-15 11:20:47 +0100
committerBrad King <brad.king@kitware.com>2011-02-15 13:17:51 -0500
commit1462561a8cab7cf3cad9979019778f3c13b0bdf9 (patch)
tree16a8b3dde44d41a108737f688461184200c8a15e /Source/cmStringCommand.h
parent4d1240eb0a8d0f867d7e15fe63fc6389ea550e60 (diff)
downloadcmake-1462561a8cab7cf3cad9979019778f3c13b0bdf9.tar.gz
Add a string(FIND) sub-command (#11795)
Diffstat (limited to 'Source/cmStringCommand.h')
-rw-r--r--Source/cmStringCommand.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmStringCommand.h b/Source/cmStringCommand.h
index 2a916b407f..9586449417 100644
--- a/Source/cmStringCommand.h
+++ b/Source/cmStringCommand.h
@@ -90,6 +90,7 @@ public:
" string(STRIP <string> <output variable>)\n"
" string(RANDOM [LENGTH <length>] [ALPHABET <alphabet>]\n"
" [RANDOM_SEED <seed>] <output variable>)\n"
+ " string(FIND <string> <substring> <output variable> [REVERSE])\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 "
@@ -117,6 +118,10 @@ public:
"characters and default alphabet is all numbers and upper and "
"lower case letters. If an integer RANDOM_SEED is given, its "
"value will be used to seed the random number generator.\n"
+ "FIND will return the position where the given substring was found "
+ "in the supplied string. If the REVERSE flag was used, the command "
+ "will search for the position of the last occurrence of the "
+ "specified substring.\n"
"The following characters have special meaning in regular expressions:\n"
" ^ Matches at beginning of a line\n"
" $ Matches at end of a line\n"
@@ -152,6 +157,7 @@ protected:
bool HandleSubstringCommand(std::vector<std::string> const& args);
bool HandleStripCommand(std::vector<std::string> const& args);
bool HandleRandomCommand(std::vector<std::string> const& args);
+ bool HandleFindCommand(std::vector<std::string> const& args);
class RegexReplacement
{