1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

String fix

This commit is contained in:
Brian Fiete 2020-02-25 10:40:28 -08:00
parent 23dd0f22e9
commit 41cb0052b2

View file

@ -108,7 +108,7 @@ intptr StringView::IndexOf(char c, int startIdx) const
intptr StringView::IndexOf(char c, int64 startIdx) const
{
auto ptr = mPtr;
for (intptr i = startIdx; i < mLength; i++)
for (int64 i = startIdx; i < mLength; i++)
if (ptr[i] == c)
return i;
return -1;
@ -812,7 +812,7 @@ intptr StringImpl::IndexOf(char c, int startIdx) const
intptr StringImpl::IndexOf(char c, int64 startIdx) const
{
auto ptr = GetPtr();
for (intptr i = startIdx; i < mLength; i++)
for (int64 i = startIdx; i < mLength; i++)
if (ptr[i] == c)
return i;
return -1;
@ -827,7 +827,7 @@ intptr StringImpl::LastIndexOf(char c) const
return -1;
}
intptr StringImpl::LastIndexOf(char c, int64 startCheck) const
intptr StringImpl::LastIndexOf(char c, intptr startCheck) const
{
auto ptr = GetPtr();
for (intptr i = startCheck; i >= 0; i--)