mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-03 12:49:50 -05:00
Add a string(FIND) sub-command (#11795)
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user