Fix for RegEx.sub truncating string when 'end' is used

This commit is contained in:
Sofox
2023-12-12 00:07:07 +00:00
parent b7145638d5
commit 46b420f7ee
2 changed files with 13 additions and 1 deletions

View File

@ -334,7 +334,7 @@ String RegEx::sub(const String &p_subject, const String &p_replacement, bool p_a
return String();
}
return String(output.ptr(), olength);
return String(output.ptr(), olength) + p_subject.substr(length);
}
bool RegEx::is_valid() const {