@@ -174,6 +174,7 @@ impl char {
174
174
/// assert_eq!('f'.to_digit(16), Some(15));
175
175
/// ```
176
176
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
177
+ #[ inline]
177
178
pub fn to_digit ( self , radix : u32 ) -> Option < u32 > { C :: to_digit ( self , radix) }
178
179
179
180
/// Returns an iterator that yields the hexadecimal Unicode escape of a
@@ -212,6 +213,7 @@ impl char {
212
213
/// assert_eq!(heart, r"\u{2764}");
213
214
/// ```
214
215
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
216
+ #[ inline]
215
217
pub fn escape_unicode ( self ) -> EscapeUnicode { C :: escape_unicode ( self ) }
216
218
217
219
/// Returns an iterator that yields the 'default' ASCII and
@@ -250,6 +252,7 @@ impl char {
250
252
/// assert_eq!(quote, "\\\"");
251
253
/// ```
252
254
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
255
+ #[ inline]
253
256
pub fn escape_default ( self ) -> EscapeDefault { C :: escape_default ( self ) }
254
257
255
258
/// Returns the number of bytes this character would need if encoded in
@@ -263,6 +266,7 @@ impl char {
263
266
/// assert_eq!(n, 2);
264
267
/// ```
265
268
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
269
+ #[ inline]
266
270
pub fn len_utf8 ( self ) -> usize { C :: len_utf8 ( self ) }
267
271
268
272
/// Returns the number of 16-bit code units this character would need if
@@ -276,6 +280,7 @@ impl char {
276
280
/// assert_eq!(n, 1);
277
281
/// ```
278
282
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
283
+ #[ inline]
279
284
pub fn len_utf16 ( self ) -> usize { C :: len_utf16 ( self ) }
280
285
281
286
/// Encodes this character as UTF-8 into the provided byte buffer, and then
@@ -310,6 +315,7 @@ impl char {
310
315
/// ```
311
316
#[ unstable( feature = "unicode" ,
312
317
reason = "pending decision about Iterator/Writer/Reader" ) ]
318
+ #[ inline]
313
319
pub fn encode_utf8 ( self , dst : & mut [ u8 ] ) -> Option < usize > { C :: encode_utf8 ( self , dst) }
314
320
315
321
/// Encodes this character as UTF-16 into the provided `u16` buffer, and
@@ -344,6 +350,7 @@ impl char {
344
350
/// ```
345
351
#[ unstable( feature = "unicode" ,
346
352
reason = "pending decision about Iterator/Writer/Reader" ) ]
353
+ #[ inline]
347
354
pub fn encode_utf16 ( self , dst : & mut [ u16 ] ) -> Option < usize > { C :: encode_utf16 ( self , dst) }
348
355
349
356
/// Returns whether the specified character is considered a Unicode
@@ -527,5 +534,6 @@ impl char {
527
534
since = "1.0.0" ) ]
528
535
#[ unstable( feature = "unicode" ,
529
536
reason = "needs expert opinion. is_cjk flag stands out as ugly" ) ]
537
+ #[ inline]
530
538
pub fn width ( self , is_cjk : bool ) -> Option < usize > { charwidth:: width ( self , is_cjk) }
531
539
}
0 commit comments