diff options
| author | Brian Anderson <banderson@mozilla.com> | 2014-10-08 17:15:27 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2014-11-21 13:17:04 -0800 |
| commit | c2aff692fa88235d356725f98184a5ea5b52eb88 (patch) | |
| tree | 07f840ccdb488f4d62cbd8ce7fefceac41c67ed1 /src/libunicode | |
| parent | ac2f379abb13b249aa1e630e14fa42f9415160f8 (diff) | |
unicode: Rename UnicodeChar::is_digit to is_numeric
'Numeric' is the proper name of the unicode character class, and this frees up the word 'digit' for ascii use in libcore. Since I'm going to rename `Char::is_digit_radix` to `is_digit`, I am not leaving a deprecated method in place, because that would just cause name clashes, as both `Char` and `UnicodeChar` are in the prelude. [breaking-change]
Diffstat (limited to 'src/libunicode')
| -rw-r--r-- | src/libunicode/u_char.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libunicode/u_char.rs b/src/libunicode/u_char.rs index bac8b21ea68..4bedc6f21f4 100644 --- a/src/libunicode/u_char.rs +++ b/src/libunicode/u_char.rs @@ -217,7 +217,7 @@ pub trait UnicodeChar { fn is_control(&self) -> bool; /// Indicates whether the character is numeric (Nd, Nl, or No). - fn is_digit(&self) -> bool; + fn is_numeric(&self) -> bool; /// Converts a character to its lowercase equivalent. /// @@ -281,7 +281,7 @@ impl UnicodeChar for char { fn is_control(&self) -> bool { is_control(*self) } - fn is_digit(&self) -> bool { is_digit(*self) } + fn is_numeric(&self) -> bool { is_digit(*self) } fn to_lowercase(&self) -> char { to_lowercase(*self) } |
