vsnprintf: Added more unit tests.

This commit is contained in:
Branimir Karadžić
2017-02-12 20:04:19 -08:00
parent 5da8a80a1f
commit 71cc735785
6 changed files with 79 additions and 30 deletions

View File

@@ -60,11 +60,31 @@ namespace bx
return _ch + (isUpper(_ch) ? 0x20 : 0);
}
void toLower(char* _inOutStr, size_t _max)
{
size_t len = strnlen(_inOutStr, _max);
for (size_t ii = 0; ii < len; ++ii)
{
*_inOutStr = toLower(*_inOutStr);
}
}
char toUpper(char _ch)
{
return _ch - (isLower(_ch) ? 0x20 : 0);
}
void toUpper(char* _inOutStr, size_t _max)
{
size_t len = strnlen(_inOutStr, _max);
for (size_t ii = 0; ii < len; ++ii)
{
*_inOutStr = toUpper(*_inOutStr);
}
}
bool toBool(const char* _str)
{
char ch = toLower(_str[0]);