[3.x] Expose String.simplify_path

This commit is contained in:
Wilson E. Alvarez 2021-08-23 19:39:37 -04:00
parent 27bcd0601e
commit fb5417a17b
No known key found for this signature in database
GPG Key ID: A32174A3D2ED3F9E
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" />