forked from rosebudai/OpenRCT2-Web
new-argparse: finish new argparse integration and clean up
This commit is contained in:
1 parent
3f0073f29c
commit
e9d222fdd3
18 files changed
+145
-820
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user