diff options
Diffstat (limited to 'doc/classes/String.xml')
-rw-r--r-- | doc/classes/String.xml | 154 |
1 files changed, 120 insertions, 34 deletions
diff --git a/doc/classes/String.xml b/doc/classes/String.xml index 11a9f6dc0d..0dd6923129 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="String" category="Built-In Types" version="3.2"> +<class name="String" version="4.0"> <brief_description> Built-in string class. </brief_description> @@ -49,6 +49,15 @@ <method name="String"> <return type="String"> </return> + <argument index="0" name="from" type="Vector2i"> + </argument> + <description> + Constructs a new String from the given [Vector2i]. + </description> + </method> + <method name="String"> + <return type="String"> + </return> <argument index="0" name="from" type="Rect2"> </argument> <description> @@ -58,6 +67,15 @@ <method name="String"> <return type="String"> </return> + <argument index="0" name="from" type="Rect2i"> + </argument> + <description> + Constructs a new String from the given [Rect2i]. + </description> + </method> + <method name="String"> + <return type="String"> + </return> <argument index="0" name="from" type="Vector3"> </argument> <description> @@ -67,6 +85,15 @@ <method name="String"> <return type="String"> </return> + <argument index="0" name="from" type="Vector3i"> + </argument> + <description> + Constructs a new String from the given [Vector3i]. + </description> + </method> + <method name="String"> + <return type="String"> + </return> <argument index="0" name="from" type="Transform2D"> </argument> <description> @@ -130,6 +157,15 @@ <method name="String"> <return type="String"> </return> + <argument index="0" name="from" type="StringName"> + </argument> + <description> + Constructs a new String from the given [StringName]. + </description> + </method> + <method name="String"> + <return type="String"> + </return> <argument index="0" name="from" type="NodePath"> </argument> <description> @@ -148,6 +184,24 @@ <method name="String"> <return type="String"> </return> + <argument index="0" name="from" type="Callable"> + </argument> + <description> + Constructs a new String from the given [Callable]. + </description> + </method> + <method name="String"> + <return type="String"> + </return> + <argument index="0" name="from" type="Signal"> + </argument> + <description> + Constructs a new String from the given [Signal]. + </description> + </method> + <method name="String"> + <return type="String"> + </return> <argument index="0" name="from" type="Dictionary"> </argument> <description> @@ -166,64 +220,82 @@ <method name="String"> <return type="String"> </return> - <argument index="0" name="from" type="PoolByteArray"> + <argument index="0" name="from" type="PackedByteArray"> </argument> <description> - Constructs a new String from the given [PoolByteArray]. + Constructs a new String from the given [PackedByteArray]. </description> </method> <method name="String"> <return type="String"> </return> - <argument index="0" name="from" type="PoolIntArray"> + <argument index="0" name="from" type="PackedInt32Array"> </argument> <description> - Constructs a new String from the given [PoolIntArray]. + Constructs a new String from the given [PackedInt32Array]. </description> </method> <method name="String"> <return type="String"> </return> - <argument index="0" name="from" type="PoolRealArray"> + <argument index="0" name="from" type="PackedInt64Array"> </argument> <description> - Constructs a new String from the given [PoolRealArray]. + Constructs a new String from the given [PackedInt64Array]. </description> </method> <method name="String"> <return type="String"> </return> - <argument index="0" name="from" type="PoolStringArray"> + <argument index="0" name="from" type="PackedFloat32Array"> </argument> <description> - Constructs a new String from the given [PoolStringArray]. + Constructs a new String from the given [PackedFloat32Array]. </description> </method> <method name="String"> <return type="String"> </return> - <argument index="0" name="from" type="PoolVector2Array"> + <argument index="0" name="from" type="PackedFloat64Array"> </argument> <description> - Constructs a new String from the given [PoolVector2Array]. + Constructs a new String from the given [PackedFloat64Array]. </description> </method> <method name="String"> <return type="String"> </return> - <argument index="0" name="from" type="PoolVector3Array"> + <argument index="0" name="from" type="PackedStringArray"> </argument> <description> - Constructs a new String from the given [PoolVector3Array]. + Constructs a new String from the given [PackedStringArray]. </description> </method> <method name="String"> <return type="String"> </return> - <argument index="0" name="from" type="PoolColorArray"> + <argument index="0" name="from" type="PackedVector2Array"> </argument> <description> - Constructs a new String from the given [PoolColorArray]. + Constructs a new String from the given [PackedVector2Array]. + </description> + </method> + <method name="String"> + <return type="String"> + </return> + <argument index="0" name="from" type="PackedVector3Array"> + </argument> + <description> + Constructs a new String from the given [PackedVector3Array]. + </description> + </method> + <method name="String"> + <return type="String"> + </return> + <argument index="0" name="from" type="PackedColorArray"> + </argument> + <description> + Constructs a new String from the given [PackedColorArray]. </description> </method> <method name="begins_with"> @@ -236,7 +308,7 @@ </description> </method> <method name="bigrams"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <description> Returns the bigrams (pairs of consecutive letters) of this string. @@ -322,6 +394,8 @@ </description> </method> <method name="erase"> + <return type="void"> + </return> <argument index="0" name="position" type="int"> </argument> <argument index="1" name="chars" type="int"> @@ -366,7 +440,7 @@ </return> <argument index="0" name="values" type="Variant"> </argument> - <argument index="1" name="placeholder" type="String" default="{_}"> + <argument index="1" name="placeholder" type="String" default=""{_}""> </argument> <description> Formats the string by replacing all occurrences of [code]placeholder[/code] with [code]values[/code]. @@ -512,7 +586,7 @@ <method name="is_valid_hex_number"> <return type="bool"> </return> - <argument index="0" name="with_prefix" type="bool" default="False"> + <argument index="0" name="with_prefix" type="bool" default="false"> </argument> <description> Returns [code]true[/code] if this string contains a valid hexadecimal number. If [code]with_prefix[/code] is [code]true[/code], then a validity of the hexadecimal number is determined by [code]0x[/code] prefix, for instance: [code]0xDEADC0DE[/code]. @@ -546,6 +620,19 @@ Returns [code]true[/code] if this string contains a valid IP address. </description> </method> + <method name="join"> + <return type="String"> + </return> + <argument index="0" name="parts" type="PackedStringArray"> + </argument> + <description> + Return a [String] which is the concatenation of the [code]parts[/code]. The separator between elements is the string providing this method. + Example: + [codeblock] + print(", ".join(["One", "Two", "Three", "Four"])) + [/codeblock] + </description> + </method> <method name="json_escape"> <return type="String"> </return> @@ -597,7 +684,7 @@ </description> </method> <method name="md5_buffer"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <description> Returns the MD5 hash of the string as an array of bytes. @@ -732,11 +819,11 @@ </description> </method> <method name="rsplit"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="delimiter" type="String"> </argument> - <argument index="1" name="allow_empty" type="bool" default="True"> + <argument index="1" name="allow_empty" type="bool" default="true"> </argument> <argument index="2" name="maxsplit" type="int" default="0"> </argument> @@ -752,7 +839,6 @@ print(some_array[0]) # Prints "Four" print(some_array[1]) # Prints "Three,Two,One" [/codeblock] - </description> </method> <method name="rstrip"> @@ -765,7 +851,7 @@ </description> </method> <method name="sha1_buffer"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <description> Returns the SHA-1 hash of the string as an array of bytes. @@ -779,7 +865,7 @@ </description> </method> <method name="sha256_buffer"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <description> Returns the SHA-256 hash of the string as an array of bytes. @@ -802,11 +888,11 @@ </description> </method> <method name="split"> - <return type="PoolStringArray"> + <return type="PackedStringArray"> </return> <argument index="0" name="delimiter" type="String"> </argument> - <argument index="1" name="allow_empty" type="bool" default="True"> + <argument index="1" name="allow_empty" type="bool" default="true"> </argument> <argument index="2" name="maxsplit" type="int" default="0"> </argument> @@ -824,11 +910,11 @@ </description> </method> <method name="split_floats"> - <return type="PoolRealArray"> + <return type="PackedFloat32Array"> </return> <argument index="0" name="delimiter" type="String"> </argument> - <argument index="1" name="allow_empty" type="bool" default="True"> + <argument index="1" name="allow_empty" type="bool" default="true"> </argument> <description> Splits the string in floats by using a delimiter string and returns an array of the substrings. @@ -838,9 +924,9 @@ <method name="strip_edges"> <return type="String"> </return> - <argument index="0" name="left" type="bool" default="True"> + <argument index="0" name="left" type="bool" default="true"> </argument> - <argument index="1" name="right" type="bool" default="True"> + <argument index="1" name="right" type="bool" default="true"> </argument> <description> Returns a copy of the string stripped of any non-printable character (including tabulations, spaces and line breaks) at the beginning and the end. The optional arguments are used to toggle stripping on the left and right edges respectively. @@ -865,10 +951,10 @@ </description> </method> <method name="to_ascii"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <description> - Converts the String (which is a character array) to [PoolByteArray] (which is an array of bytes). The conversion is faster compared to [method to_utf8], as this method assumes that all the characters in the String are ASCII characters. + Converts the String (which is a character array) to [PackedByteArray] (which is an array of bytes). The conversion is faster compared to [method to_utf8], as this method assumes that all the characters in the String are ASCII characters. </description> </method> <method name="to_float"> @@ -900,10 +986,10 @@ </description> </method> <method name="to_utf8"> - <return type="PoolByteArray"> + <return type="PackedByteArray"> </return> <description> - Converts the String (which is an array of characters) to [PoolByteArray] (which is an array of bytes). The conversion is a bit slower than [method to_ascii], but supports all UTF-8 characters. Therefore, you should prefer this function over [method to_ascii]. + Converts the String (which is an array of characters) to [PackedByteArray] (which is an array of bytes). The conversion is a bit slower than [method to_ascii], but supports all UTF-8 characters. Therefore, you should prefer this function over [method to_ascii]. </description> </method> <method name="trim_prefix"> |