From 17821603b49b77668c67c0362be28c9dbea829e4 Mon Sep 17 00:00:00 2001 From: "Wilson E. Alvarez" Date: Mon, 23 Aug 2021 19:39:10 -0400 Subject: [PATCH] Expose String.simplify_path --- core/variant/variant_call.cpp | 1 + doc/classes/String.xml | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp index c3481d48960..a4817eb7d27 100644 --- a/core/variant/variant_call.cpp +++ b/core/variant/variant_call.cpp @@ -1422,6 +1422,7 @@ static void _register_variant_builtin_methods() { bind_method(String, is_absolute_path, sarray(), varray()); bind_method(String, is_rel_path, sarray(), varray()); + bind_method(String, simplify_path, sarray(), varray()); bind_method(String, get_base_dir, sarray(), varray()); bind_method(String, get_file, sarray(), varray()); bind_method(String, xml_escape, sarray("escape_quotes"), varray(false)); diff --git a/doc/classes/String.xml b/doc/classes/String.xml index 97efc24bd10..a4646138a7d 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -646,6 +646,12 @@ Returns the similarity index of the text compared to this string. 1 means totally similar and 0 means totally dissimilar. + + + + Returns a simplified canonical path. + +