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

View file

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