Luna::Name
Represents one name string.
class Luna::Name
The name string is one constant string that is mainly used to identify entities in LunaSDK. Name strings are reference counted and managed by system, all Name objects containing the same name string will refer the same name internal string data, enabling fast comparison: instead of comparing the whole string, we only need to compare one pointer to determine whether two name strings are the same.
Member functions
-
Constructs one empty name.
-
Constructs one name with the provided name string.
-
Name(const c8 *name, usize count)
Constructs one name with the provided name string and size.
-
Constructs one name from one string.
-
Name(const String &str, usize pos, usize count)
Constructs one name from one substring of the provided string.
-
Gets the internal string pointer of this name.
-
Gets the size of the name string.
-
Gets the ID of the name string.
-
Checks whether this name string is empty.
-
Checks whether this name string is empty.
-
Clears the name string and resets it to one empty name.
-
bool operator==(const Name &rhs) const
Compares two names for equality.
-
bool operator!=(const Name &rhs) const
Compares two names for non-equality.
-
Converts one name to one string.