@@ -98,6 +98,7 @@ pub fn from_u32(i: u32) -> Option<char> {
98
98
/// This just wraps `to_digit()`.
99
99
///
100
100
#[ inline]
101
+ #[ deprecated = "use the Char::is_digit method" ]
101
102
pub fn is_digit_radix ( c : char , radix : uint ) -> bool {
102
103
match to_digit ( c, radix) {
103
104
Some ( _) => true ,
@@ -120,6 +121,7 @@ pub fn is_digit_radix(c: char, radix: uint) -> bool {
120
121
/// Fails if given a `radix` outside the range `[0..36]`.
121
122
///
122
123
#[ inline]
124
+ #[ deprecated = "use the Char::to_digit method" ]
123
125
pub fn to_digit ( c : char , radix : uint ) -> Option < uint > {
124
126
if radix > 36 {
125
127
panic ! ( "to_digit: radix is too high (maximum 36)" ) ;
@@ -174,6 +176,7 @@ pub fn from_digit(num: uint, radix: uint) -> Option<char> {
174
176
/// - chars in [0x100,0xffff] get 4-digit escapes: `\\uNNNN`
175
177
/// - chars above 0x10000 get 8-digit escapes: `\\UNNNNNNNN`
176
178
///
179
+ #[ deprecated = "use the Char::escape_unicode method" ]
177
180
pub fn escape_unicode ( c : char , f: |char|) {
178
181
// avoid calling str::to_str_radix because we don't really need to allocate
179
182
// here.
@@ -206,6 +209,7 @@ pub fn escape_unicode(c: char, f: |char|) {
206
209
/// - Any other chars in the range [0x20,0x7e] are not escaped.
207
210
/// - Any other chars are given hex Unicode escapes; see `escape_unicode`.
208
211
///
212
+ #[ deprecated = "use the Char::escape_default method" ]
209
213
pub fn escape_default ( c : char , f: |char|) {
210
214
match c {
211
215
'\t' => { f ( '\\' ) ; f ( 't' ) ; }
@@ -221,6 +225,7 @@ pub fn escape_default(c: char, f: |char|) {
221
225
222
226
/// Returns the amount of bytes this `char` would need if encoded in UTF-8
223
227
#[ inline]
228
+ #[ deprecated = "use the Char::len_utf8 method" ]
224
229
pub fn len_utf8_bytes ( c : char ) -> uint {
225
230
let code = c as u32 ;
226
231
match ( ) {
0 commit comments