"char": use shorter names "to_lower"/"to_upper", analogous to the same names in "str"
This commit is contained in:
parent
e12b169247
commit
dd284eb396
3 changed files with 17 additions and 17 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue