@@ -302,7 +302,7 @@ void String::copy_from(const char *p_cstr) {
302302
303303 resize (len + 1 ); // include 0
304304
305- char32_t *dst = this -> ptrw ();
305+ char32_t *dst = ptrw ();
306306
307307 for (size_t i = 0 ; i <= len; i++) {
308308#if CHAR_MIN == 0
@@ -339,7 +339,7 @@ void String::copy_from(const char *p_cstr, const int p_clip_to) {
339339
340340 resize (len + 1 ); // include 0
341341
342- char32_t *dst = this -> ptrw ();
342+ char32_t *dst = ptrw ();
343343
344344 for (int i = 0 ; i < len; i++) {
345345#if CHAR_MIN == 0
@@ -1043,7 +1043,7 @@ String String::_camelcase_to_underscore() const {
10431043 String new_string;
10441044 int start_index = 0 ;
10451045
1046- for (int i = 1 ; i < this -> size (); i++) {
1046+ for (int i = 1 ; i < size (); i++) {
10471047 bool is_prev_upper = is_ascii_upper_case (cstr[i - 1 ]);
10481048 bool is_prev_lower = is_ascii_lower_case (cstr[i - 1 ]);
10491049 bool is_prev_digit = is_digit (cstr[i - 1 ]);
@@ -1053,7 +1053,7 @@ String String::_camelcase_to_underscore() const {
10531053 bool is_curr_digit = is_digit (cstr[i]);
10541054
10551055 bool is_next_lower = false ;
1056- if (i + 1 < this -> size ()) {
1056+ if (i + 1 < size ()) {
10571057 is_next_lower = is_ascii_lower_case (cstr[i + 1 ]);
10581058 }
10591059
@@ -1063,17 +1063,17 @@ String String::_camelcase_to_underscore() const {
10631063 const bool cond_d = (is_prev_upper || is_prev_lower) && is_curr_digit; // A2, a2
10641064
10651065 if (cond_a || cond_b || cond_c || cond_d) {
1066- new_string += this -> substr (start_index, i - start_index) + " _" ;
1066+ new_string += substr (start_index, i - start_index) + " _" ;
10671067 start_index = i;
10681068 }
10691069 }
10701070
1071- new_string += this -> substr (start_index, this -> size () - start_index);
1071+ new_string += substr (start_index, size () - start_index);
10721072 return new_string.to_lower ();
10731073}
10741074
10751075String String::capitalize () const {
1076- String aux = this -> _camelcase_to_underscore ().replace (" _" , " " ).strip_edges ();
1076+ String aux = _camelcase_to_underscore ().replace (" _" , " " ).strip_edges ();
10771077 String cap;
10781078 for (int i = 0 ; i < aux.get_slice_count (" " ); i++) {
10791079 String slice = aux.get_slicec (' ' , i);
@@ -1090,19 +1090,19 @@ String String::capitalize() const {
10901090}
10911091
10921092String String::to_camel_case () const {
1093- String s = this -> to_pascal_case ();
1093+ String s = to_pascal_case ();
10941094 if (!s.is_empty ()) {
10951095 s[0 ] = _find_lower (s[0 ]);
10961096 }
10971097 return s;
10981098}
10991099
11001100String String::to_pascal_case () const {
1101- return this -> capitalize ().replace (" " , " " );
1101+ return capitalize ().replace (" " , " " );
11021102}
11031103
11041104String String::to_snake_case () const {
1105- return this -> _camelcase_to_underscore ().replace (" " , " _" ).strip_edges ();
1105+ return _camelcase_to_underscore ().replace (" " , " _" ).strip_edges ();
11061106}
11071107
11081108String String::get_with_code_lines () const {
@@ -1185,7 +1185,7 @@ String String::get_slicec(char32_t p_splitter, int p_slice) const {
11851185 return String ();
11861186 }
11871187
1188- const char32_t *c = this -> ptr ();
1188+ const char32_t *c = ptr ();
11891189 int i = 0 ;
11901190 int prev = 0 ;
11911191 int count = 0 ;
@@ -3516,7 +3516,7 @@ bool String::matchn(const String &p_wildcard) const {
35163516}
35173517
35183518String String::format (const Variant &values, const String &placeholder) const {
3519- String new_string = String (this -> ptr ());
3519+ String new_string = String (ptr ());
35203520
35213521 if (values.get_type () == Variant::ARRAY ) {
35223522 Array values_arr = values;
@@ -4467,7 +4467,7 @@ bool String::is_valid_float() const {
44674467
44684468String String::path_to_file (const String &p_path) const {
44694469 // Don't get base dir for src, this is expected to be a dir already.
4470- String src = this -> replace (" \\ " , " /" );
4470+ String src = replace (" \\ " , " /" );
44714471 String dst = p_path.replace (" \\ " , " /" ).get_base_dir ();
44724472 String rel = src.path_to (dst);
44734473 if (rel == dst) { // failed
@@ -4478,7 +4478,7 @@ String String::path_to_file(const String &p_path) const {
44784478}
44794479
44804480String String::path_to (const String &p_path) const {
4481- String src = this -> replace (" \\ " , " /" );
4481+ String src = replace (" \\ " , " /" );
44824482 String dst = p_path.replace (" \\ " , " /" );
44834483 if (!src.ends_with (" /" )) {
44844484 src += " /" ;
0 commit comments