Add String::remove_char(s) methods for performance and convenience

This commit is contained in:
A Thousand Ships 2024-05-28 12:55:07 +02:00
parent cae3d722a3
commit 331a43a9d8
No known key found for this signature in database
GPG key ID: DEFC5A5B1306947D
35 changed files with 221 additions and 54 deletions

View file

@ -863,7 +863,7 @@ GDScriptTokenizer::Token GDScriptTokenizerText::number() {
// Create a string with the whole number.
int len = _current - _start;
String number = String(_start, len).replace("_", "");
String number = String(_start, len).remove_char('_');
// Convert to the appropriate literal type.
if (base == 16) {