diff options
| author | bosak | 2018-04-13 17:40:27 +0300 |
|---|---|---|
| committer | bosak | 2018-04-17 14:15:43 +0300 |
| commit | 79ecdee49631c1571b6629005b73b0d9aa3dbc34 (patch) | |
| tree | 37538bee3cc4d44ed95e6240e457dc7fe6d29c56 /doc/classes | |
| parent | ab75fae5641675a2e9c8b38c3b40231a00bb428d (diff) | |
| download | godot-79ecdee49631c1571b6629005b73b0d9aa3dbc34.tar.gz godot-79ecdee49631c1571b6629005b73b0d9aa3dbc34.tar.zst godot-79ecdee49631c1571b6629005b73b0d9aa3dbc34.zip | |
add string trim_prefix trim_suffix lstrip and rstrip methods
Diffstat (limited to 'doc/classes')
| -rw-r--r-- | doc/classes/String.xml | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/doc/classes/String.xml b/doc/classes/String.xml index d8d432e30..83fb76f28 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -490,6 +490,15 @@ Returns the string's amount of characters. </description> </method> + <method name="lstrip"> + <return type="String"> + </return> + <argument index="0" name="chars" type="String"> + </argument> + <description> + Returns a copy of the string with characters removed from the left. + </description> + </method> <method name="match"> <return type="bool"> </return> @@ -634,6 +643,15 @@ Returns the right side of the string from a given position. </description> </method> + <method name="rstrip"> + <return type="String"> + </return> + <argument index="0" name="chars" type="String"> + </argument> + <description> + Returns a copy of the string with characters removed from the right. + </description> + </method> <method name="sha256_buffer"> <return type="PoolByteArray"> </return> @@ -745,6 +763,24 @@ Converts the String (which is an array of characters) to [PoolByteArray] (which is an array of bytes). The conversion is a bit slower than to_ascii(), but supports all UTF-8 characters. Therefore, you should prefer this function over to_ascii(). </description> </method> + <method name="trim_prefix"> + <return type="String"> + </return> + <argument index="0" name="prefix" type="String"> + </argument> + <description> + Removes a given string from the start if it starts with it or leaves the string unchanged. + </description> + </method> + <method name="trim_suffix"> + <return type="String"> + </return> + <argument index="0" name="suffix" type="String"> + </argument> + <description> + Removes a given string from the end if it ends with it or leaves the string unchanged. + </description> + </method> <method name="xml_escape"> <return type="String"> </return> |
