Merge pull request #52042 from Rubonnek/expose-simplify-path-3

[3.x] Expose `String.simplify_path`
This commit is contained in:
Max Hilbrunner 2021-08-24 17:06:58 +02:00 committed by GitHub
commit 0b0002e7b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -291,6 +291,7 @@ struct _VariantCall {
VCALL_LOCALMEM0R(String, empty);
VCALL_LOCALMEM1R(String, humanize_size);
VCALL_LOCALMEM0R(String, is_abs_path);
VCALL_LOCALMEM0R(String, simplify_path);
VCALL_LOCALMEM0R(String, is_rel_path);
VCALL_LOCALMEM0R(String, get_base_dir);
VCALL_LOCALMEM0R(String, get_file);
@ -1686,6 +1687,7 @@ void register_variant_methods() {
ADDFUNC0R(STRING, BOOL, String, empty, varray());
ADDFUNC1R(STRING, STRING, String, humanize_size, INT, "size", varray());
ADDFUNC0R(STRING, BOOL, String, is_abs_path, varray());
ADDFUNC0R(STRING, BOOL, String, simplify_path, varray());
ADDFUNC0R(STRING, BOOL, String, is_rel_path, varray());
ADDFUNC0R(STRING, STRING, String, get_base_dir, varray());
ADDFUNC0R(STRING, STRING, String, get_file, varray());

View File

@ -666,6 +666,12 @@
Returns the similarity index of the text compared to this string. 1 means totally similar and 0 means totally dissimilar.
</description>
</method>
<method name="simplify_path">
<return type="bool" />
<description>
Returns a simplified canonical path.
</description>
</method>
<method name="split">
<return type="PoolStringArray" />
<argument index="0" name="delimiter" type="String" />