We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f530aa0 commit 41fb8f7Copy full SHA for 41fb8f7
src/libcore/char.rs
@@ -270,6 +270,9 @@ pub trait Char {
270
/// Panics if given a radix > 36.
271
fn from_digit(num: uint, radix: uint) -> Option<Self>;
272
273
+ /// Converts from `u32` to a `char`
274
+ fn from_u32(i: u32) -> Option<char>;
275
+
276
/// Returns the hexadecimal Unicode escape of a character.
277
///
278
/// The rules are as follows:
@@ -319,6 +322,9 @@ impl Char for char {
319
322
320
323
fn from_digit(num: uint, radix: uint) -> Option<char> { from_digit(num, radix) }
321
324
325
+ #[inline]
326
+ fn from_u32(i: u32) -> Option<char> { from_u32(i) }
327
328
fn escape_unicode(&self, f: |char|) { escape_unicode(*self, f) }
329
330
fn escape_default(&self, f: |char|) { escape_default(*self, f) }
0 commit comments