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

This commit is contained in:
A Thousand Ships 2024-05-28 12:15:00 +02:00
parent c374ce211c
commit 889410dcda
No known key found for this signature in database
GPG key ID: DEFC5A5B1306947D
67 changed files with 297 additions and 137 deletions

View file

@ -478,7 +478,7 @@ void EditorPropertyOTVariation::update_property() {
String name = TS->tag_to_name(name_tag);
String name_cap;
{
String aux = name.replace("_", " ").strip_edges();
String aux = name.replace_char('_', ' ').strip_edges();
for (int j = 0; j < aux.get_slice_count(" "); j++) {
String slice = aux.get_slicec(' ', j);
if (slice.length() > 0) {