1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-13 13:31:48 +00:00

Remove String clipping constructors.

Callers should instead call constructors with explicit encoding names, with known length `Span`.
This commit is contained in:
Lukas Tenbrink
2025-03-14 16:54:44 +01:00
parent b377562b52
commit a23f630781
12 changed files with 24 additions and 41 deletions

View File

@@ -326,7 +326,7 @@ int RegEx::_sub(const String &p_subject, const String &p_replacement, int p_offs
pcre2_match_context_free_32(mctx);
if (res >= 0) {
r_output = String(output.ptr(), olength) + p_subject.substr(length);
r_output = String::utf32(Span(output.ptr(), olength)) + p_subject.substr(length);
}
return res;