class_rawarray.rst 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
  3. .. _class_RawArray:
  4. RawArray
  5. ========
  6. **Category:** Built-In Types
  7. Brief Description
  8. -----------------
  9. Raw byte array.
  10. Member Functions
  11. ----------------
  12. +----------------------------------+----------------------------------------------------------------------------------------------------+
  13. | :ref:`String<class_string>` | :ref:`get_string_from_ascii<class_RawArray_get_string_from_ascii>` **(** **)** |
  14. +----------------------------------+----------------------------------------------------------------------------------------------------+
  15. | :ref:`String<class_string>` | :ref:`get_string_from_utf8<class_RawArray_get_string_from_utf8>` **(** **)** |
  16. +----------------------------------+----------------------------------------------------------------------------------------------------+
  17. | void | :ref:`push_back<class_RawArray_push_back>` **(** :ref:`int<class_int>` byte **)** |
  18. +----------------------------------+----------------------------------------------------------------------------------------------------+
  19. | void | :ref:`resize<class_RawArray_resize>` **(** :ref:`int<class_int>` idx **)** |
  20. +----------------------------------+----------------------------------------------------------------------------------------------------+
  21. | void | :ref:`set<class_RawArray_set>` **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` byte **)** |
  22. +----------------------------------+----------------------------------------------------------------------------------------------------+
  23. | :ref:`int<class_int>` | :ref:`size<class_RawArray_size>` **(** **)** |
  24. +----------------------------------+----------------------------------------------------------------------------------------------------+
  25. | :ref:`RawArray<class_rawarray>` | :ref:`RawArray<class_RawArray_RawArray>` **(** :ref:`Array<class_array>` from **)** |
  26. +----------------------------------+----------------------------------------------------------------------------------------------------+
  27. Description
  28. -----------
  29. Raw byte array. Contains bytes. Optimized for memory usage, can't fragment the memory.
  30. Member Function Description
  31. ---------------------------
  32. .. _class_RawArray_get_string_from_ascii:
  33. - :ref:`String<class_string>` **get_string_from_ascii** **(** **)**
  34. 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).
  35. .. _class_RawArray_get_string_from_utf8:
  36. - :ref:`String<class_string>` **get_string_from_utf8** **(** **)**
  37. 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.
  38. .. _class_RawArray_push_back:
  39. - void **push_back** **(** :ref:`int<class_int>` byte **)**
  40. .. _class_RawArray_resize:
  41. - void **resize** **(** :ref:`int<class_int>` idx **)**
  42. .. _class_RawArray_set:
  43. - void **set** **(** :ref:`int<class_int>` idx, :ref:`int<class_int>` byte **)**
  44. .. _class_RawArray_size:
  45. - :ref:`int<class_int>` **size** **(** **)**
  46. .. _class_RawArray_RawArray:
  47. - :ref:`RawArray<class_rawarray>` **RawArray** **(** :ref:`Array<class_array>` from **)**