new-argparse: finish new argparse integration and clean up

This commit is contained in:
IntelOrca committed 2016-01-10 22:50:31 +00:00
1 parent 3f0073f29c
commit e9d222fdd3
18 files changed
+145 -820

No files matched your search

+26
View File
@@ -25,6 +25,32 @@ namespace String
}
}
bool StartsWith(const utf8 * str, const utf8 * match, bool ignoreCase)
{
if (ignoreCase)
{
while (*str != '\0' && *match != '\0')
{
if (tolower(*str++) != tolower(*match++))
{
return false;
}
}
return true;
}
else
{
while (*str != '\0' && *match != '\0')
{
if (*str++ != *match++)
{
return false;
}
}
return true;
}
}
size_t LengthOf(const utf8 * str)
{
return utf8_length(str);