class_stringname.rst 1.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the StringName.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_StringName:
  6. StringName
  7. ==========
  8. An optimized string type for unique names.
  9. Description
  10. -----------
  11. ``StringName``\ s are immutable strings designed for general-purpose represention of unique names. ``StringName`` ensures that only one instance of a given name exists (so two ``StringName``\ s with the same value are the same object). Comparing them is much faster than with regular :ref:`String<class_String>`\ s, because only the pointers are compared, not the whole strings.
  12. Methods
  13. -------
  14. +-------------------------------------+----------------------------------------------------------------------------------------------------+
  15. | :ref:`StringName<class_StringName>` | :ref:`StringName<class_StringName_method_StringName>` **(** :ref:`String<class_String>` from **)** |
  16. +-------------------------------------+----------------------------------------------------------------------------------------------------+
  17. Method Descriptions
  18. -------------------
  19. .. _class_StringName_method_StringName:
  20. - :ref:`StringName<class_StringName>` **StringName** **(** :ref:`String<class_String>` from **)**
  21. Creates a new ``StringName`` from the given :ref:`String<class_String>`.