Files
godot-docs/classes/class_stringname.rst
2020-03-13 17:17:50 +01:00

35 lines
1.4 KiB
ReStructuredText

:github_url: hide
.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
.. DO NOT EDIT THIS FILE, but the StringName.xml source instead.
.. The source is found in doc/classes or modules/<name>/doc_classes.
.. _class_StringName:
StringName
==========
An optimized string type for unique names.
Description
-----------
``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.
Methods
-------
+-------------------------------------+----------------------------------------------------------------------------------------------------+
| :ref:`StringName<class_StringName>` | :ref:`StringName<class_StringName_method_StringName>` **(** :ref:`String<class_String>` from **)** |
+-------------------------------------+----------------------------------------------------------------------------------------------------+
Method Descriptions
-------------------
.. _class_StringName_method_StringName:
- :ref:`StringName<class_StringName>` **StringName** **(** :ref:`String<class_String>` from **)**
Creates a new ``StringName`` from the given :ref:`String<class_String>`.