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

Fixed test ShouldFail cases

This commit is contained in:
Brian Fiete 2021-11-03 11:05:31 -07:00
parent a9872fcbac
commit 6c0b329d57
4 changed files with 38 additions and 12 deletions

View file

@ -690,6 +690,16 @@ void StringImpl::ReplaceLargerHelper(const StringView& find, const StringView& r
mLength = (int_strsize)destLength;
}
void StringImpl::Replace(char find, char replace)
{
auto ptr = GetMutablePtr();
for (int i = 0; i < mLength; i++)
{
if (ptr[i] == find)
ptr[i] = replace;
}
}
void StringImpl::Replace(const StringView& find, const StringView & replace)
{
if (replace.mLength > find.mLength)