mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-30 02:17:21 +02:00
CLI
- Implemented ::isUUID helper function.
This commit is contained in:
parent
34b9a5dbcc
commit
dd8972525f
2 changed files with 16 additions and 0 deletions
14
src/CLI.cpp
14
src/CLI.cpp
|
@ -1624,3 +1624,17 @@ void CLI::decomposeModSubstitutions ()
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
bool CLI::isUUID (const std::string& raw, std::string& token) const
|
||||||
|
{
|
||||||
|
// UUIDs have a limited character set.
|
||||||
|
if (raw.find_first_not_of ("0123456789abcdefABCDEF-,") == std::string::npos)
|
||||||
|
{
|
||||||
|
Nibbler n (raw);
|
||||||
|
if (n.getUUID (token) || n.getPartialUUID (token))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -97,6 +97,8 @@ private:
|
||||||
void decomposeModTags ();
|
void decomposeModTags ();
|
||||||
void decomposeModSubstitutions ();
|
void decomposeModSubstitutions ();
|
||||||
|
|
||||||
|
bool isUUID (const std::string&, std::string&) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
std::multimap <std::string, std::string> _entities;
|
std::multimap <std::string, std::string> _entities;
|
||||||
std::map <std::string, std::string> _aliases;
|
std::map <std::string, std::string> _aliases;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue