diff options
Diffstat (limited to 'doc/classes/PackedByteArray.xml')
-rw-r--r-- | doc/classes/PackedByteArray.xml | 108 |
1 files changed, 65 insertions, 43 deletions
diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml index af92590da3..b16d45b8ca 100644 --- a/doc/classes/PackedByteArray.xml +++ b/doc/classes/PackedByteArray.xml @@ -8,27 +8,29 @@ </description> <tutorials> </tutorials> - <methods> - <method name="PackedByteArray" qualifiers="constructor"> + <constructors> + <constructor name="PackedByteArray"> <return type="PackedByteArray" /> <description> Constructs an empty [PackedByteArray]. </description> - </method> - <method name="PackedByteArray" qualifiers="constructor"> + </constructor> + <constructor name="PackedByteArray"> <return type="PackedByteArray" /> <argument index="0" name="from" type="PackedByteArray" /> <description> Constructs a [PackedByteArray] as a copy of the given [PackedByteArray]. </description> - </method> - <method name="PackedByteArray" qualifiers="constructor"> + </constructor> + <constructor name="PackedByteArray"> <return type="PackedByteArray" /> <argument index="0" name="from" type="Array" /> <description> Constructs a new [PackedByteArray]. Optionally, you can pass in a generic [Array] that will be converted. </description> - </method> + </constructor> + </constructors> + <methods> <method name="append"> <return type="bool" /> <argument index="0" name="value" type="int" /> @@ -43,6 +45,15 @@ Appends a [PackedByteArray] at the end of this array. </description> </method> + <method name="bsearch"> + <return type="int" /> + <argument index="0" name="value" type="int" /> + <argument index="1" name="before" type="bool" default="true" /> + <description> + Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [code]before[/code] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array. + [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior. + </description> + </method> <method name="compress" qualifiers="const"> <return type="PackedByteArray" /> <argument index="0" name="compression_mode" type="int" default="0" /> @@ -270,7 +281,7 @@ Converts UTF-8 encoded array to [String]. Slower than [method get_string_from_ascii] but supports UTF-8 encoded data. Use this function if you are unsure about the source of the data. For user input this function should always be preferred. Returns empty string if source array is not valid UTF-8 string. </description> </method> - <method name="has"> + <method name="has" qualifiers="const"> <return type="bool" /> <argument index="0" name="value" type="int" /> <description> @@ -314,30 +325,6 @@ Returns [code]true[/code] if the array is empty. </description> </method> - <method name="operator !=" qualifiers="operator"> - <return type="bool" /> - <argument index="0" name="right" type="PackedByteArray" /> - <description> - </description> - </method> - <method name="operator +" qualifiers="operator"> - <return type="PackedByteArray" /> - <argument index="0" name="right" type="PackedByteArray" /> - <description> - </description> - </method> - <method name="operator ==" qualifiers="operator"> - <return type="bool" /> - <argument index="0" name="right" type="PackedByteArray" /> - <description> - </description> - </method> - <method name="operator []" qualifiers="operator"> - <return type="int" /> - <argument index="0" name="index" type="int" /> - <description> - </description> - </method> <method name="push_back"> <return type="bool" /> <argument index="0" name="value" type="int" /> @@ -345,7 +332,7 @@ Appends an element at the end of the array. </description> </method> - <method name="remove"> + <method name="remove_at"> <return type="void" /> <argument index="0" name="index" type="int" /> <description> @@ -379,18 +366,19 @@ Returns the size of the array. </description> </method> - <method name="sort"> - <return type="void" /> + <method name="slice" qualifiers="const"> + <return type="PackedByteArray" /> + <argument index="0" name="begin" type="int" /> + <argument index="1" name="end" type="int" /> <description> - Sorts the elements of the array in ascending order. + Returns the slice of the [PackedByteArray], from [code]begin[/code] (inclusive) to [code]end[/code] (exclusive), as a new [PackedByteArray]. + If [code]end[/code]is negative, it will be relative to the end of the array. </description> </method> - <method name="subarray" qualifiers="const"> - <return type="PackedByteArray" /> - <argument index="0" name="from" type="int" /> - <argument index="1" name="to" type="int" /> + <method name="sort"> + <return type="void" /> <description> - Returns the slice of the [PackedByteArray] between indices (inclusive) as a new [PackedByteArray]. Any negative index is considered to be from the end of the array. + Sorts the elements of the array in ascending order. </description> </method> <method name="to_float32_array" qualifiers="const"> @@ -426,6 +414,40 @@ </description> </method> </methods> - <constants> - </constants> + <operators> + <operator name="operator !="> + <return type="bool" /> + <description> + </description> + </operator> + <operator name="operator !="> + <return type="bool" /> + <argument index="0" name="right" type="PackedByteArray" /> + <description> + </description> + </operator> + <operator name="operator +"> + <return type="PackedByteArray" /> + <argument index="0" name="right" type="PackedByteArray" /> + <description> + </description> + </operator> + <operator name="operator =="> + <return type="bool" /> + <description> + </description> + </operator> + <operator name="operator =="> + <return type="bool" /> + <argument index="0" name="right" type="PackedByteArray" /> + <description> + </description> + </operator> + <operator name="operator []"> + <return type="int" /> + <argument index="0" name="index" type="int" /> + <description> + </description> + </operator> + </operators> </class> |