:github_url: hide .. Generated automatically by doc/tools/make_rst.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//doc_classes. .. _class_StringName: StringName ========== An optimized string type for unique names. Description ----------- ``StringName``\ s are immutable strings designed for general-purpose representation 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`\ s, because only the pointers are compared, not the whole strings. Constructors ------------ +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :ref:`StringName` | :ref:`StringName` **(** **)** | +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :ref:`StringName` | :ref:`StringName` **(** :ref:`StringName` from **)** | +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ | :ref:`StringName` | :ref:`StringName` **(** :ref:`String` from **)** | +-------------------------------------+-----------------------------------------------------------------------------------------------------------------+ Operators --------- +-------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** **)** | +-------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`String` right **)** | +-------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator !=` **(** :ref:`StringName` right **)** | +-------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator <` **(** :ref:`StringName` right **)** | +-------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator <=` **(** :ref:`StringName` right **)** | +-------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** **)** | +-------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`String` right **)** | +-------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator ==` **(** :ref:`StringName` right **)** | +-------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator >` **(** :ref:`StringName` right **)** | +-------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`operator >=` **(** :ref:`StringName` right **)** | +-------------------------+--------------------------------------------------------------------------------------------------------------+ Constructor Descriptions ------------------------ .. _class_StringName_constructor_StringName: - :ref:`StringName` **StringName** **(** **)** Constructs an empty ``StringName``. ---- - :ref:`StringName` **StringName** **(** :ref:`StringName` from **)** Constructs a ``StringName`` as a copy of the given ``StringName``. ---- - :ref:`StringName` **StringName** **(** :ref:`String` from **)** Creates a new ``StringName`` from the given :ref:`String`. Operator Descriptions --------------------- .. _class_StringName_operator_neq_bool: - :ref:`bool` **operator !=** **(** **)** ---- - :ref:`bool` **operator !=** **(** :ref:`String` right **)** ---- - :ref:`bool` **operator !=** **(** :ref:`StringName` right **)** ---- .. _class_StringName_operator_lt_bool: - :ref:`bool` **operator <** **(** :ref:`StringName` right **)** ---- .. _class_StringName_operator_lte_bool: - :ref:`bool` **operator <=** **(** :ref:`StringName` right **)** ---- .. _class_StringName_operator_eq_bool: - :ref:`bool` **operator ==** **(** **)** ---- - :ref:`bool` **operator ==** **(** :ref:`String` right **)** ---- - :ref:`bool` **operator ==** **(** :ref:`StringName` right **)** ---- .. _class_StringName_operator_gt_bool: - :ref:`bool` **operator >** **(** :ref:`StringName` right **)** ---- .. _class_StringName_operator_gte_bool: - :ref:`bool` **operator >=** **(** :ref:`StringName` right **)** .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`