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

Merge pull request #92476 from AThousandShips/string_remove_char

Add `String::remove_char(s)` methods for performance and convenience
This commit is contained in:
Thaddeus Crews
2025-03-10 10:01:04 -05:00
35 changed files with 221 additions and 54 deletions

View File

@@ -76,7 +76,7 @@ void ShaderRD::_add_stage(const char *p_code, StageType p_stage_type) {
} else if (l.begins_with("#CODE")) {
chunk.type = StageTemplate::Chunk::TYPE_CODE;
push_chunk = true;
chunk.code = l.replace_first("#CODE", String()).replace(":", "").strip_edges().to_upper();
chunk.code = l.replace_first("#CODE", String()).remove_char(':').strip_edges().to_upper();
} else if (l.begins_with("#include ")) {
String include_file = l.replace("#include ", "").strip_edges();
if (include_file[0] == '"') {