You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-09 12:50:35 +00:00
Add String::remove_char(s) methods for performance and convenience
This commit is contained in:
@@ -1906,7 +1906,7 @@ void EditorHelp::_update_doc() {
|
||||
_push_code_font();
|
||||
|
||||
if (constant.value.begins_with("Color(") && constant.value.ends_with(")")) {
|
||||
String stripped = constant.value.replace(" ", "").replace("Color(", "").replace(")", "");
|
||||
String stripped = constant.value.remove_char(' ').replace("Color(", "").remove_char(')');
|
||||
PackedFloat64Array color = stripped.split_floats(",");
|
||||
if (color.size() >= 3) {
|
||||
class_desc->push_color(Color(color[0], color[1], color[2]));
|
||||
@@ -2439,7 +2439,7 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt, const C
|
||||
const Color kbd_bg_color = p_owner_node->get_theme_color(SNAME("kbd_bg_color"), SNAME("EditorHelp"));
|
||||
const Color param_bg_color = p_owner_node->get_theme_color(SNAME("param_bg_color"), SNAME("EditorHelp"));
|
||||
|
||||
String bbcode = p_bbcode.dedent().replace("\t", "").replace("\r", "").strip_edges();
|
||||
String bbcode = p_bbcode.dedent().remove_chars("\t\r").strip_edges();
|
||||
|
||||
// Select the correct code examples.
|
||||
switch ((int)EDITOR_GET("text_editor/help/class_reference_examples")) {
|
||||
|
||||
Reference in New Issue
Block a user