mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-03 05:48:42 +03:00
35 lines
1.4 KiB
ReStructuredText
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>`.
|
|
|