1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-17 12:03:07 +01:00

Improve banner formatting fix

This commit is contained in:
Ted John
2020-11-29 00:40:17 +00:00
parent 699103fe86
commit 17edaae02b
7 changed files with 64 additions and 19 deletions

View File

@@ -126,6 +126,23 @@ namespace String
#endif
}
std::string_view ToStringView(const char* ch, size_t maxLen)
{
size_t len{};
for (size_t i = 0; i < maxLen; i++)
{
if (ch[i] == '\0')
{
break;
}
else
{
len++;
}
}
return std::string_view(ch, len);
}
bool IsNullOrEmpty(const utf8* str)
{
return str == nullptr || str[0] == '\0';