Making plugin names case-insensitive for some internal comparisions.

Makes the plugin system a bit more tolerant against spelling
inconsistencies that would be hard to catch otherwise.
This commit is contained in:
Robin Sommer 2015-02-16 14:24:32 -08:00
parent ab3cdf494a
commit 0f96d06252
3 changed files with 22 additions and 10 deletions

View file

@ -541,6 +541,13 @@ bool is_printable(const char* s, int len)
return true;
}
std::string strtolower(const std::string& s)
{
std::string t = s;
std::transform(t.begin(), t.end(), t.begin(), ::tolower);
return t;
}
const char* fmt_bytes(const char* data, int len)
{
static char buf[1024];