Reimplement String.erase

This commit is contained in:
SilicDev
2023-03-30 15:45:45 +02:00
parent 49a196277f
commit 6fa4f71ca6
6 changed files with 30 additions and 0 deletions

View File

@@ -158,6 +158,14 @@
Returns [code]true[/code] if the string ends with the given [param text]. See also [method begins_with].
</description>
</method>
<method name="erase" qualifiers="const">
<return type="String" />
<param index="0" name="position" type="int" />
<param index="1" name="chars" type="int" default="1" />
<description>
Returns a string with [param chars] characters erased starting from [param position]. If [param chars] goes beyond the string's length given the specified [param position], fewer characters will be erased from the returned string. Returns an empty string if either [code]position[/code] or [code]chars[/code] is negative. Returns the original string unmodified if [param chars] is [code]0[/code].
</description>
</method>
<method name="find" qualifiers="const">
<return type="int" />
<param index="0" name="what" type="String" />