- Implemented ::isUUID helper function.
This commit is contained in:
Paul Beckingham 2014-10-27 10:57:41 -04:00
parent 34b9a5dbcc
commit dd8972525f
2 changed files with 16 additions and 0 deletions

View file

@ -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;
}
////////////////////////////////////////////////////////////////////////////////