This is the built-in string class (and the one used by GDScript). It supports Unicode and provides all necessary means for string handling. Strings are reference counted and use a copy-on-write approach, so passing them around is cheap in resources.
Return true if the strings begins with the given string.
</description>
</method>
<methodname="bigrams">
<returntype="PoolStringArray">
</return>
<description>
Return the bigrams (pairs of consecutive letters) of this string.
</description>
</method>
<methodname="c_escape">
<returntype="String">
</return>
<description>
Return a copy of the string with special characters escaped using the C language standard.
</description>
</method>
<methodname="c_unescape">
<returntype="String">
</return>
<description>
Return a copy of the string with escaped characters replaced by their meanings according to the C language standard.
</description>
</method>
<methodname="capitalize">
<returntype="String">
</return>
<description>
Change the case of some letters. Replace underscores with spaces, convert all letters to lowercase then capitalize first and every letter following the space character. For [code]capitalize camelCase mixed_with_underscores[/code] it will return [code]Capitalize Camelcase Mixed With Underscores[/code].
</description>
</method>
<methodname="casecmp_to">
<returntype="int">
</return>
<argumentindex="0"name="to"type="String">
</argument>
<description>
Perform a case-sensitive comparison to another string, return -1 if less, 0 if equal and +1 if greater.
</description>
</method>
<methodname="empty">
<returntype="bool">
</return>
<description>
Return true if the string is empty.
</description>
</method>
<methodname="ends_with">
<returntype="bool">
</return>
<argumentindex="0"name="text"type="String">
</argument>
<description>
Return true if the strings ends with the given string.
Find the first occurrence of a substring, return the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed.
</description>
</method>
<methodname="find_last">
<returntype="int">
</return>
<argumentindex="0"name="what"type="String">
</argument>
<description>
Find the last occurrence of a substring, return the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed.
Find the first occurrence of a substring but search as case-insensitive, return the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed.
If the string is a path to a file or directory, return true if the path is absolute.
</description>
</method>
<methodname="is_rel_path">
<returntype="bool">
</return>
<description>
If the string is a path to a file or directory, return true if the path is relative.
</description>
</method>
<methodname="is_subsequence_of">
<returntype="bool">
</return>
<argumentindex="0"name="text"type="String">
</argument>
<description>
Check whether this string is a subsequence of the given string.
</description>
</method>
<methodname="is_subsequence_ofi">
<returntype="bool">
</return>
<argumentindex="0"name="text"type="String">
</argument>
<description>
Check whether this string is a subsequence of the given string, without considering case.
</description>
</method>
<methodname="is_valid_float">
<returntype="bool">
</return>
<description>
Check whether the string contains a valid float.
</description>
</method>
<methodname="is_valid_html_color">
<returntype="bool">
</return>
<description>
Check whether the string contains a valid color in HTML notation.
</description>
</method>
<methodname="is_valid_identifier">
<returntype="bool">
</return>
<description>
Check whether the string is a valid identifier. As is common in programming languages, a valid identifier may contain only letters, digits and underscores (_) and the first character may not be a digit.
</description>
</method>
<methodname="is_valid_integer">
<returntype="bool">
</return>
<description>
Check whether the string contains a valid integer.
</description>
</method>
<methodname="is_valid_ip_address">
<returntype="bool">
</return>
<description>
Check whether the string contains a valid IP address.
</description>
</method>
<methodname="json_escape">
<returntype="String">
</return>
<description>
Return a copy of the string with special characters escaped using the JSON standard.
Return an amount of characters from the left of the string.
</description>
</method>
<methodname="length">
<returntype="int">
</return>
<description>
Return the length of the string in characters.
</description>
</method>
<methodname="match">
<returntype="bool">
</return>
<argumentindex="0"name="expr"type="String">
</argument>
<description>
Do a simple expression match, where '*' matches zero or more arbitrary characters and '?' matches any single character except '.'.
</description>
</method>
<methodname="matchn">
<returntype="bool">
</return>
<argumentindex="0"name="expr"type="String">
</argument>
<description>
Do a simple case insensitive expression match, using ? and * wildcards (see [method match]).
</description>
</method>
<methodname="md5_buffer">
<returntype="PoolByteArray">
</return>
<description>
Return the MD5 hash of the string as an array of bytes.
</description>
</method>
<methodname="md5_text">
<returntype="String">
</return>
<description>
Return the MD5 hash of the string as a string.
</description>
</method>
<methodname="nocasecmp_to">
<returntype="int">
</return>
<argumentindex="0"name="to"type="String">
</argument>
<description>
Perform a case-insensitive comparison to another string, return -1 if less, 0 if equal and +1 if greater.
</description>
</method>
<methodname="ord_at">
<returntype="int">
</return>
<argumentindex="0"name="at"type="int">
</argument>
<description>
Return the character code at position [code]at[/code].
</description>
</method>
<methodname="pad_decimals">
<returntype="String">
</return>
<argumentindex="0"name="digits"type="int">
</argument>
<description>
Format a number to have an exact number of [code]digits[/code] after the decimal point.
</description>
</method>
<methodname="pad_zeros">
<returntype="String">
</return>
<argumentindex="0"name="digits"type="int">
</argument>
<description>
Format a number to have an exact number of [code]digits[/code] before the decimal point.
</description>
</method>
<methodname="percent_decode">
<returntype="String">
</return>
<description>
Decode a percent-encoded string. See [method percent_encode].
</description>
</method>
<methodname="percent_encode">
<returntype="String">
</return>
<description>
Percent-encode a string. This is meant to encode parameters in a URL when sending a HTTP GET request and bodies of form-urlencoded POST request.
</description>
</method>
<methodname="plus_file">
<returntype="String">
</return>
<argumentindex="0"name="file"type="String">
</argument>
<description>
If the string is a path, this concatenates [code]file[/code] at the end of the string as a subpath. E.g. [code]"this/is".plus_file("path") == "this/is/path"[/code].
</description>
</method>
<methodname="replace">
<returntype="String">
</return>
<argumentindex="0"name="what"type="String">
</argument>
<argumentindex="1"name="forwhat"type="String">
</argument>
<description>
Replace occurrences of a substring for different ones inside the string.
</description>
</method>
<methodname="replacen">
<returntype="String">
</return>
<argumentindex="0"name="what"type="String">
</argument>
<argumentindex="1"name="forwhat"type="String">
</argument>
<description>
Replace occurrences of a substring for different ones inside the string, but search case-insensitive.
Return a copy of the string stripped of any non-printable character at the beginning and the end. The optional arguments are used to toggle stripping on the left and right edges respectively.
</description>
</method>
<methodname="substr">
<returntype="String">
</return>
<argumentindex="0"name="from"type="int">
</argument>
<argumentindex="1"name="len"type="int">
</argument>
<description>
Return part of the string from the position [code]from[/code], with length [code]len[/code].
</description>
</method>
<methodname="to_ascii">
<returntype="PoolByteArray">
</return>
<description>
Convert the String (which is a character array) to PoolByteArray (which is an array of bytes). The conversion is speeded up in comparison to to_utf8() with the assumption that all the characters the String contains are only ASCII characters.
</description>
</method>
<methodname="to_float">
<returntype="float">
</return>
<description>
Convert a string, containing a decimal number, into a [code]float[/code].
</description>
</method>
<methodname="to_int">
<returntype="int">
</return>
<description>
Convert a string, containing an integer number, into an [code]int[/code].
</description>
</method>
<methodname="to_lower">
<returntype="String">
</return>
<description>
Return the string converted to lowercase.
</description>
</method>
<methodname="to_upper">
<returntype="String">
</return>
<description>
Return the string converted to uppercase.
</description>
</method>
<methodname="to_utf8">
<returntype="PoolByteArray">
</return>
<description>
Convert 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>
<methodname="xml_escape">
<returntype="String">
</return>
<description>
Return a copy of the string with special characters escaped using the XML standard.
</description>
</method>
<methodname="xml_unescape">
<returntype="String">
</return>
<description>
Return a copy of the string with escaped characters replaced by their meanings according to the XML standard.