StringView: Fix equality operator
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
apio 2023-07-21 14:26:54 +02:00
parent c24a261233
commit de7e58c274
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -50,12 +50,12 @@ const char& StringView::operator[](usize index) const
bool StringView::operator==(const char* other) const
{
return !strncmp(m_string, other, m_length);
return !strcmp(m_string, other);
}
bool StringView::operator==(StringView other) const
{
return !strncmp(m_string, other.m_string, m_length);
return !strcmp(m_string, other.m_string);
}
Result<Vector<String>> StringView::split(StringView delim) const