1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

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
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] == '"') {