@@ -119,6 +119,7 @@ impl char {
119
119
/// assert_eq!('f'.to_digit(16), Some(15));
120
120
/// ```
121
121
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
122
+ #[ inline]
122
123
pub fn to_digit ( self , radix : u32 ) -> Option < u32 > { C :: to_digit ( self , radix) }
123
124
124
125
/// Returns an iterator that yields the hexadecimal Unicode escape of a
@@ -157,6 +158,7 @@ impl char {
157
158
/// assert_eq!(heart, r"\u{2764}");
158
159
/// ```
159
160
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
161
+ #[ inline]
160
162
pub fn escape_unicode ( self ) -> EscapeUnicode { C :: escape_unicode ( self ) }
161
163
162
164
/// Returns an iterator that yields the 'default' ASCII and
@@ -195,6 +197,7 @@ impl char {
195
197
/// assert_eq!(quote, "\\\"");
196
198
/// ```
197
199
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
200
+ #[ inline]
198
201
pub fn escape_default ( self ) -> EscapeDefault { C :: escape_default ( self ) }
199
202
200
203
/// Returns the number of bytes this character would need if encoded in
@@ -208,6 +211,7 @@ impl char {
208
211
/// assert_eq!(n, 2);
209
212
/// ```
210
213
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
214
+ #[ inline]
211
215
pub fn len_utf8 ( self ) -> usize { C :: len_utf8 ( self ) }
212
216
213
217
/// Returns the number of 16-bit code units this character would need if
@@ -221,6 +225,7 @@ impl char {
221
225
/// assert_eq!(n, 1);
222
226
/// ```
223
227
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
228
+ #[ inline]
224
229
pub fn len_utf16 ( self ) -> usize { C :: len_utf16 ( self ) }
225
230
226
231
/// Encodes this character as UTF-8 into the provided byte buffer, and then
@@ -255,6 +260,7 @@ impl char {
255
260
/// ```
256
261
#[ unstable( feature = "unicode" ,
257
262
reason = "pending decision about Iterator/Writer/Reader" ) ]
263
+ #[ inline]
258
264
pub fn encode_utf8 ( self , dst : & mut [ u8 ] ) -> Option < usize > { C :: encode_utf8 ( self , dst) }
259
265
260
266
/// Encodes this character as UTF-16 into the provided `u16` buffer, and
@@ -289,6 +295,7 @@ impl char {
289
295
/// ```
290
296
#[ unstable( feature = "unicode" ,
291
297
reason = "pending decision about Iterator/Writer/Reader" ) ]
298
+ #[ inline]
292
299
pub fn encode_utf16 ( self , dst : & mut [ u16 ] ) -> Option < usize > { C :: encode_utf16 ( self , dst) }
293
300
294
301
/// Returns whether the specified character is considered a Unicode
@@ -451,5 +458,6 @@ impl char {
451
458
since = "1.0.0" ) ]
452
459
#[ unstable( feature = "unicode" ,
453
460
reason = "needs expert opinion. is_cjk flag stands out as ugly" ) ]
461
+ #[ inline]
454
462
pub fn width ( self , is_cjk : bool ) -> Option < usize > { charwidth:: width ( self , is_cjk) }
455
463
}
0 commit comments