diff options
author | George Marques <george@gmarqu.es> | 2018-04-22 12:29:44 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-22 12:29:44 -0300 |
commit | ca25f1e6eae9ffd498ddba05f94e341827269fea (patch) | |
tree | 66920ff079533dc4647378a9907756c638fdca5a /core/ustring.h | |
parent | 06c5a9ed5f728cff6e6460a67e4b14d3419d41fe (diff) | |
parent | 79ecdee49631c1571b6629005b73b0d9aa3dbc34 (diff) | |
download | redot-engine-ca25f1e6eae9ffd498ddba05f94e341827269fea.tar.gz |
Merge pull request #18176 from nikibobi/string-trim
Add string trim_prefix, trim_suffix, lstrip and rstrip methods
Diffstat (limited to 'core/ustring.h')
-rw-r--r-- | core/ustring.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/ustring.h b/core/ustring.h index bb676ce623..1ed694bb80 100644 --- a/core/ustring.h +++ b/core/ustring.h @@ -137,6 +137,8 @@ public: String insert(int p_at_pos, const String &p_string) const; String pad_decimals(int p_digits) const; String pad_zeros(int p_digits) const; + String trim_prefix(const String &p_prefix) const; + String trim_suffix(const String &p_suffix) const; String lpad(int min_length, const String &character = " ") const; String rpad(int min_length, const String &character = " ") const; String sprintf(const Array &values, bool *error) const; @@ -188,6 +190,8 @@ public: String dedent() const; String strip_edges(bool left = true, bool right = true) const; String strip_escapes() const; + String lstrip(const Vector<CharType> &p_chars) const; + String rstrip(const Vector<CharType> &p_chars) const; String get_extension() const; String get_basename() const; String plus_file(const String &p_file) const; |