.. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. .. _class_RawArray: RawArray ======== **Category:** Built-In Types Brief Description ----------------- Raw byte array. Member Functions ---------------- +----------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`RawArray` | :ref:`RawArray` **(** :ref:`Array` from **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------+ | void | :ref:`append` **(** :ref:`int` byte **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------+ | void | :ref:`append_array` **(** :ref:`RawArray` array **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_string_from_ascii` **(** **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_string_from_utf8` **(** **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`insert` **(** :ref:`int` idx, :ref:`int` byte **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------+ | void | :ref:`invert` **(** **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------+ | void | :ref:`push_back` **(** :ref:`int` byte **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------+ | void | :ref:`remove` **(** :ref:`int` idx **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------+ | void | :ref:`resize` **(** :ref:`int` idx **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------+ | void | :ref:`set` **(** :ref:`int` idx, :ref:`int` byte **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`size` **(** **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------+ Description ----------- Raw byte array. Contains bytes. Optimized for memory usage, can't fragment the memory. Member Function Description --------------------------- .. _class_RawArray_RawArray: - :ref:`RawArray` **RawArray** **(** :ref:`Array` from **)** Create from a generic array. .. _class_RawArray_append: - void **append** **(** :ref:`int` byte **)** .. _class_RawArray_append_array: - void **append_array** **(** :ref:`RawArray` array **)** Append an :ref:`RawArray` at the end of this array. .. _class_RawArray_get_string_from_ascii: - :ref:`String` **get_string_from_ascii** **(** **)** Returns a copy of the array's contents formatted as String. Fast alternative to get_string_from_utf8(), assuming the content is ASCII-only (unlike the UTF-8 function, this function maps every byte to a character in the string, so any multibyte sequence will be torn apart). .. _class_RawArray_get_string_from_utf8: - :ref:`String` **get_string_from_utf8** **(** **)** Returns a copy of the array's contents formatted as String, assuming the array is formatted as UTF-8. Slower than get_string_from_ascii(), but works for UTF-8. Usually you should prefer this function over get_string_from_ascii() to support international input. .. _class_RawArray_insert: - :ref:`int` **insert** **(** :ref:`int` idx, :ref:`int` byte **)** Insert a new element at a given position in the array. The position must be valid, or at the end of the array (pos==size()). .. _class_RawArray_invert: - void **invert** **(** **)** Reverse the order of the elements in the array (so first element will now be the last). .. _class_RawArray_push_back: - void **push_back** **(** :ref:`int` byte **)** Append an element at the end of the array. .. _class_RawArray_remove: - void **remove** **(** :ref:`int` idx **)** Remove an element from the array by index. .. _class_RawArray_resize: - void **resize** **(** :ref:`int` idx **)** Set the size of the :ref:`RawArray`. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array. .. _class_RawArray_set: - void **set** **(** :ref:`int` idx, :ref:`int` byte **)** Change the byte at the given index. .. _class_RawArray_size: - :ref:`int` **size** **(** **)** Return the size of the array.