summaryrefslogtreecommitdiffstats
path: root/core/ustring.h
diff options
context:
space:
mode:
authorChaosus <chaosus89@gmail.com>2019-01-18 11:29:28 +0300
committerChaosus <chaosus89@gmail.com>2019-07-23 18:55:54 +0300
commit080c0bb7fea824f231e8972fe1e7f82290a2f453 (patch)
tree70c99fe65ad4e7a4d294206e1c65345e6f30116b /core/ustring.h
parentc7a427241e7f4dd6ab9ac89f51d3bb9f6632008b (diff)
downloadredot-engine-080c0bb7fea824f231e8972fe1e7f82290a2f453.tar.gz
Added count method to String
Diffstat (limited to 'core/ustring.h')
-rw-r--r--core/ustring.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/ustring.h b/core/ustring.h
index 8a52c53238..3eb5c47b3a 100644
--- a/core/ustring.h
+++ b/core/ustring.h
@@ -137,6 +137,7 @@ class String {
void copy_from(const CharType &p_char);
void copy_from_unchecked(const CharType *p_char, const int p_length);
bool _base_is_subsequence_of(const String &p_string, bool case_insensitive) const;
+ int _count(const String &p_string, int p_from, int p_to, bool p_case_insensitive) const;
public:
enum {
@@ -279,6 +280,9 @@ public:
String to_upper() const;
String to_lower() const;
+ int count(const String &p_string, int p_from = 0, int p_to = 0) const;
+ int countn(const String &p_string, int p_from = 0, int p_to = 0) const;
+
String left(int p_pos) const;
String right(int p_pos) const;
String dedent() const;