Skip to content

Commit 024b7c0

Browse files
Lenny222marijnh
Lenny222
authored andcommitted
---
yaml --- r: 7020 b: refs/heads/master c: dd284eb h: refs/heads/master v: v3
1 parent d1a9143 commit 024b7c0

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

[refs]

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: e12b1692478e490fbffdc1aad86e6de627425f8d
2+
refs/heads/master: dd284eb396d802646106bdb15f474ebc10a9dfbb

trunk/src/libcore/char.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export is_alphabetic,
4141
is_XID_start, is_XID_continue,
4242
is_lowercase, is_uppercase,
4343
is_whitespace, is_alphanumeric,
44-
to_digit, to_lowercase, to_uppercase, maybe_digit, cmp;
44+
to_digit, to_lower, to_upper, maybe_digit, cmp;
4545

4646
import is_alphabetic = unicode::derived_property::Alphabetic;
4747
import is_XID_start = unicode::derived_property::XID_Start;
@@ -137,27 +137,27 @@ pure fn maybe_digit(c: char) -> option::t<u8> {
137137
}
138138

139139
/*
140-
Function: to_lowercase
140+
Function: to_lower
141141
142142
Convert a char to the corresponding lower case.
143143
144144
FIXME: works only on ASCII
145145
*/
146-
pure fn to_lowercase(c: char) -> char {
146+
pure fn to_lower(c: char) -> char {
147147
alt c {
148148
'A' to 'Z' { ((c as u8) + 32u8) as char }
149149
_ { c }
150150
}
151151
}
152152

153153
/*
154-
Function: to_uppercase
154+
Function: to_upper
155155
156156
Convert a char to the corresponding upper case.
157157
158158
FIXME: works only on ASCII
159159
*/
160-
pure fn to_uppercase(c: char) -> char {
160+
pure fn to_upper(c: char) -> char {
161161
alt c {
162162
'a' to 'z' { ((c as u8) - 32u8) as char }
163163
_ { c }

trunk/src/libcore/str.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@ Convert a string to lowercase
833833
fn to_lower(s: str) -> str {
834834
let outstr = "";
835835
iter_chars(s) { |c|
836-
push_char(outstr, char::to_lowercase(c));
836+
push_char(outstr, char::to_lower(c));
837837
}
838838
ret outstr;
839839
}
@@ -845,7 +845,7 @@ Convert a string to uppercase
845845
fn to_upper(s: str) -> str {
846846
let outstr = "";
847847
iter_chars(s) { |c|
848-
push_char(outstr, char::to_uppercase(c));
848+
push_char(outstr, char::to_upper(c));
849849
}
850850
ret outstr;
851851
}

trunk/src/test/stdtest/char.rs

+10-10
Original file line numberDiff line numberDiff line change
@@ -62,17 +62,17 @@ fn test_to_digit_fail_2() {
6262
}
6363

6464
#[test]
65-
fn test_to_lowercase() {
66-
assert (char::to_lowercase('H') == 'h');
67-
assert (char::to_lowercase('e') == 'e');
68-
//assert (char::to_lowercase('Ö') == 'ö');
69-
assert (char::to_lowercase('ß') == 'ß');
65+
fn test_to_lower() {
66+
assert (char::to_lower('H') == 'h');
67+
assert (char::to_lower('e') == 'e');
68+
//assert (char::to_lower('Ö') == 'ö');
69+
assert (char::to_lower('ß') == 'ß');
7070
}
7171

7272
#[test]
73-
fn test_to_uppercase() {
74-
assert (char::to_uppercase('l') == 'L');
75-
assert (char::to_uppercase('Q') == 'Q');
76-
//assert (char::to_uppercase('ü') == 'Ü');
77-
assert (char::to_uppercase('ß') == 'ß');
73+
fn test_to_upper() {
74+
assert (char::to_upper('l') == 'L');
75+
assert (char::to_upper('Q') == 'Q');
76+
//assert (char::to_upper('ü') == 'Ü');
77+
assert (char::to_upper('ß') == 'ß');
7878
}

0 commit comments

Comments
 (0)