mod prelude {
// from core.
pub use core::borrow::IntoCow;
- pub use core::char::Char;
+ pub use core::char::CharExt;
pub use core::clone::Clone;
pub use core::cmp::{PartialEq, Eq, PartialOrd, Ord};
pub use core::cmp::Ordering::{Less, Equal, Greater};
use self::DecompositionType::*;
use core::borrow::{BorrowFrom, ToOwned};
-use core::char::Char;
+use core::char::CharExt;
use core::clone::Clone;
use core::iter::AdditiveIterator;
use core::iter::{range, Iterator, IteratorExt};
/// Basic `char` manipulations.
#[stable]
-pub trait Char {
+pub trait CharExt {
/// Checks if a `char` parses as a numeric digit in the given radix.
///
/// Compared to `is_numeric()`, this function only recognizes the characters
pub use self::SignFormat::*;
use char;
-use char::Char;
+use char::CharExt;
use fmt;
use iter::{IteratorExt, range};
use num::{cast, Float, ToPrimitive};
prefix: &str,
buf: &str)
-> Result {
- use char::Char;
+ use char::CharExt;
use fmt::rt::{FlagAlternate, FlagSignPlus, FlagSignAwareZeroPad};
let mut width = buf.len();
fn with_padding<F>(&mut self, padding: uint, default: rt::Alignment, f: F) -> Result where
F: FnOnce(&mut Formatter) -> Result,
{
- use char::Char;
+ use char::CharExt;
let align = match self.align {
rt::AlignUnknown => default,
_ => self.align
impl Show for char {
fn fmt(&self, f: &mut Formatter) -> Result {
- use char::Char;
+ use char::CharExt;
let mut utf8 = [0u8; 4];
let amt = self.encode_utf8(&mut utf8).unwrap_or(0);
#![stable]
#![allow(missing_docs)]
-use char::Char;
+use char::CharExt;
use clone::Clone;
use cmp::{PartialEq, Eq};
use cmp::{PartialOrd, Ord};
// Reexported types and traits
-pub use char::Char;
+pub use char::CharExt;
pub use clone::Clone;
pub use cmp::{PartialEq, PartialOrd, Eq, Ord};
pub use iter::{Extend, IteratorExt};
use std::rc::Rc;
use std::u32;
use std::str::Str as StrTrait; // Conflicts with Str variant
-use std::char::Char as CharTrait; // Conflicts with Char variant
use std::path::Path as FsPath; // Conflicts with Path struct
use core::DocContext;
pub use self::FileAccess::*;
pub use self::IoErrorKind::*;
-use char::Char;
+use char::CharExt;
use clone::Clone;
use default::Default;
use error::{FromError, Error};
// Reexported types and traits
#[stable] #[doc(no_inline)] pub use boxed::Box;
-#[stable] #[doc(no_inline)] pub use char::{Char, UnicodeChar};
+#[stable] #[doc(no_inline)] pub use char::{CharExt, UnicodeChar};
#[stable] #[doc(no_inline)] pub use clone::Clone;
#[stable] #[doc(no_inline)] pub use cmp::{PartialEq, PartialOrd, Eq, Ord};
#[stable] #[doc(no_inline)] pub use iter::CloneIteratorExt;
/// however the converse is not always true due to the above range limits
/// and, as such, should be performed via the `from_u32` function..
pub mod char {
- pub use core::char::{MAX, from_u32, from_digit, Char};
+ pub use core::char::{MAX, from_u32, from_digit, CharExt};
pub use normalize::{decompose_canonical, decompose_compatible, compose};