Skip to content

Commit

Permalink
remove unused capitalization arg
Browse files Browse the repository at this point in the history
  • Loading branch information
Valla-Chan committed Jun 3, 2024
1 parent 8ddd38a commit 7696a03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions core/ustring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -646,11 +646,11 @@ void String::erase(int p_pos, int p_chars) {
*this = left(p_pos) + substr(p_pos + p_chars, length() - ((p_pos + p_chars)));
}

String String::capitalize(bool replace_underscores) const {
String String::capitalize() const { //bool replace_underscores
String aux = this->camelcase_to_underscore(true).strip_edges();
if (replace_underscores) {
//if (replace_underscores) {
aux = aux.replace("_", " ");
}
//}
String cap;
for (int i = 0; i < aux.get_slice_count(" "); i++) {
String slice = aux.get_slicec(' ', i);
Expand Down
2 changes: 1 addition & 1 deletion core/ustring.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ class String {
static double to_double(const char *p_str);
static double to_double(const CharType *p_str, const CharType **r_end = nullptr);
static int64_t to_int(const CharType *p_str, int p_len = -1);
String capitalize(bool replace_underscores = true) const;
String capitalize() const; //bool replace_underscores = true
String camelcase_to_underscore(bool lowercase = true) const;
String to_camel_case() const;
String to_pascal_case() const;
Expand Down

0 comments on commit 7696a03

Please sign in to comment.