1
Fork 0

"char": use shorter names "to_lower"/"to_upper", analogous to the same names in "str"

This commit is contained in:
Lenny222 2012-01-02 21:29:44 +01:00 committed by Marijn Haverbeke
parent e12b169247
commit dd284eb396
3 changed files with 17 additions and 17 deletions

View file

@ -833,7 +833,7 @@ Convert a string to lowercase
fn to_lower(s: str) -> str {
let outstr = "";
iter_chars(s) { |c|
push_char(outstr, char::to_lowercase(c));
push_char(outstr, char::to_lower(c));
}
ret outstr;
}
@ -845,7 +845,7 @@ Convert a string to uppercase
fn to_upper(s: str) -> str {
let outstr = "";
iter_chars(s) { |c|
push_char(outstr, char::to_uppercase(c));
push_char(outstr, char::to_upper(c));
}
ret outstr;
}