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:
parent
a9872fcbac
commit
6c0b329d57
4 changed files with 38 additions and 12 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue