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;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue