Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

CString: Don't repeat ourselves

  • Loading branch information...
commit 3347390cfcd24af48090f47a9f0818b89dcd6026 1 parent da33604
@kylef kylef authored
Showing with 2 additions and 14 deletions.
  1. +2 −14 src/ZNCString.cpp
View
16 src/ZNCString.cpp
@@ -144,25 +144,13 @@ CString& CString::MakeLower() {
CString CString::AsUpper() const {
CString sRet = *this;
-
- for (size_type a = 0; a < length(); a++) {
- char& c = sRet[a];
- //TODO use unicode
- c = (char)toupper(c);
- }
-
+ sRet.MakeUpper();
return sRet;
}
CString CString::AsLower() const {
CString sRet = *this;
-
- for (size_type a = 0; a < length(); a++) {
- char& c = sRet[a];
- //TODO use unicode
- c = (char)tolower(c);
- }
-
+ sRet.MakeLower();
return sRet;
}
Please sign in to comment.
Something went wrong with that request. Please try again.