diff options
author | George Marques <george@gmarqu.es> | 2018-04-22 12:29:44 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-22 12:29:44 -0300 |
commit | ca25f1e6eae9ffd498ddba05f94e341827269fea (patch) | |
tree | 66920ff079533dc4647378a9907756c638fdca5a /doc | |
parent | 06c5a9ed5f728cff6e6460a67e4b14d3419d41fe (diff) | |
parent | 79ecdee49631c1571b6629005b73b0d9aa3dbc34 (diff) |
Merge pull request #18176 from nikibobi/string-trim
Add string trim_prefix, trim_suffix, lstrip and rstrip methods
Diffstat (limited to 'doc')
-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 d8d432e30f..83fb76f287 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> |