1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 11:33:03 +01:00

new-argparse: finish new argparse integration and clean up

This commit is contained in:
IntelOrca
2016-01-10 21:03:45 +00:00
parent 3f0073f29c
commit e9d222fdd3
18 changed files with 145 additions and 820 deletions

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