summaryrefslogtreecommitdiffstats
path: root/core/string/string_name.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/string/string_name.h')
-rw-r--r--core/string/string_name.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/core/string/string_name.h b/core/string/string_name.h
index 0eb98cf64b..288e2c7520 100644
--- a/core/string/string_name.h
+++ b/core/string/string_name.h
@@ -60,6 +60,11 @@ class StringName {
uint32_t debug_references = 0;
#endif
String get_name() const { return cname ? String(cname) : name; }
+ bool operator==(const String &p_name) const;
+ bool operator!=(const String &p_name) const;
+ bool operator==(const char *p_name) const;
+ bool operator!=(const char *p_name) const;
+
int idx = 0;
uint32_t hash = 0;
_Data *prev = nullptr;
@@ -99,6 +104,10 @@ public:
bool operator!=(const String &p_name) const;
bool operator!=(const char *p_name) const;
+ char32_t operator[](int p_index) const;
+ int length() const;
+ bool is_empty() const;
+
_FORCE_INLINE_ bool is_node_unique_name() const {
if (!_data) {
return false;
@@ -175,7 +184,7 @@ public:
}
};
- void operator=(const StringName &p_name);
+ StringName &operator=(const StringName &p_name);
StringName(const char *p_name, bool p_static = false);
StringName(const StringName &p_name);
StringName(const String &p_name, bool p_static = false);