BAN: Allow constexpr construction of StringView

This commit is contained in:
Bananymous 2025-06-07 18:29:32 +03:00
parent 515918329c
commit 6f74f3c386
1 changed files with 2 additions and 1 deletions

View File

@ -21,7 +21,8 @@ namespace BAN
constexpr StringView(const char* string, size_type len = -1)
{
if (len == size_type(-1))
len = strlen(string);
for (len = 0; string[len];)
len++;
m_data = string;
m_size = len;
}