From adbe948bda202209b55249198e1837324e703ddb Mon Sep 17 00:00:00 2001 From: Anilforextra Date: Thu, 3 Feb 2022 21:48:38 +0545 Subject: String: Add contains(). --- core/string/ustring.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/string') diff --git a/core/string/ustring.h b/core/string/ustring.h index 6df87280a4..b685e3929f 100644 --- a/core/string/ustring.h +++ b/core/string/ustring.h @@ -394,6 +394,8 @@ public: Vector sha256_buffer() const; _FORCE_INLINE_ bool is_empty() const { return length() == 0; } + _FORCE_INLINE_ bool contains(const char *p_str) const { return find(p_str) != -1; } + _FORCE_INLINE_ bool contains(const String &p_str) const { return find(p_str) != -1; } // path functions bool is_absolute_path() const; -- cgit v1.2.3