about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorLenny222 <github@kudling.de>2012-01-02 21:29:44 +0100
committerMarijn Haverbeke <marijnh@gmail.com>2012-01-04 09:33:04 +0100
commitdd284eb396d802646106bdb15f474ebc10a9dfbb (patch)
treeb9dadd471034fc5d1fe0619e5bd8ec9d9612996c /src/libcore
parente12b1692478e490fbffdc1aad86e6de627425f8d (diff)
"char": use shorter names "to_lower"/"to_upper", analogous to the same names in "str"
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/char.rs10
-rw-r--r--src/libcore/str.rs4
2 files changed, 7 insertions, 7 deletions
diff --git a/src/libcore/char.rs b/src/libcore/char.rs
index 40c4033066e..5475e695a79 100644
--- a/src/libcore/char.rs
+++ b/src/libcore/char.rs
@@ -41,7 +41,7 @@ export is_alphabetic,
        is_XID_start, is_XID_continue,
        is_lowercase, is_uppercase,
        is_whitespace, is_alphanumeric,
-       to_digit, to_lowercase, to_uppercase, maybe_digit, cmp;
+       to_digit, to_lower, to_upper, maybe_digit, cmp;
 
 import is_alphabetic = unicode::derived_property::Alphabetic;
 import is_XID_start = unicode::derived_property::XID_Start;
@@ -137,13 +137,13 @@ pure fn maybe_digit(c: char) -> option::t<u8> {
 }
 
 /*
- Function: to_lowercase
+ Function: to_lower
 
  Convert a char to the corresponding lower case.
 
  FIXME: works only on ASCII
 */
-pure fn to_lowercase(c: char) -> char {
+pure fn to_lower(c: char) -> char {
     alt c {
       'A' to 'Z' { ((c as u8) + 32u8) as char }
       _ { c }
@@ -151,13 +151,13 @@ pure fn to_lowercase(c: char) -> char {
 }
 
 /*
- Function: to_uppercase
+ Function: to_upper
 
  Convert a char to the corresponding upper case.
 
  FIXME: works only on ASCII
 */
-pure fn to_uppercase(c: char) -> char {
+pure fn to_upper(c: char) -> char {
     alt c {
       'a' to 'z' { ((c as u8) - 32u8) as char }
       _ { c }
diff --git a/src/libcore/str.rs b/src/libcore/str.rs
index de29f297192..1872d0ae674 100644
--- a/src/libcore/str.rs
+++ b/src/libcore/str.rs
@@ -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;
 }