diff --git a/mk/crates.mk b/mk/crates.mk index 44d46fe73d9..9da80c2bc11 100644 --- a/mk/crates.mk +++ b/mk/crates.mk @@ -51,12 +51,13 @@ TARGET_CRATES := libc std green rustuv native flate arena glob term semver \ uuid serialize sync getopts collections num test time rand \ - workcache url log regex graphviz + workcache url log regex graphviz core HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros CRATES := $(TARGET_CRATES) $(HOST_CRATES) TOOLS := compiletest rustdoc rustc -DEPS_std := libc native:rustrt native:compiler-rt native:backtrace +DEPS_core := +DEPS_std := core libc native:rustrt native:compiler-rt native:backtrace DEPS_green := std rand native:context_switch DEPS_rustuv := std native:uv native:uv_support DEPS_native := std @@ -95,6 +96,8 @@ TOOL_SOURCE_compiletest := $(S)src/compiletest/compiletest.rs TOOL_SOURCE_rustdoc := $(S)src/driver/driver.rs TOOL_SOURCE_rustc := $(S)src/driver/driver.rs +ONLY_RLIB_core := 1 + ################################################################################ # You should not need to edit below this line ################################################################################ diff --git a/mk/host.mk b/mk/host.mk index 7a3664d897d..ea2ac7a1140 100644 --- a/mk/host.mk +++ b/mk/host.mk @@ -18,6 +18,7 @@ # $(5) - the name of the crate being processed define CP_HOST_STAGE_N_CRATE +ifeq ($$(ONLY_RLIB_$(5)),) $$(HLIB$(2)_H_$(4))/stamp.$(5): \ $$(TLIB$(1)_T_$(3)_H_$(4))/stamp.$(5) \ $$(RUST_DEPS_$(5):%=$$(HLIB$(2)_H_$(4))/stamp.%) \ @@ -30,6 +31,10 @@ $$(HLIB$(2)_H_$(4))/stamp.$(5): \ $$(HLIB$(2)_H_$(4)) $$(call LIST_ALL_OLD_GLOB_MATCHES,\ $$(dir $$@)$$(call CFG_LIB_GLOB_$(3),$(5))) +else +$$(HLIB$(2)_H_$(4))/stamp.$(5): + $$(Q)touch $$@ +endif endef @@ -54,9 +59,6 @@ endef # $(4) - the host triple (same as $(3)) define CP_HOST_STAGE_N -$$(HBIN$(2)_H_$(4))/: - @mkdir -p $$@ - ifneq ($(CFG_LIBDIR_RELATIVE),bin) $$(HLIB$(2)_H_$(4))/: @mkdir -p $$@ diff --git a/src/doc/rust.md b/src/doc/rust.md index b6237e2a20f..44e7a304e67 100644 --- a/src/doc/rust.md +++ b/src/doc/rust.md @@ -3274,7 +3274,7 @@ The machine types are the following: * The signed two's complement word types `i8`, `i16`, `i32` and `i64`, with values drawn from the integer intervals [-(2^(7)), 2^7 - 1], - [-(2^(15)), 2^15 - 1], $[-(2^(31)), 2^31 - 1], [-(2^(63)), 2^63 - 1] + [-(2^(15)), 2^15 - 1], [-(2^(31)), 2^31 - 1], [-(2^(63)), 2^63 - 1] respectively. * The IEEE 754-2008 `binary32` and `binary64` floating-point types: `f32` and diff --git a/src/libstd/any.rs b/src/libcore/any.rs similarity index 93% rename from src/libstd/any.rs rename to src/libcore/any.rs index 2c1ce9fa779..459015445eb 100644 --- a/src/libstd/any.rs +++ b/src/libcore/any.rs @@ -21,7 +21,6 @@ //! the extension traits (`*Ext`) for the full details. use cast::{transmute, transmute_copy}; -use fmt; use option::{Option, Some, None}; use owned::Box; use raw::TraitObject; @@ -145,28 +144,12 @@ impl AnyOwnExt for Box { } } -/////////////////////////////////////////////////////////////////////////////// -// Trait implementations -/////////////////////////////////////////////////////////////////////////////// - -impl fmt::Show for Box { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("Box") - } -} - -impl<'a> fmt::Show for &'a Any { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("&Any") - } -} - #[cfg(test)] mod tests { use prelude::*; use super::*; use owned::Box; - use str::StrSlice; + use realstd::str::StrAllocating; #[deriving(Eq, Show)] struct Test; @@ -291,13 +274,13 @@ mod tests { #[test] fn test_show() { - let a = box 8u as Box; - let b = box Test as Box; + let a = box 8u as Box<::realcore::any::Any>; + let b = box Test as Box<::realcore::any::Any>; assert_eq!(format!("{}", a), "Box".to_owned()); assert_eq!(format!("{}", b), "Box".to_owned()); - let a = &8u as &Any; - let b = &Test as &Any; + let a = &8u as &::realcore::any::Any; + let b = &Test as &::realcore::any::Any; assert_eq!(format!("{}", a), "&Any".to_owned()); assert_eq!(format!("{}", b), "&Any".to_owned()); } diff --git a/src/libstd/bool.rs b/src/libcore/bool.rs similarity index 87% rename from src/libstd/bool.rs rename to src/libcore/bool.rs index 5a07c860b5d..0f632f4d4d0 100644 --- a/src/libstd/bool.rs +++ b/src/libcore/bool.rs @@ -14,7 +14,6 @@ //! //! Implementations of the following traits: //! -//! * `FromStr` //! * `Not` //! * `Ord` //! * `TotalOrd` @@ -24,11 +23,9 @@ //! //! A `to_bit` conversion function. -use from_str::FromStr; use num::{Int, one, zero}; -use option::{None, Option, Some}; -#[cfg(not(test))] use cmp::{Eq, Ord, TotalOrd, Ordering}; +#[cfg(not(test))] use cmp::{Eq, Ord, TotalOrd, Ordering, TotalEq}; #[cfg(not(test))] use ops::{Not, BitAnd, BitOr, BitXor}; #[cfg(not(test))] use default::Default; @@ -55,28 +52,6 @@ pub fn to_bit(p: bool) -> N { // Trait impls on `bool` ///////////////////////////////////////////////////////////////////////////// -impl FromStr for bool { - /// Parse a `bool` from a string. - /// - /// Yields an `Option`, because `s` may or may not actually be parseable. - /// - /// # Examples - /// - /// ```rust - /// assert_eq!(from_str::("true"), Some(true)); - /// assert_eq!(from_str::("false"), Some(false)); - /// assert_eq!(from_str::("not even a boolean"), None); - /// ``` - #[inline] - fn from_str(s: &str) -> Option { - match s { - "true" => Some(true), - "false" => Some(false), - _ => None, - } - } -} - #[cfg(not(test))] impl Not for bool { /// The logical complement of a boolean value. @@ -190,6 +165,9 @@ impl Eq for bool { fn eq(&self, other: &bool) -> bool { (*self) == (*other) } } +#[cfg(not(test))] +impl TotalEq for bool {} + #[cfg(not(test))] impl Default for bool { fn default() -> bool { false } @@ -197,9 +175,8 @@ impl Default for bool { #[cfg(test)] mod tests { - use prelude::*; + use realstd::prelude::*; use super::to_bit; - use str::StrSlice; #[test] fn test_to_bit() { @@ -260,13 +237,6 @@ mod tests { assert_eq!(!false, true); } - #[test] - fn test_from_str() { - assert_eq!(from_str::("true"), Some(true)); - assert_eq!(from_str::("false"), Some(false)); - assert_eq!(from_str::("not even a boolean"), None); - } - #[test] fn test_to_str() { assert_eq!(false.to_str(), "false".to_owned()); diff --git a/src/libstd/cast.rs b/src/libcore/cast.rs similarity index 99% rename from src/libstd/cast.rs rename to src/libcore/cast.rs index 7a8f517bbf9..8cea197fbfa 100644 --- a/src/libstd/cast.rs +++ b/src/libcore/cast.rs @@ -108,7 +108,7 @@ pub unsafe fn copy_lifetime_vec<'a,S,T>(_ptr: &'a [S], ptr: &T) -> &'a T { mod tests { use cast::{bump_box_refcount, transmute}; use raw; - use str::StrSlice; + use realstd::str::StrAllocating; #[test] fn test_transmute_copy() { diff --git a/src/libstd/cell.rs b/src/libcore/cell.rs similarity index 94% rename from src/libstd/cell.rs rename to src/libcore/cell.rs index 1e4faf1a899..8951c7d806a 100644 --- a/src/libstd/cell.rs +++ b/src/libcore/cell.rs @@ -12,7 +12,6 @@ use clone::Clone; use cmp::Eq; -use fmt; use kinds::{marker, Copy}; use ops::{Deref, DerefMut, Drop}; use option::{None, Option, Some}; @@ -60,12 +59,6 @@ impl Eq for Cell { } } -impl fmt::Show for Cell { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write!(f.buf, r"Cell \{ value: {} \}", self.get()) - } -} - /// A mutable memory location with dynamically checked borrow rules pub struct RefCell { value: Unsafe, @@ -228,22 +221,22 @@ mod test { #[test] fn smoketest_cell() { let x = Cell::new(10); - assert_eq!(x, Cell::new(10)); - assert_eq!(x.get(), 10); + assert!(x == Cell::new(10)); + assert!(x.get() == 10); x.set(20); - assert_eq!(x, Cell::new(20)); - assert_eq!(x.get(), 20); + assert!(x == Cell::new(20)); + assert!(x.get() == 20); let y = Cell::new((30, 40)); - assert_eq!(y, Cell::new((30, 40))); - assert_eq!(y.get(), (30, 40)); + assert!(y == Cell::new((30, 40))); + assert!(y.get() == (30, 40)); } #[test] fn cell_has_sensible_show() { use str::StrSlice; - let x = Cell::new("foo bar"); + let x = ::realcore::cell::Cell::new("foo bar"); assert!(format!("{}", x).contains(x.get())); x.set("baz qux"); diff --git a/src/libstd/char.rs b/src/libcore/char.rs similarity index 77% rename from src/libstd/char.rs rename to src/libcore/char.rs index 228db221cfc..1e31486c63f 100644 --- a/src/libstd/char.rs +++ b/src/libcore/char.rs @@ -27,14 +27,9 @@ use cast::transmute; use option::{None, Option, Some}; use iter::{Iterator, range_step}; -use str::StrSlice; use unicode::{derived_property, property, general_category, decompose, conversions}; -#[cfg(test)] use str::Str; -#[cfg(test)] use strbuf::StrBuf; -#[cfg(test)] use slice::ImmutableVector; - -#[cfg(not(test))] use cmp::{Eq, Ord}; +#[cfg(not(test))] use cmp::{Eq, Ord, TotalEq, TotalOrd, Ordering}; #[cfg(not(test))] use default::Default; // UTF-8 ranges and tags for encoding characters @@ -215,7 +210,7 @@ pub fn is_digit_radix(c: char, radix: uint) -> bool { #[inline] pub fn to_digit(c: char, radix: uint) -> Option { if radix > 36 { - fail!("to_digit: radix {} is too high (maximum 36)", radix); + fail!("to_digit: radix is too high (maximum 36)"); } let val = match c { '0' .. '9' => c as uint - ('0' as uint), @@ -274,7 +269,7 @@ pub fn to_lowercase(c: char) -> char { #[inline] pub fn from_digit(num: uint, radix: uint) -> Option { if radix > 36 { - fail!("from_digit: radix {} is to high (maximum 36)", num); + fail!("from_digit: radix is to high (maximum 36)"); } if num < radix { unsafe { @@ -659,187 +654,208 @@ impl Eq for char { fn eq(&self, other: &char) -> bool { (*self) == (*other) } } +#[cfg(not(test))] +impl TotalEq for char {} + #[cfg(not(test))] impl Ord for char { #[inline] fn lt(&self, other: &char) -> bool { *self < *other } } +#[cfg(not(test))] +impl TotalOrd for char { + fn cmp(&self, other: &char) -> Ordering { + (*self as u32).cmp(&(*other as u32)) + } +} + #[cfg(not(test))] impl Default for char { #[inline] fn default() -> char { '\x00' } } -#[test] -fn test_is_lowercase() { - assert!('a'.is_lowercase()); - assert!('ö'.is_lowercase()); - assert!('ß'.is_lowercase()); - assert!(!'Ü'.is_lowercase()); - assert!(!'P'.is_lowercase()); -} +#[cfg(test)] +mod test { + use super::{escape_unicode, escape_default}; -#[test] -fn test_is_uppercase() { - assert!(!'h'.is_uppercase()); - assert!(!'ä'.is_uppercase()); - assert!(!'ß'.is_uppercase()); - assert!('Ö'.is_uppercase()); - assert!('T'.is_uppercase()); -} + use realcore::char::Char; + use slice::ImmutableVector; + use realstd::option::{Some, None}; + use realstd::strbuf::StrBuf; + use realstd::str::StrAllocating; -#[test] -fn test_is_whitespace() { - assert!(' '.is_whitespace()); - assert!('\u2007'.is_whitespace()); - assert!('\t'.is_whitespace()); - assert!('\n'.is_whitespace()); - assert!(!'a'.is_whitespace()); - assert!(!'_'.is_whitespace()); - assert!(!'\u0000'.is_whitespace()); -} - -#[test] -fn test_to_digit() { - assert_eq!('0'.to_digit(10u), Some(0u)); - assert_eq!('1'.to_digit(2u), Some(1u)); - assert_eq!('2'.to_digit(3u), Some(2u)); - assert_eq!('9'.to_digit(10u), Some(9u)); - assert_eq!('a'.to_digit(16u), Some(10u)); - assert_eq!('A'.to_digit(16u), Some(10u)); - assert_eq!('b'.to_digit(16u), Some(11u)); - assert_eq!('B'.to_digit(16u), Some(11u)); - assert_eq!('z'.to_digit(36u), Some(35u)); - assert_eq!('Z'.to_digit(36u), Some(35u)); - assert_eq!(' '.to_digit(10u), None); - assert_eq!('$'.to_digit(36u), None); -} - -#[test] -fn test_to_lowercase() { - assert_eq!('A'.to_lowercase(), 'a'); - assert_eq!('Ö'.to_lowercase(), 'ö'); - assert_eq!('ß'.to_lowercase(), 'ß'); - assert_eq!('Ü'.to_lowercase(), 'ü'); - assert_eq!('💩'.to_lowercase(), '💩'); - assert_eq!('Σ'.to_lowercase(), 'σ'); - assert_eq!('Τ'.to_lowercase(), 'τ'); - assert_eq!('Ι'.to_lowercase(), 'ι'); - assert_eq!('Γ'.to_lowercase(), 'γ'); - assert_eq!('Μ'.to_lowercase(), 'μ'); - assert_eq!('Α'.to_lowercase(), 'α'); - assert_eq!('Σ'.to_lowercase(), 'σ'); -} - -#[test] -fn test_to_uppercase() { - assert_eq!('a'.to_uppercase(), 'A'); - assert_eq!('ö'.to_uppercase(), 'Ö'); - assert_eq!('ß'.to_uppercase(), 'ß'); // not ẞ: Latin capital letter sharp s - assert_eq!('ü'.to_uppercase(), 'Ü'); - assert_eq!('💩'.to_uppercase(), '💩'); - - assert_eq!('σ'.to_uppercase(), 'Σ'); - assert_eq!('τ'.to_uppercase(), 'Τ'); - assert_eq!('ι'.to_uppercase(), 'Ι'); - assert_eq!('γ'.to_uppercase(), 'Γ'); - assert_eq!('μ'.to_uppercase(), 'Μ'); - assert_eq!('α'.to_uppercase(), 'Α'); - assert_eq!('ς'.to_uppercase(), 'Σ'); -} - -#[test] -fn test_is_control() { - assert!('\u0000'.is_control()); - assert!('\u0003'.is_control()); - assert!('\u0006'.is_control()); - assert!('\u0009'.is_control()); - assert!('\u007f'.is_control()); - assert!('\u0092'.is_control()); - assert!(!'\u0020'.is_control()); - assert!(!'\u0055'.is_control()); - assert!(!'\u0068'.is_control()); -} - -#[test] -fn test_is_digit() { - assert!('2'.is_digit()); - assert!('7'.is_digit()); - assert!(!'c'.is_digit()); - assert!(!'i'.is_digit()); - assert!(!'z'.is_digit()); - assert!(!'Q'.is_digit()); -} - -#[test] -fn test_escape_default() { - fn string(c: char) -> ~str { - let mut result = StrBuf::new(); - escape_default(c, |c| { result.push_char(c); }); - return result.into_owned(); - } - assert_eq!(string('\n'), "\\n".to_owned()); - assert_eq!(string('\r'), "\\r".to_owned()); - assert_eq!(string('\''), "\\'".to_owned()); - assert_eq!(string('"'), "\\\"".to_owned()); - assert_eq!(string(' '), " ".to_owned()); - assert_eq!(string('a'), "a".to_owned()); - assert_eq!(string('~'), "~".to_owned()); - assert_eq!(string('\x00'), "\\x00".to_owned()); - assert_eq!(string('\x1f'), "\\x1f".to_owned()); - assert_eq!(string('\x7f'), "\\x7f".to_owned()); - assert_eq!(string('\xff'), "\\xff".to_owned()); - assert_eq!(string('\u011b'), "\\u011b".to_owned()); - assert_eq!(string('\U0001d4b6'), "\\U0001d4b6".to_owned()); -} - -#[test] -fn test_escape_unicode() { - fn string(c: char) -> ~str { - let mut result = StrBuf::new(); - escape_unicode(c, |c| { result.push_char(c); }); - return result.into_owned(); - } - assert_eq!(string('\x00'), "\\x00".to_owned()); - assert_eq!(string('\n'), "\\x0a".to_owned()); - assert_eq!(string(' '), "\\x20".to_owned()); - assert_eq!(string('a'), "\\x61".to_owned()); - assert_eq!(string('\u011b'), "\\u011b".to_owned()); - assert_eq!(string('\U0001d4b6'), "\\U0001d4b6".to_owned()); -} - -#[test] -fn test_to_str() { - use to_str::ToStr; - let s = 't'.to_str(); - assert_eq!(s, "t".to_owned()); -} - -#[test] -fn test_encode_utf8() { - fn check(input: char, expect: &[u8]) { - let mut buf = [0u8, ..4]; - let n = input.encode_utf8(buf /* as mut slice! */); - assert_eq!(buf.slice_to(n), expect); + #[test] + fn test_is_lowercase() { + assert!('a'.is_lowercase()); + assert!('ö'.is_lowercase()); + assert!('ß'.is_lowercase()); + assert!(!'Ü'.is_lowercase()); + assert!(!'P'.is_lowercase()); } - check('x', [0x78]); - check('\u00e9', [0xc3, 0xa9]); - check('\ua66e', [0xea, 0x99, 0xae]); - check('\U0001f4a9', [0xf0, 0x9f, 0x92, 0xa9]); -} - -#[test] -fn test_encode_utf16() { - fn check(input: char, expect: &[u16]) { - let mut buf = [0u16, ..2]; - let n = input.encode_utf16(buf /* as mut slice! */); - assert_eq!(buf.slice_to(n), expect); + #[test] + fn test_is_uppercase() { + assert!(!'h'.is_uppercase()); + assert!(!'ä'.is_uppercase()); + assert!(!'ß'.is_uppercase()); + assert!('Ö'.is_uppercase()); + assert!('T'.is_uppercase()); } - check('x', [0x0078]); - check('\u00e9', [0x00e9]); - check('\ua66e', [0xa66e]); - check('\U0001f4a9', [0xd83d, 0xdca9]); + #[test] + fn test_is_whitespace() { + assert!(' '.is_whitespace()); + assert!('\u2007'.is_whitespace()); + assert!('\t'.is_whitespace()); + assert!('\n'.is_whitespace()); + assert!(!'a'.is_whitespace()); + assert!(!'_'.is_whitespace()); + assert!(!'\u0000'.is_whitespace()); + } + + #[test] + fn test_to_digit() { + assert_eq!('0'.to_digit(10u), Some(0u)); + assert_eq!('1'.to_digit(2u), Some(1u)); + assert_eq!('2'.to_digit(3u), Some(2u)); + assert_eq!('9'.to_digit(10u), Some(9u)); + assert_eq!('a'.to_digit(16u), Some(10u)); + assert_eq!('A'.to_digit(16u), Some(10u)); + assert_eq!('b'.to_digit(16u), Some(11u)); + assert_eq!('B'.to_digit(16u), Some(11u)); + assert_eq!('z'.to_digit(36u), Some(35u)); + assert_eq!('Z'.to_digit(36u), Some(35u)); + assert_eq!(' '.to_digit(10u), None); + assert_eq!('$'.to_digit(36u), None); + } + + #[test] + fn test_to_lowercase() { + assert_eq!('A'.to_lowercase(), 'a'); + assert_eq!('Ö'.to_lowercase(), 'ö'); + assert_eq!('ß'.to_lowercase(), 'ß'); + assert_eq!('Ü'.to_lowercase(), 'ü'); + assert_eq!('💩'.to_lowercase(), '💩'); + assert_eq!('Σ'.to_lowercase(), 'σ'); + assert_eq!('Τ'.to_lowercase(), 'τ'); + assert_eq!('Ι'.to_lowercase(), 'ι'); + assert_eq!('Γ'.to_lowercase(), 'γ'); + assert_eq!('Μ'.to_lowercase(), 'μ'); + assert_eq!('Α'.to_lowercase(), 'α'); + assert_eq!('Σ'.to_lowercase(), 'σ'); + } + + #[test] + fn test_to_uppercase() { + assert_eq!('a'.to_uppercase(), 'A'); + assert_eq!('ö'.to_uppercase(), 'Ö'); + assert_eq!('ß'.to_uppercase(), 'ß'); // not ẞ: Latin capital letter sharp s + assert_eq!('ü'.to_uppercase(), 'Ü'); + assert_eq!('💩'.to_uppercase(), '💩'); + + assert_eq!('σ'.to_uppercase(), 'Σ'); + assert_eq!('τ'.to_uppercase(), 'Τ'); + assert_eq!('ι'.to_uppercase(), 'Ι'); + assert_eq!('γ'.to_uppercase(), 'Γ'); + assert_eq!('μ'.to_uppercase(), 'Μ'); + assert_eq!('α'.to_uppercase(), 'Α'); + assert_eq!('ς'.to_uppercase(), 'Σ'); + } + + #[test] + fn test_is_control() { + assert!('\u0000'.is_control()); + assert!('\u0003'.is_control()); + assert!('\u0006'.is_control()); + assert!('\u0009'.is_control()); + assert!('\u007f'.is_control()); + assert!('\u0092'.is_control()); + assert!(!'\u0020'.is_control()); + assert!(!'\u0055'.is_control()); + assert!(!'\u0068'.is_control()); + } + + #[test] + fn test_is_digit() { + assert!('2'.is_digit()); + assert!('7'.is_digit()); + assert!(!'c'.is_digit()); + assert!(!'i'.is_digit()); + assert!(!'z'.is_digit()); + assert!(!'Q'.is_digit()); + } + + #[test] + fn test_escape_default() { + fn string(c: char) -> ~str { + let mut result = StrBuf::new(); + escape_default(c, |c| { result.push_char(c); }); + return result.into_owned(); + } + assert_eq!(string('\n'), "\\n".to_owned()); + assert_eq!(string('\r'), "\\r".to_owned()); + assert_eq!(string('\''), "\\'".to_owned()); + assert_eq!(string('"'), "\\\"".to_owned()); + assert_eq!(string(' '), " ".to_owned()); + assert_eq!(string('a'), "a".to_owned()); + assert_eq!(string('~'), "~".to_owned()); + assert_eq!(string('\x00'), "\\x00".to_owned()); + assert_eq!(string('\x1f'), "\\x1f".to_owned()); + assert_eq!(string('\x7f'), "\\x7f".to_owned()); + assert_eq!(string('\xff'), "\\xff".to_owned()); + assert_eq!(string('\u011b'), "\\u011b".to_owned()); + assert_eq!(string('\U0001d4b6'), "\\U0001d4b6".to_owned()); + } + + #[test] + fn test_escape_unicode() { + fn string(c: char) -> ~str { + let mut result = StrBuf::new(); + escape_unicode(c, |c| { result.push_char(c); }); + return result.into_owned(); + } + assert_eq!(string('\x00'), "\\x00".to_owned()); + assert_eq!(string('\n'), "\\x0a".to_owned()); + assert_eq!(string(' '), "\\x20".to_owned()); + assert_eq!(string('a'), "\\x61".to_owned()); + assert_eq!(string('\u011b'), "\\u011b".to_owned()); + assert_eq!(string('\U0001d4b6'), "\\U0001d4b6".to_owned()); + } + + #[test] + fn test_to_str() { + use realstd::to_str::ToStr; + let s = 't'.to_str(); + assert_eq!(s, "t".to_owned()); + } + + #[test] + fn test_encode_utf8() { + fn check(input: char, expect: &[u8]) { + let mut buf = [0u8, ..4]; + let n = input.encode_utf8(buf /* as mut slice! */); + assert_eq!(buf.slice_to(n), expect); + } + + check('x', [0x78]); + check('\u00e9', [0xc3, 0xa9]); + check('\ua66e', [0xea, 0x99, 0xae]); + check('\U0001f4a9', [0xf0, 0x9f, 0x92, 0xa9]); + } + + #[test] + fn test_encode_utf16() { + fn check(input: char, expect: &[u16]) { + let mut buf = [0u16, ..2]; + let n = input.encode_utf16(buf /* as mut slice! */); + assert_eq!(buf.slice_to(n), expect); + } + + check('x', [0x0078]); + check('\u00e9', [0x00e9]); + check('\ua66e', [0xa66e]); + check('\U0001f4a9', [0xd83d, 0xdca9]); + } } diff --git a/src/libstd/clone.rs b/src/libcore/clone.rs similarity index 77% rename from src/libstd/clone.rs rename to src/libcore/clone.rs index 36d1cd9ba94..06cbaf19812 100644 --- a/src/libstd/clone.rs +++ b/src/libcore/clone.rs @@ -126,46 +126,52 @@ extern_fn_clone!(A, B, C, D, E, F) extern_fn_clone!(A, B, C, D, E, F, G) extern_fn_clone!(A, B, C, D, E, F, G, H) -#[test] -fn test_owned_clone() { - let a = box 5i; - let b: Box = a.clone(); - assert_eq!(a, b); -} - -#[test] -fn test_managed_clone() { - let a = @5i; - let b: @int = a.clone(); - assert_eq!(a, b); -} - -#[test] -fn test_borrowed_clone() { - let x = 5i; - let y: &int = &x; - let z: &int = (&y).clone(); - assert_eq!(*z, 5); -} - -#[test] -fn test_clone_from() { - let a = box 5; - let mut b = box 10; - b.clone_from(&a); - assert_eq!(*b, 5); -} - -#[test] -fn test_extern_fn_clone() { - trait Empty {} - impl Empty for int {} - - fn test_fn_a() -> f64 { 1.0 } - fn test_fn_b(x: T) -> T { x } - fn test_fn_c(_: int, _: f64, _: ~[int], _: int, _: int, _: int) {} - - let _ = test_fn_a.clone(); - let _ = test_fn_b::.clone(); - let _ = test_fn_c.clone(); +#[cfg(test)] +mod test { + use prelude::*; + use owned::Box; + + #[test] + fn test_owned_clone() { + let a = box 5i; + let b: Box = a.clone(); + assert_eq!(a, b); + } + + #[test] + fn test_managed_clone() { + let a = @5i; + let b: @int = a.clone(); + assert_eq!(a, b); + } + + #[test] + fn test_borrowed_clone() { + let x = 5i; + let y: &int = &x; + let z: &int = (&y).clone(); + assert_eq!(*z, 5); + } + + #[test] + fn test_clone_from() { + let a = box 5; + let mut b = box 10; + b.clone_from(&a); + assert_eq!(*b, 5); + } + + #[test] + fn test_extern_fn_clone() { + trait Empty {} + impl Empty for int {} + + fn test_fn_a() -> f64 { 1.0 } + fn test_fn_b(x: T) -> T { x } + fn test_fn_c(_: int, _: f64, _: ~[int], _: int, _: int, _: int) {} + + let _ = test_fn_a.clone(); + let _ = test_fn_b::.clone(); + let _ = test_fn_c.clone(); + } } diff --git a/src/libstd/cmp.rs b/src/libcore/cmp.rs similarity index 75% rename from src/libstd/cmp.rs rename to src/libcore/cmp.rs index a6d6649aca0..af611cd94e5 100644 --- a/src/libstd/cmp.rs +++ b/src/libcore/cmp.rs @@ -81,32 +81,8 @@ pub trait TotalEq: Eq { fn assert_receiver_is_total_eq(&self) {} } -/// A macro which defines an implementation of TotalEq for a given type. -macro_rules! totaleq_impl( - ($t:ty) => { - impl TotalEq for $t {} - } -) - -totaleq_impl!(bool) - -totaleq_impl!(u8) -totaleq_impl!(u16) -totaleq_impl!(u32) -totaleq_impl!(u64) - -totaleq_impl!(i8) -totaleq_impl!(i16) -totaleq_impl!(i32) -totaleq_impl!(i64) - -totaleq_impl!(int) -totaleq_impl!(uint) - -totaleq_impl!(char) - /// An ordering is, e.g, a result of a comparison between two values. -#[deriving(Clone, Eq, Show)] +#[deriving(Clone, Eq)] pub enum Ordering { /// An ordering where a compared value is less [than another]. Less = -1, @@ -140,6 +116,7 @@ pub trait TotalOrd: TotalEq + Ord { } impl TotalEq for Ordering {} + impl TotalOrd for Ordering { #[inline] fn cmp(&self, other: &Ordering) -> Ordering { @@ -152,35 +129,6 @@ impl Ord for Ordering { fn lt(&self, other: &Ordering) -> bool { (*self as int) < (*other as int) } } -/// A macro which defines an implementation of TotalOrd for a given type. -macro_rules! totalord_impl( - ($t:ty) => { - impl TotalOrd for $t { - #[inline] - fn cmp(&self, other: &$t) -> Ordering { - if *self < *other { Less } - else if *self > *other { Greater } - else { Equal } - } - } - } -) - -totalord_impl!(u8) -totalord_impl!(u16) -totalord_impl!(u32) -totalord_impl!(u64) - -totalord_impl!(i8) -totalord_impl!(i16) -totalord_impl!(i32) -totalord_impl!(i64) - -totalord_impl!(int) -totalord_impl!(uint) - -totalord_impl!(char) - /// Combine orderings, lexically. /// /// For example for a type `(int, int)`, two comparisons could be done. @@ -241,6 +189,82 @@ pub fn max(v1: T, v2: T) -> T { if v1 > v2 { v1 } else { v2 } } +// Implementation of Eq/TotalEq for some primitive types +#[cfg(not(test))] +mod impls { + use cmp::{Ord, TotalOrd, Eq, TotalEq, Ordering}; + use owned::Box; + + // & pointers + impl<'a, T: Eq> Eq for &'a T { + #[inline] + fn eq(&self, other: & &'a T) -> bool { *(*self) == *(*other) } + #[inline] + fn ne(&self, other: & &'a T) -> bool { *(*self) != *(*other) } + } + impl<'a, T: Ord> Ord for &'a T { + #[inline] + fn lt(&self, other: & &'a T) -> bool { *(*self) < *(*other) } + #[inline] + fn le(&self, other: & &'a T) -> bool { *(*self) <= *(*other) } + #[inline] + fn ge(&self, other: & &'a T) -> bool { *(*self) >= *(*other) } + #[inline] + fn gt(&self, other: & &'a T) -> bool { *(*self) > *(*other) } + } + impl<'a, T: TotalOrd> TotalOrd for &'a T { + #[inline] + fn cmp(&self, other: & &'a T) -> Ordering { (**self).cmp(*other) } + } + impl<'a, T: TotalEq> TotalEq for &'a T {} + + // @ pointers + impl Eq for @T { + #[inline] + fn eq(&self, other: &@T) -> bool { *(*self) == *(*other) } + #[inline] + fn ne(&self, other: &@T) -> bool { *(*self) != *(*other) } + } + impl Ord for @T { + #[inline] + fn lt(&self, other: &@T) -> bool { *(*self) < *(*other) } + #[inline] + fn le(&self, other: &@T) -> bool { *(*self) <= *(*other) } + #[inline] + fn ge(&self, other: &@T) -> bool { *(*self) >= *(*other) } + #[inline] + fn gt(&self, other: &@T) -> bool { *(*self) > *(*other) } + } + impl TotalOrd for @T { + #[inline] + fn cmp(&self, other: &@T) -> Ordering { (**self).cmp(*other) } + } + impl TotalEq for @T {} + + // box pointers + impl Eq for Box { + #[inline] + fn eq(&self, other: &Box) -> bool { *(*self) == *(*other) } + #[inline] + fn ne(&self, other: &Box) -> bool { *(*self) != *(*other) } + } + impl Ord for Box { + #[inline] + fn lt(&self, other: &Box) -> bool { *(*self) < *(*other) } + #[inline] + fn le(&self, other: &Box) -> bool { *(*self) <= *(*other) } + #[inline] + fn ge(&self, other: &Box) -> bool { *(*self) >= *(*other) } + #[inline] + fn gt(&self, other: &Box) -> bool { *(*self) > *(*other) } + } + impl TotalOrd for Box { + #[inline] + fn cmp(&self, other: &Box) -> Ordering { (**self).cmp(*other) } + } + impl TotalEq for Box {} +} + #[cfg(test)] mod test { use super::lexical_ordering; diff --git a/src/libstd/container.rs b/src/libcore/container.rs similarity index 100% rename from src/libstd/container.rs rename to src/libcore/container.rs diff --git a/src/libstd/default.rs b/src/libcore/default.rs similarity index 100% rename from src/libstd/default.rs rename to src/libcore/default.rs diff --git a/src/libcore/failure.rs b/src/libcore/failure.rs new file mode 100644 index 00000000000..2296e663033 --- /dev/null +++ b/src/libcore/failure.rs @@ -0,0 +1,55 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! Failure support for libcore + +#![allow(dead_code)] + +#[cfg(not(test))] +use str::raw::c_str_to_static_slice; + +// FIXME: Once std::fmt is in libcore, all of these functions should delegate +// to a common failure function with this signature: +// +// extern { +// fn rust_unwind(f: &fmt::Arguments, file: &str, line: uint) -> !; +// } +// +// Each of these functions can create a temporary fmt::Arguments +// structure to pass to this function. + +#[cold] #[inline(never)] // this is the slow path, always +#[lang="fail_"] +#[cfg(not(test))] +fn fail_(expr: *u8, file: *u8, line: uint) -> ! { + unsafe { + let expr = c_str_to_static_slice(expr as *i8); + let file = c_str_to_static_slice(file as *i8); + begin_unwind(expr, file, line) + } +} + +#[cold] +#[lang="fail_bounds_check"] +#[cfg(not(test))] +fn fail_bounds_check(file: *u8, line: uint, index: uint, len: uint) -> ! { + #[allow(ctypes)] + extern { fn rust_fail_bounds_check(file: *u8, line: uint, + index: uint, len: uint,) -> !; } + unsafe { rust_fail_bounds_check(file, line, index, len) } +} + +#[cold] +pub fn begin_unwind(msg: &str, file: &'static str, line: uint) -> ! { + #[allow(ctypes)] + extern { fn rust_begin_unwind(msg: &str, file: &'static str, + line: uint) -> !; } + unsafe { rust_begin_unwind(msg, file, line) } +} diff --git a/src/libstd/unstable/finally.rs b/src/libcore/finally.rs similarity index 69% rename from src/libstd/unstable/finally.rs rename to src/libcore/finally.rs index 3d00c0ac74a..a4d261f539a 100644 --- a/src/libstd/unstable/finally.rs +++ b/src/libcore/finally.rs @@ -30,11 +30,15 @@ use std::unstable::finally::Finally; ``` */ +#![experimental] + use ops::Drop; -#[cfg(test)] use task::failing; - +/// A trait for executing a destructor unconditionally after a block of code, +/// regardless of whether the blocked fails. pub trait Finally { + /// Executes this object, unconditionally running `dtor` after this block of + /// code has run. fn finally(&mut self, dtor: ||) -> T; } @@ -111,49 +115,55 @@ impl<'a,A> Drop for Finallyalizer<'a,A> { } } -#[test] -fn test_success() { - let mut i = 0; - try_finally( - &mut i, (), - |i, ()| { - *i = 10; - }, - |i| { - assert!(!failing()); - assert_eq!(*i, 10); - *i = 20; - }); - assert_eq!(i, 20); -} +#[cfg(test)] +mod test { + use super::{try_finally, Finally}; + use realstd::task::failing; -#[test] -#[should_fail] -fn test_fail() { - let mut i = 0; - try_finally( - &mut i, (), - |i, ()| { - *i = 10; - fail!(); - }, - |i| { - assert!(failing()); - assert_eq!(*i, 10); - }) -} + #[test] + fn test_success() { + let mut i = 0; + try_finally( + &mut i, (), + |i, ()| { + *i = 10; + }, + |i| { + assert!(!failing()); + assert_eq!(*i, 10); + *i = 20; + }); + assert_eq!(i, 20); + } -#[test] -fn test_retval() { - let mut closure: || -> int = || 10; - let i = closure.finally(|| { }); - assert_eq!(i, 10); -} + #[test] + #[should_fail] + fn test_fail() { + let mut i = 0; + try_finally( + &mut i, (), + |i, ()| { + *i = 10; + fail!(); + }, + |i| { + assert!(failing()); + assert_eq!(*i, 10); + }) + } -#[test] -fn test_compact() { - fn do_some_fallible_work() {} - fn but_always_run_this_function() { } - let mut f = do_some_fallible_work; - f.finally(but_always_run_this_function); + #[test] + fn test_retval() { + let mut closure: || -> int = || 10; + let i = closure.finally(|| { }); + assert_eq!(i, 10); + } + + #[test] + fn test_compact() { + fn do_some_fallible_work() {} + fn but_always_run_this_function() { } + let mut f = do_some_fallible_work; + f.finally(but_always_run_this_function); + } } diff --git a/src/libstd/intrinsics.rs b/src/libcore/intrinsics.rs similarity index 99% rename from src/libstd/intrinsics.rs rename to src/libcore/intrinsics.rs index c2d39ad990a..d7a277d3b6b 100644 --- a/src/libstd/intrinsics.rs +++ b/src/libcore/intrinsics.rs @@ -41,11 +41,12 @@ A quick refresher on memory ordering: */ +#![experimental] #![allow(missing_doc)] // This is needed to prevent duplicate lang item definitions. #[cfg(test)] -pub use realstd::intrinsics::{TyDesc, Opaque, TyVisitor, TypeId}; +pub use realcore::intrinsics::{TyDesc, Opaque, TyVisitor, TypeId}; pub type GlueFn = extern "Rust" fn(*i8); @@ -470,7 +471,7 @@ extern "rust-intrinsic" { /// `TypeId` represents a globally unique identifier for a type #[lang="type_id"] // This needs to be kept in lockstep with the code in trans/intrinsic.rs and // middle/lang_items.rs -#[deriving(Eq, Hash, Show, TotalEq)] +#[deriving(Eq, TotalEq)] #[cfg(not(test))] pub struct TypeId { t: u64, @@ -482,4 +483,5 @@ impl TypeId { pub fn of() -> TypeId { unsafe { type_id::() } } + pub fn hash(&self) -> u64 { self.t } } diff --git a/src/libstd/iter.rs b/src/libcore/iter.rs similarity index 99% rename from src/libstd/iter.rs rename to src/libcore/iter.rs index 7dc1252fc77..5ee642cd810 100644 --- a/src/libstd/iter.rs +++ b/src/libcore/iter.rs @@ -969,7 +969,7 @@ impl> OrdIterator for T { } /// `MinMaxResult` is an enum returned by `min_max`. See `OrdIterator::min_max` for more detail. -#[deriving(Clone, Eq, Show)] +#[deriving(Clone, Eq)] pub enum MinMaxResult { /// Empty iterator NoElements, @@ -1090,7 +1090,7 @@ impl> RandomAccessIterator for Cycle pub struct Chain { a: T, b: U, - flag: bool + flag: bool, } impl, U: Iterator> Iterator for Chain { @@ -2329,13 +2329,13 @@ pub mod order { #[cfg(test)] mod tests { - use super::*; - use prelude::*; + use realstd::prelude::*; + use realstd::iter::*; + use realstd::num; use cmp; use owned::Box; use uint; - use num; #[test] fn test_counter_from_iter() { diff --git a/src/libstd/kinds.rs b/src/libcore/kinds.rs similarity index 100% rename from src/libstd/kinds.rs rename to src/libcore/kinds.rs diff --git a/src/libcore/lib.rs b/src/libcore/lib.rs new file mode 100644 index 00000000000..53de765b89c --- /dev/null +++ b/src/libcore/lib.rs @@ -0,0 +1,114 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! The Rust core library + +#![crate_id = "core#0.11-pre"] +#![license = "MIT/ASL2"] +#![crate_type = "rlib"] +#![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", + html_favicon_url = "http://www.rust-lang.org/favicon.ico", + html_root_url = "http://static.rust-lang.org/doc/master")] + +#![no_std] +#![feature(globs, macro_rules, managed_boxes, phase)] +#![deny(missing_doc)] + +#[cfg(test)] extern crate realcore = "core"; +#[cfg(test)] extern crate libc; +#[cfg(test)] extern crate native; +#[phase(syntax, link)] #[cfg(test)] extern crate realstd = "std"; +#[phase(syntax, link)] #[cfg(test)] extern crate log; + +#[cfg(test)] pub use cmp = realcore::cmp; +#[cfg(test)] pub use kinds = realcore::kinds; +#[cfg(test)] pub use ops = realcore::ops; +#[cfg(test)] pub use owned = realcore::owned; +#[cfg(test)] pub use ty = realcore::ty; + +#[cfg(not(test))] +mod macros; + +#[path = "num/float_macros.rs"] mod float_macros; +#[path = "num/int_macros.rs"] mod int_macros; +#[path = "num/uint_macros.rs"] mod uint_macros; + +#[path = "num/int.rs"] pub mod int; +#[path = "num/i8.rs"] pub mod i8; +#[path = "num/i16.rs"] pub mod i16; +#[path = "num/i32.rs"] pub mod i32; +#[path = "num/i64.rs"] pub mod i64; + +#[path = "num/uint.rs"] pub mod uint; +#[path = "num/u8.rs"] pub mod u8; +#[path = "num/u16.rs"] pub mod u16; +#[path = "num/u32.rs"] pub mod u32; +#[path = "num/u64.rs"] pub mod u64; + +#[path = "num/f32.rs"] pub mod f32; +#[path = "num/f64.rs"] pub mod f64; + +pub mod num; + +/* The libcore prelude, not as all-encompassing as the libstd prelude */ + +pub mod prelude; + +/* Core modules for ownership management */ + +pub mod cast; +pub mod intrinsics; +pub mod mem; +pub mod ptr; + +/* Core language traits */ + +#[cfg(not(test))] pub mod kinds; +#[cfg(not(test))] pub mod ops; +#[cfg(not(test))] pub mod ty; +#[cfg(not(test))] pub mod cmp; +#[cfg(not(test))] pub mod owned; +pub mod clone; +pub mod default; +pub mod container; + +/* Core types and methods on primitives */ + +mod unicode; +mod unit; +pub mod any; +pub mod bool; +pub mod cell; +pub mod char; +pub mod finally; +pub mod iter; +pub mod option; +pub mod raw; +pub mod result; +pub mod slice; +pub mod str; +pub mod tuple; + +mod failure; + +// FIXME: this module should not exist. Once owned allocations are no longer a +// language type, this module can move outside to the owned allocation +// crate. +mod should_not_exist; + +mod std { + pub use clone; + pub use cmp; + + #[cfg(test)] pub use realstd::fmt; // needed for fail!() + #[cfg(test)] pub use realstd::rt; // needed for fail!() + #[cfg(test)] pub use realstd::option; // needed for assert!() + #[cfg(test)] pub use realstd::os; // needed for tests +} diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs new file mode 100644 index 00000000000..50d5cd81ba0 --- /dev/null +++ b/src/libcore/macros.rs @@ -0,0 +1,38 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![macro_escape] + +/// Entry point of failure, for details, see std::macros +#[macro_export] +macro_rules! fail( + () => ( + fail!("explicit failure") + ); + ($msg:expr) => ( + ::failure::begin_unwind($msg, file!(), line!()) + ); +) + +/// Runtime assertion, for details see std::macros +#[macro_export] +macro_rules! assert( + ($cond:expr) => ( + if !$cond { + fail!(concat!("assertion failed: ", stringify!($cond))) + } + ); +) + +/// Runtime assertion, disableable at compile time +#[macro_export] +macro_rules! debug_assert( + ($($arg:tt)*) => (if cfg!(not(ndebug)) { assert!($($arg)*); }) +) diff --git a/src/libstd/mem.rs b/src/libcore/mem.rs similarity index 99% rename from src/libstd/mem.rs rename to src/libcore/mem.rs index d216d91b901..0bac90064d6 100644 --- a/src/libstd/mem.rs +++ b/src/libcore/mem.rs @@ -13,8 +13,6 @@ //! This module contains functions for querying the size and alignment of //! types, initializing and manipulating memory. -#![allow(missing_doc)] // FIXME - use cast; use ptr; use intrinsics; @@ -295,7 +293,7 @@ pub fn drop(_x: T) { } mod tests { use mem::*; use option::{Some,None}; - use str::StrSlice; + use realstd::str::StrAllocating; #[test] fn size_of_basic() { diff --git a/src/libcore/num/f32.rs b/src/libcore/num/f32.rs new file mode 100644 index 00000000000..c4cdc5a0a40 --- /dev/null +++ b/src/libcore/num/f32.rs @@ -0,0 +1,227 @@ +// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! Operations and constants for 32-bits floats (`f32` type) + +use default::Default; +use intrinsics; +use num::{Zero, One, Bounded, Signed, Num, Primitive}; + +#[cfg(not(test))] use cmp::{Eq, Ord}; +#[cfg(not(test))] use ops::{Add, Sub, Mul, Div, Rem, Neg}; + +pub static RADIX: uint = 2u; + +pub static MANTISSA_DIGITS: uint = 24u; +pub static DIGITS: uint = 6u; + +pub static EPSILON: f32 = 1.19209290e-07_f32; + +/// Smallest finite f32 value +pub static MIN_VALUE: f32 = -3.40282347e+38_f32; +/// Smallest positive, normalized f32 value +pub static MIN_POS_VALUE: f32 = 1.17549435e-38_f32; +/// Largest finite f32 value +pub static MAX_VALUE: f32 = 3.40282347e+38_f32; + +pub static MIN_EXP: int = -125; +pub static MAX_EXP: int = 128; + +pub static MIN_10_EXP: int = -37; +pub static MAX_10_EXP: int = 38; + +pub static NAN: f32 = 0.0_f32/0.0_f32; +pub static INFINITY: f32 = 1.0_f32/0.0_f32; +pub static NEG_INFINITY: f32 = -1.0_f32/0.0_f32; + +/// Various useful constants. +pub mod consts { + // FIXME: replace with mathematical constants from cmath. + + // FIXME(#5527): These constants should be deprecated once associated + // constants are implemented in favour of referencing the respective members + // of `Float`. + + /// Archimedes' constant + pub static PI: f32 = 3.14159265358979323846264338327950288_f32; + + /// pi * 2.0 + pub static PI_2: f32 = 6.28318530717958647692528676655900576_f32; + + /// pi/2.0 + pub static FRAC_PI_2: f32 = 1.57079632679489661923132169163975144_f32; + + /// pi/3.0 + pub static FRAC_PI_3: f32 = 1.04719755119659774615421446109316763_f32; + + /// pi/4.0 + pub static FRAC_PI_4: f32 = 0.785398163397448309615660845819875721_f32; + + /// pi/6.0 + pub static FRAC_PI_6: f32 = 0.52359877559829887307710723054658381_f32; + + /// pi/8.0 + pub static FRAC_PI_8: f32 = 0.39269908169872415480783042290993786_f32; + + /// 1.0/pi + pub static FRAC_1_PI: f32 = 0.318309886183790671537767526745028724_f32; + + /// 2.0/pi + pub static FRAC_2_PI: f32 = 0.636619772367581343075535053490057448_f32; + + /// 2.0/sqrt(pi) + pub static FRAC_2_SQRTPI: f32 = 1.12837916709551257389615890312154517_f32; + + /// sqrt(2.0) + pub static SQRT2: f32 = 1.41421356237309504880168872420969808_f32; + + /// 1.0/sqrt(2.0) + pub static FRAC_1_SQRT2: f32 = 0.707106781186547524400844362104849039_f32; + + /// Euler's number + pub static E: f32 = 2.71828182845904523536028747135266250_f32; + + /// log2(e) + pub static LOG2_E: f32 = 1.44269504088896340735992468100189214_f32; + + /// log10(e) + pub static LOG10_E: f32 = 0.434294481903251827651128918916605082_f32; + + /// ln(2.0) + pub static LN_2: f32 = 0.693147180559945309417232121458176568_f32; + + /// ln(10.0) + pub static LN_10: f32 = 2.30258509299404568401799145468436421_f32; +} + +#[cfg(not(test))] +impl Ord for f32 { + #[inline] + fn lt(&self, other: &f32) -> bool { (*self) < (*other) } + #[inline] + fn le(&self, other: &f32) -> bool { (*self) <= (*other) } + #[inline] + fn ge(&self, other: &f32) -> bool { (*self) >= (*other) } + #[inline] + fn gt(&self, other: &f32) -> bool { (*self) > (*other) } +} +#[cfg(not(test))] +impl Eq for f32 { + #[inline] + fn eq(&self, other: &f32) -> bool { (*self) == (*other) } +} + +impl Num for f32 {} + +impl Default for f32 { + #[inline] + fn default() -> f32 { 0.0 } +} + +impl Primitive for f32 {} + +impl Zero for f32 { + #[inline] + fn zero() -> f32 { 0.0 } + + /// Returns true if the number is equal to either `0.0` or `-0.0` + #[inline] + fn is_zero(&self) -> bool { *self == 0.0 || *self == -0.0 } +} + +impl One for f32 { + #[inline] + fn one() -> f32 { 1.0 } +} + +#[cfg(not(test))] +impl Add for f32 { + #[inline] + fn add(&self, other: &f32) -> f32 { *self + *other } +} + +#[cfg(not(test))] +impl Sub for f32 { + #[inline] + fn sub(&self, other: &f32) -> f32 { *self - *other } +} + +#[cfg(not(test))] +impl Mul for f32 { + #[inline] + fn mul(&self, other: &f32) -> f32 { *self * *other } +} + +#[cfg(not(test))] +impl Div for f32 { + #[inline] + fn div(&self, other: &f32) -> f32 { *self / *other } +} + +#[cfg(not(test))] +impl Rem for f32 { + #[inline] + fn rem(&self, other: &f32) -> f32 { + extern { fn fmodf(a: f32, b: f32) -> f32; } + unsafe { fmodf(*self, *other) } + } +} + +#[cfg(not(test))] +impl Neg for f32 { + #[inline] + fn neg(&self) -> f32 { -*self } +} + +impl Signed for f32 { + /// Computes the absolute value. Returns `NAN` if the number is `NAN`. + #[inline] + fn abs(&self) -> f32 { + unsafe { intrinsics::fabsf32(*self) } + } + + /// The positive difference of two numbers. Returns `0.0` if the number is + /// less than or equal to `other`, otherwise the difference between`self` + /// and `other` is returned. + #[inline] + fn abs_sub(&self, other: &f32) -> f32 { + extern { fn fdimf(a: f32, b: f32) -> f32; } + unsafe { fdimf(*self, *other) } + } + + /// # Returns + /// + /// - `1.0` if the number is positive, `+0.0` or `INFINITY` + /// - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY` + /// - `NAN` if the number is NaN + #[inline] + fn signum(&self) -> f32 { + if self != self { NAN } else { + unsafe { intrinsics::copysignf32(1.0, *self) } + } + } + + /// Returns `true` if the number is positive, including `+0.0` and `INFINITY` + #[inline] + fn is_positive(&self) -> bool { *self > 0.0 || (1.0 / *self) == INFINITY } + + /// Returns `true` if the number is negative, including `-0.0` and `NEG_INFINITY` + #[inline] + fn is_negative(&self) -> bool { *self < 0.0 || (1.0 / *self) == NEG_INFINITY } +} + +impl Bounded for f32 { + // NOTE: this is the smallest non-infinite f32 value, *not* MIN_VALUE + #[inline] + fn min_value() -> f32 { -MAX_VALUE } + + #[inline] + fn max_value() -> f32 { MAX_VALUE } +} diff --git a/src/libcore/num/f64.rs b/src/libcore/num/f64.rs new file mode 100644 index 00000000000..b15b4566cdd --- /dev/null +++ b/src/libcore/num/f64.rs @@ -0,0 +1,227 @@ +// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! Operations and constants for 64-bits floats (`f64` type) + +use default::Default; +use intrinsics; +use num::{Zero, One, Bounded, Signed, Num, Primitive}; + +#[cfg(not(test))] use cmp::{Eq, Ord}; +#[cfg(not(test))] use ops::{Add, Sub, Mul, Div, Rem, Neg}; + +// FIXME(#5527): These constants should be deprecated once associated +// constants are implemented in favour of referencing the respective +// members of `Bounded` and `Float`. + +pub static RADIX: uint = 2u; + +pub static MANTISSA_DIGITS: uint = 53u; +pub static DIGITS: uint = 15u; + +pub static EPSILON: f64 = 2.2204460492503131e-16_f64; + +/// Smallest finite f64 value +pub static MIN_VALUE: f64 = -1.7976931348623157e+308_f64; +/// Smallest positive, normalized f64 value +pub static MIN_POS_VALUE: f64 = 2.2250738585072014e-308_f64; +/// Largest finite f64 value +pub static MAX_VALUE: f64 = 1.7976931348623157e+308_f64; + +pub static MIN_EXP: int = -1021; +pub static MAX_EXP: int = 1024; + +pub static MIN_10_EXP: int = -307; +pub static MAX_10_EXP: int = 308; + +pub static NAN: f64 = 0.0_f64/0.0_f64; + +pub static INFINITY: f64 = 1.0_f64/0.0_f64; + +pub static NEG_INFINITY: f64 = -1.0_f64/0.0_f64; + +/// Various useful constants. +pub mod consts { + // FIXME: replace with mathematical constants from cmath. + + // FIXME(#5527): These constants should be deprecated once associated + // constants are implemented in favour of referencing the respective members + // of `Float`. + + /// Archimedes' constant + pub static PI: f64 = 3.14159265358979323846264338327950288_f64; + + /// pi * 2.0 + pub static PI_2: f64 = 6.28318530717958647692528676655900576_f64; + + /// pi/2.0 + pub static FRAC_PI_2: f64 = 1.57079632679489661923132169163975144_f64; + + /// pi/3.0 + pub static FRAC_PI_3: f64 = 1.04719755119659774615421446109316763_f64; + + /// pi/4.0 + pub static FRAC_PI_4: f64 = 0.785398163397448309615660845819875721_f64; + + /// pi/6.0 + pub static FRAC_PI_6: f64 = 0.52359877559829887307710723054658381_f64; + + /// pi/8.0 + pub static FRAC_PI_8: f64 = 0.39269908169872415480783042290993786_f64; + + /// 1.0/pi + pub static FRAC_1_PI: f64 = 0.318309886183790671537767526745028724_f64; + + /// 2.0/pi + pub static FRAC_2_PI: f64 = 0.636619772367581343075535053490057448_f64; + + /// 2.0/sqrt(pi) + pub static FRAC_2_SQRTPI: f64 = 1.12837916709551257389615890312154517_f64; + + /// sqrt(2.0) + pub static SQRT2: f64 = 1.41421356237309504880168872420969808_f64; + + /// 1.0/sqrt(2.0) + pub static FRAC_1_SQRT2: f64 = 0.707106781186547524400844362104849039_f64; + + /// Euler's number + pub static E: f64 = 2.71828182845904523536028747135266250_f64; + + /// log2(e) + pub static LOG2_E: f64 = 1.44269504088896340735992468100189214_f64; + + /// log10(e) + pub static LOG10_E: f64 = 0.434294481903251827651128918916605082_f64; + + /// ln(2.0) + pub static LN_2: f64 = 0.693147180559945309417232121458176568_f64; + + /// ln(10.0) + pub static LN_10: f64 = 2.30258509299404568401799145468436421_f64; +} + +#[cfg(not(test))] +impl Ord for f64 { + #[inline] + fn lt(&self, other: &f64) -> bool { (*self) < (*other) } + #[inline] + fn le(&self, other: &f64) -> bool { (*self) <= (*other) } + #[inline] + fn ge(&self, other: &f64) -> bool { (*self) >= (*other) } + #[inline] + fn gt(&self, other: &f64) -> bool { (*self) > (*other) } +} +#[cfg(not(test))] +impl Eq for f64 { + #[inline] + fn eq(&self, other: &f64) -> bool { (*self) == (*other) } +} + +impl Default for f64 { + #[inline] + fn default() -> f64 { 0.0 } +} + +impl Primitive for f64 {} + +impl Num for f64 {} + +impl Zero for f64 { + #[inline] + fn zero() -> f64 { 0.0 } + + /// Returns true if the number is equal to either `0.0` or `-0.0` + #[inline] + fn is_zero(&self) -> bool { *self == 0.0 || *self == -0.0 } +} + +impl One for f64 { + #[inline] + fn one() -> f64 { 1.0 } +} + +#[cfg(not(test))] +impl Add for f64 { + #[inline] + fn add(&self, other: &f64) -> f64 { *self + *other } +} +#[cfg(not(test))] +impl Sub for f64 { + #[inline] + fn sub(&self, other: &f64) -> f64 { *self - *other } +} +#[cfg(not(test))] +impl Mul for f64 { + #[inline] + fn mul(&self, other: &f64) -> f64 { *self * *other } +} +#[cfg(not(test))] +impl Div for f64 { + #[inline] + fn div(&self, other: &f64) -> f64 { *self / *other } +} +#[cfg(not(test))] +impl Rem for f64 { + #[inline] + fn rem(&self, other: &f64) -> f64 { + extern { fn fmod(a: f64, b: f64) -> f64; } + unsafe { fmod(*self, *other) } + } +} +#[cfg(not(test))] +impl Neg for f64 { + #[inline] + fn neg(&self) -> f64 { -*self } +} + +impl Signed for f64 { + /// Computes the absolute value. Returns `NAN` if the number is `NAN`. + #[inline] + fn abs(&self) -> f64 { + unsafe { intrinsics::fabsf64(*self) } + } + + /// The positive difference of two numbers. Returns `0.0` if the number is less than or + /// equal to `other`, otherwise the difference between`self` and `other` is returned. + #[inline] + fn abs_sub(&self, other: &f64) -> f64 { + extern { fn fdim(a: f64, b: f64) -> f64; } + unsafe { fdim(*self, *other) } + } + + /// # Returns + /// + /// - `1.0` if the number is positive, `+0.0` or `INFINITY` + /// - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY` + /// - `NAN` if the number is NaN + #[inline] + fn signum(&self) -> f64 { + if self != self { NAN } else { + unsafe { intrinsics::copysignf64(1.0, *self) } + } + } + + /// Returns `true` if the number is positive, including `+0.0` and `INFINITY` + #[inline] + fn is_positive(&self) -> bool { *self > 0.0 || (1.0 / *self) == INFINITY } + + /// Returns `true` if the number is negative, including `-0.0` and `NEG_INFINITY` + #[inline] + fn is_negative(&self) -> bool { *self < 0.0 || (1.0 / *self) == NEG_INFINITY } +} + +impl Bounded for f64 { + // NOTE: this is the smallest non-infinite f32 value, *not* MIN_VALUE + #[inline] + fn min_value() -> f64 { -MAX_VALUE } + + #[inline] + fn max_value() -> f64 { MAX_VALUE } +} diff --git a/src/libcore/num/float_macros.rs b/src/libcore/num/float_macros.rs new file mode 100644 index 00000000000..3e403219a4f --- /dev/null +++ b/src/libcore/num/float_macros.rs @@ -0,0 +1,20 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![macro_escape] +#![doc(hidden)] + +macro_rules! assert_approx_eq( + ($a:expr, $b:expr) => ({ + let (a, b) = (&$a, &$b); + assert!((*a - *b).abs() < 1.0e-6, + "{} is not approximately equal to {}", *a, *b); + }) +) diff --git a/src/libcore/num/i16.rs b/src/libcore/num/i16.rs new file mode 100644 index 00000000000..361f75b9e88 --- /dev/null +++ b/src/libcore/num/i16.rs @@ -0,0 +1,72 @@ +// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! Operations and constants for signed 16-bits integers (`i16` type) + +use default::Default; +use intrinsics; +use num::{Bitwise, Bounded, Zero, One, Signed, Num, Primitive, Int}; +use num::{CheckedDiv, CheckedAdd, CheckedSub, CheckedMul}; +use option::{Option, Some, None}; + +#[cfg(not(test))] +use cmp::{Eq, Ord, TotalEq, TotalOrd, Less, Greater, Equal, Ordering}; +#[cfg(not(test))] +use ops::{Add, Sub, Mul, Div, Rem, Neg, BitOr, BitAnd, BitXor}; +#[cfg(not(test))] +use ops::{Shl, Shr, Not}; + +int_module!(i16, 16) + +impl Bitwise for i16 { + /// Returns the number of ones in the binary representation of the number. + #[inline] + fn count_ones(&self) -> i16 { unsafe { intrinsics::ctpop16(*self as u16) as i16 } } + + /// Returns the number of leading zeros in the in the binary representation + /// of the number. + #[inline] + fn leading_zeros(&self) -> i16 { unsafe { intrinsics::ctlz16(*self as u16) as i16 } } + + /// Returns the number of trailing zeros in the in the binary representation + /// of the number. + #[inline] + fn trailing_zeros(&self) -> i16 { unsafe { intrinsics::cttz16(*self as u16) as i16 } } +} + +impl CheckedAdd for i16 { + #[inline] + fn checked_add(&self, v: &i16) -> Option { + unsafe { + let (x, y) = intrinsics::i16_add_with_overflow(*self, *v); + if y { None } else { Some(x) } + } + } +} + +impl CheckedSub for i16 { + #[inline] + fn checked_sub(&self, v: &i16) -> Option { + unsafe { + let (x, y) = intrinsics::i16_sub_with_overflow(*self, *v); + if y { None } else { Some(x) } + } + } +} + +impl CheckedMul for i16 { + #[inline] + fn checked_mul(&self, v: &i16) -> Option { + unsafe { + let (x, y) = intrinsics::i16_mul_with_overflow(*self, *v); + if y { None } else { Some(x) } + } + } +} diff --git a/src/libcore/num/i32.rs b/src/libcore/num/i32.rs new file mode 100644 index 00000000000..9071f150292 --- /dev/null +++ b/src/libcore/num/i32.rs @@ -0,0 +1,72 @@ +// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! Operations and constants for signed 32-bits integers (`i32` type) + +use default::Default; +use intrinsics; +use num::{Bitwise, Bounded, Zero, One, Signed, Num, Primitive, Int}; +use num::{CheckedDiv, CheckedAdd, CheckedSub, CheckedMul}; +use option::{Option, Some, None}; + +#[cfg(not(test))] +use cmp::{Eq, Ord, TotalEq, TotalOrd, Less, Greater, Equal, Ordering}; +#[cfg(not(test))] +use ops::{Add, Sub, Mul, Div, Rem, Neg, BitOr, BitAnd, BitXor}; +#[cfg(not(test))] +use ops::{Shl, Shr, Not}; + +int_module!(i32, 32) + +impl Bitwise for i32 { + /// Returns the number of ones in the binary representation of the number. + #[inline] + fn count_ones(&self) -> i32 { unsafe { intrinsics::ctpop32(*self as u32) as i32 } } + + /// Returns the number of leading zeros in the in the binary representation + /// of the number. + #[inline] + fn leading_zeros(&self) -> i32 { unsafe { intrinsics::ctlz32(*self as u32) as i32 } } + + /// Returns the number of trailing zeros in the in the binary representation + /// of the number. + #[inline] + fn trailing_zeros(&self) -> i32 { unsafe { intrinsics::cttz32(*self as u32) as i32 } } +} + +impl CheckedAdd for i32 { + #[inline] + fn checked_add(&self, v: &i32) -> Option { + unsafe { + let (x, y) = intrinsics::i32_add_with_overflow(*self, *v); + if y { None } else { Some(x) } + } + } +} + +impl CheckedSub for i32 { + #[inline] + fn checked_sub(&self, v: &i32) -> Option { + unsafe { + let (x, y) = intrinsics::i32_sub_with_overflow(*self, *v); + if y { None } else { Some(x) } + } + } +} + +impl CheckedMul for i32 { + #[inline] + fn checked_mul(&self, v: &i32) -> Option { + unsafe { + let (x, y) = intrinsics::i32_mul_with_overflow(*self, *v); + if y { None } else { Some(x) } + } + } +} diff --git a/src/libcore/num/i64.rs b/src/libcore/num/i64.rs new file mode 100644 index 00000000000..ba7b715f13d --- /dev/null +++ b/src/libcore/num/i64.rs @@ -0,0 +1,71 @@ +// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! Operations and constants for signed 64-bits integers (`i64` type) + +use default::Default; +use intrinsics; +use num::{Bitwise, Bounded, Zero, One, Signed, Num, Primitive, Int}; +use num::{CheckedDiv, CheckedAdd, CheckedSub, CheckedMul}; +use option::{Option, Some, None}; + +#[cfg(not(test))] +use cmp::{Eq, Ord, TotalEq, TotalOrd, Less, Greater, Equal, Ordering}; +#[cfg(not(test))] +use ops::{Add, Sub, Mul, Div, Rem, Neg, BitOr, BitAnd, BitXor}; +#[cfg(not(test))] +use ops::{Shl, Shr, Not}; + +int_module!(i64, 64) + +impl Bitwise for i64 { + /// Returns the number of ones in the binary representation of the number. + #[inline] + fn count_ones(&self) -> i64 { unsafe { intrinsics::ctpop64(*self as u64) as i64 } } + + /// Returns the number of leading zeros in the in the binary representation + /// of the number. + #[inline] + fn leading_zeros(&self) -> i64 { unsafe { intrinsics::ctlz64(*self as u64) as i64 } } + + /// Counts the number of trailing zeros. + #[inline] + fn trailing_zeros(&self) -> i64 { unsafe { intrinsics::cttz64(*self as u64) as i64 } } +} + +impl CheckedAdd for i64 { + #[inline] + fn checked_add(&self, v: &i64) -> Option { + unsafe { + let (x, y) = intrinsics::i64_add_with_overflow(*self, *v); + if y { None } else { Some(x) } + } + } +} + +impl CheckedSub for i64 { + #[inline] + fn checked_sub(&self, v: &i64) -> Option { + unsafe { + let (x, y) = intrinsics::i64_sub_with_overflow(*self, *v); + if y { None } else { Some(x) } + } + } +} + +impl CheckedMul for i64 { + #[inline] + fn checked_mul(&self, v: &i64) -> Option { + unsafe { + let (x, y) = intrinsics::i64_mul_with_overflow(*self, *v); + if y { None } else { Some(x) } + } + } +} diff --git a/src/libcore/num/i8.rs b/src/libcore/num/i8.rs new file mode 100644 index 00000000000..6ec05eb50ee --- /dev/null +++ b/src/libcore/num/i8.rs @@ -0,0 +1,72 @@ +// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! Operations and constants for signed 8-bits integers (`i8` type) + +use default::Default; +use intrinsics; +use num::{Bitwise, Bounded, Zero, One, Signed, Num, Primitive, Int}; +use num::{CheckedDiv, CheckedAdd, CheckedSub, CheckedMul}; +use option::{Option, Some, None}; + +#[cfg(not(test))] +use cmp::{Eq, Ord, TotalEq, TotalOrd, Less, Greater, Equal, Ordering}; +#[cfg(not(test))] +use ops::{Add, Sub, Mul, Div, Rem, Neg, BitOr, BitAnd, BitXor}; +#[cfg(not(test))] +use ops::{Shl, Shr, Not}; + +int_module!(i8, 8) + +impl Bitwise for i8 { + /// Returns the number of ones in the binary representation of the number. + #[inline] + fn count_ones(&self) -> i8 { unsafe { intrinsics::ctpop8(*self as u8) as i8 } } + + /// Returns the number of leading zeros in the in the binary representation + /// of the number. + #[inline] + fn leading_zeros(&self) -> i8 { unsafe { intrinsics::ctlz8(*self as u8) as i8 } } + + /// Returns the number of trailing zeros in the in the binary representation + /// of the number. + #[inline] + fn trailing_zeros(&self) -> i8 { unsafe { intrinsics::cttz8(*self as u8) as i8 } } +} + +impl CheckedAdd for i8 { + #[inline] + fn checked_add(&self, v: &i8) -> Option { + unsafe { + let (x, y) = intrinsics::i8_add_with_overflow(*self, *v); + if y { None } else { Some(x) } + } + } +} + +impl CheckedSub for i8 { + #[inline] + fn checked_sub(&self, v: &i8) -> Option { + unsafe { + let (x, y) = intrinsics::i8_sub_with_overflow(*self, *v); + if y { None } else { Some(x) } + } + } +} + +impl CheckedMul for i8 { + #[inline] + fn checked_mul(&self, v: &i8) -> Option { + unsafe { + let (x, y) = intrinsics::i8_mul_with_overflow(*self, *v); + if y { None } else { Some(x) } + } + } +} diff --git a/src/libcore/num/int.rs b/src/libcore/num/int.rs new file mode 100644 index 00000000000..8273fa2b39f --- /dev/null +++ b/src/libcore/num/int.rs @@ -0,0 +1,127 @@ +// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! Operations and constants for architecture-sized signed integers (`int` type) + +use default::Default; +use intrinsics; +use num::{Bitwise, Bounded, Zero, One, Signed, Num, Primitive, Int}; +use num::{CheckedDiv, CheckedAdd, CheckedSub, CheckedMul}; +use option::{Option, Some, None}; + +#[cfg(not(test))] +use cmp::{Eq, Ord, TotalEq, TotalOrd, Less, Greater, Equal, Ordering}; +#[cfg(not(test))] +use ops::{Add, Sub, Mul, Div, Rem, Neg, BitOr, BitAnd, BitXor}; +#[cfg(not(test))] +use ops::{Shl, Shr, Not}; + +#[cfg(target_word_size = "32")] int_module!(int, 32) +#[cfg(target_word_size = "64")] int_module!(int, 64) + +#[cfg(target_word_size = "32")] +impl Bitwise for int { + /// Returns the number of ones in the binary representation of the number. + #[inline] + fn count_ones(&self) -> int { (*self as i32).count_ones() as int } + + /// Returns the number of leading zeros in the in the binary representation + /// of the number. + #[inline] + fn leading_zeros(&self) -> int { (*self as i32).leading_zeros() as int } + + /// Returns the number of trailing zeros in the in the binary representation + /// of the number. + #[inline] + fn trailing_zeros(&self) -> int { (*self as i32).trailing_zeros() as int } +} + +#[cfg(target_word_size = "64")] +impl Bitwise for int { + /// Returns the number of ones in the binary representation of the number. + #[inline] + fn count_ones(&self) -> int { (*self as i64).count_ones() as int } + + /// Returns the number of leading zeros in the in the binary representation + /// of the number. + #[inline] + fn leading_zeros(&self) -> int { (*self as i64).leading_zeros() as int } + + /// Returns the number of trailing zeros in the in the binary representation + /// of the number. + #[inline] + fn trailing_zeros(&self) -> int { (*self as i64).trailing_zeros() as int } +} + +#[cfg(target_word_size = "32")] +impl CheckedAdd for int { + #[inline] + fn checked_add(&self, v: &int) -> Option { + unsafe { + let (x, y) = intrinsics::i32_add_with_overflow(*self as i32, *v as i32); + if y { None } else { Some(x as int) } + } + } +} + +#[cfg(target_word_size = "64")] +impl CheckedAdd for int { + #[inline] + fn checked_add(&self, v: &int) -> Option { + unsafe { + let (x, y) = intrinsics::i64_add_with_overflow(*self as i64, *v as i64); + if y { None } else { Some(x as int) } + } + } +} + +#[cfg(target_word_size = "32")] +impl CheckedSub for int { + #[inline] + fn checked_sub(&self, v: &int) -> Option { + unsafe { + let (x, y) = intrinsics::i32_sub_with_overflow(*self as i32, *v as i32); + if y { None } else { Some(x as int) } + } + } +} + +#[cfg(target_word_size = "64")] +impl CheckedSub for int { + #[inline] + fn checked_sub(&self, v: &int) -> Option { + unsafe { + let (x, y) = intrinsics::i64_sub_with_overflow(*self as i64, *v as i64); + if y { None } else { Some(x as int) } + } + } +} + +#[cfg(target_word_size = "32")] +impl CheckedMul for int { + #[inline] + fn checked_mul(&self, v: &int) -> Option { + unsafe { + let (x, y) = intrinsics::i32_mul_with_overflow(*self as i32, *v as i32); + if y { None } else { Some(x as int) } + } + } +} + +#[cfg(target_word_size = "64")] +impl CheckedMul for int { + #[inline] + fn checked_mul(&self, v: &int) -> Option { + unsafe { + let (x, y) = intrinsics::i64_mul_with_overflow(*self as i64, *v as i64); + if y { None } else { Some(x as int) } + } + } +} diff --git a/src/libcore/num/int_macros.rs b/src/libcore/num/int_macros.rs new file mode 100644 index 00000000000..7d21764eb70 --- /dev/null +++ b/src/libcore/num/int_macros.rs @@ -0,0 +1,338 @@ +// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![macro_escape] +#![doc(hidden)] + +macro_rules! int_module (($T:ty, $bits:expr) => ( + +// FIXME(#11621): Should be deprecated once CTFE is implemented in favour of +// calling the `mem::size_of` function. +pub static BITS : uint = $bits; +// FIXME(#11621): Should be deprecated once CTFE is implemented in favour of +// calling the `mem::size_of` function. +pub static BYTES : uint = ($bits / 8); + +// FIXME(#11621): Should be deprecated once CTFE is implemented in favour of +// calling the `Bounded::min_value` function. +pub static MIN: $T = (-1 as $T) << (BITS - 1); +// FIXME(#9837): Compute MIN like this so the high bits that shouldn't exist are 0. +// FIXME(#11621): Should be deprecated once CTFE is implemented in favour of +// calling the `Bounded::max_value` function. +pub static MAX: $T = !MIN; + +#[cfg(not(test))] +impl Ord for $T { + #[inline] + fn lt(&self, other: &$T) -> bool { *self < *other } +} +#[cfg(not(test))] +impl TotalEq for $T {} +#[cfg(not(test))] +impl Eq for $T { + #[inline] + fn eq(&self, other: &$T) -> bool { *self == *other } +} +#[cfg(not(test))] +impl TotalOrd for $T { + #[inline] + fn cmp(&self, other: &$T) -> Ordering { + if *self < *other { Less } + else if *self > *other { Greater } + else { Equal } + } +} + +impl Num for $T {} + +impl Zero for $T { + #[inline] + fn zero() -> $T { 0 } + + #[inline] + fn is_zero(&self) -> bool { *self == 0 } +} + +impl One for $T { + #[inline] + fn one() -> $T { 1 } +} + +#[cfg(not(test))] +impl Add<$T,$T> for $T { + #[inline] + fn add(&self, other: &$T) -> $T { *self + *other } +} + +#[cfg(not(test))] +impl Sub<$T,$T> for $T { + #[inline] + fn sub(&self, other: &$T) -> $T { *self - *other } +} + +#[cfg(not(test))] +impl Mul<$T,$T> for $T { + #[inline] + fn mul(&self, other: &$T) -> $T { *self * *other } +} + +#[cfg(not(test))] +impl Div<$T,$T> for $T { + /// Integer division, truncated towards 0. + /// + /// # Examples + /// + /// ~~~ + /// assert!( 8 / 3 == 2); + /// assert!( 8 / -3 == -2); + /// assert!(-8 / 3 == -2); + /// assert!(-8 / -3 == 2); + /// + /// assert!( 1 / 2 == 0); + /// assert!( 1 / -2 == 0); + /// assert!(-1 / 2 == 0); + /// assert!(-1 / -2 == 0); + /// ~~~ + #[inline] + fn div(&self, other: &$T) -> $T { *self / *other } +} + +#[cfg(not(test))] +impl Rem<$T,$T> for $T { + /// Returns the integer remainder after division, satisfying: + /// + /// ~~~ + /// # let n = 1; + /// # let d = 2; + /// assert!((n / d) * d + (n % d) == n) + /// ~~~ + /// + /// # Examples + /// + /// ~~~ + /// assert!( 8 % 3 == 2); + /// assert!( 8 % -3 == 2); + /// assert!(-8 % 3 == -2); + /// assert!(-8 % -3 == -2); + /// + /// assert!( 1 % 2 == 1); + /// assert!( 1 % -2 == 1); + /// assert!(-1 % 2 == -1); + /// assert!(-1 % -2 == -1); + /// ~~~ + #[inline] + fn rem(&self, other: &$T) -> $T { *self % *other } +} + +#[cfg(not(test))] +impl Neg<$T> for $T { + #[inline] + fn neg(&self) -> $T { -*self } +} + +impl Signed for $T { + /// Computes the absolute value + #[inline] + fn abs(&self) -> $T { + if self.is_negative() { -*self } else { *self } + } + + /// + /// The positive difference of two numbers. Returns `0` if the number is less than or + /// equal to `other`, otherwise the difference between`self` and `other` is returned. + /// + #[inline] + fn abs_sub(&self, other: &$T) -> $T { + if *self <= *other { 0 } else { *self - *other } + } + + /// + /// # Returns + /// + /// - `0` if the number is zero + /// - `1` if the number is positive + /// - `-1` if the number is negative + /// + #[inline] + fn signum(&self) -> $T { + match *self { + n if n > 0 => 1, + 0 => 0, + _ => -1, + } + } + + /// Returns true if the number is positive + #[inline] + fn is_positive(&self) -> bool { *self > 0 } + + /// Returns true if the number is negative + #[inline] + fn is_negative(&self) -> bool { *self < 0 } +} + +#[cfg(not(test))] +impl BitOr<$T,$T> for $T { + #[inline] + fn bitor(&self, other: &$T) -> $T { *self | *other } +} + +#[cfg(not(test))] +impl BitAnd<$T,$T> for $T { + #[inline] + fn bitand(&self, other: &$T) -> $T { *self & *other } +} + +#[cfg(not(test))] +impl BitXor<$T,$T> for $T { + #[inline] + fn bitxor(&self, other: &$T) -> $T { *self ^ *other } +} + +#[cfg(not(test))] +impl Shl<$T,$T> for $T { + #[inline] + fn shl(&self, other: &$T) -> $T { *self << *other } +} + +#[cfg(not(test))] +impl Shr<$T,$T> for $T { + #[inline] + fn shr(&self, other: &$T) -> $T { *self >> *other } +} + +#[cfg(not(test))] +impl Not<$T> for $T { + #[inline] + fn not(&self) -> $T { !*self } +} + +impl Bounded for $T { + #[inline] + fn min_value() -> $T { MIN } + + #[inline] + fn max_value() -> $T { MAX } +} + +impl CheckedDiv for $T { + #[inline] + fn checked_div(&self, v: &$T) -> Option<$T> { + if *v == 0 || (*self == MIN && *v == -1) { + None + } else { + Some(self / *v) + } + } +} + +impl Default for $T { + #[inline] + fn default() -> $T { 0 } +} + +impl Int for $T {} + +impl Primitive for $T {} + +#[cfg(test)] +mod tests { + use prelude::*; + use super::*; + + use int; + use num; + use num::Bitwise; + use num::CheckedDiv; + + #[test] + fn test_overflows() { + assert!(MAX > 0); + assert!(MIN <= 0); + assert!(MIN + MAX + 1 == 0); + } + + #[test] + fn test_num() { + num::test_num(10 as $T, 2 as $T); + } + + #[test] + pub fn test_abs() { + assert!((1 as $T).abs() == 1 as $T); + assert!((0 as $T).abs() == 0 as $T); + assert!((-1 as $T).abs() == 1 as $T); + } + + #[test] + fn test_abs_sub() { + assert!((-1 as $T).abs_sub(&(1 as $T)) == 0 as $T); + assert!((1 as $T).abs_sub(&(1 as $T)) == 0 as $T); + assert!((1 as $T).abs_sub(&(0 as $T)) == 1 as $T); + assert!((1 as $T).abs_sub(&(-1 as $T)) == 2 as $T); + } + + #[test] + fn test_signum() { + assert!((1 as $T).signum() == 1 as $T); + assert!((0 as $T).signum() == 0 as $T); + assert!((-0 as $T).signum() == 0 as $T); + assert!((-1 as $T).signum() == -1 as $T); + } + + #[test] + fn test_is_positive() { + assert!((1 as $T).is_positive()); + assert!(!(0 as $T).is_positive()); + assert!(!(-0 as $T).is_positive()); + assert!(!(-1 as $T).is_positive()); + } + + #[test] + fn test_is_negative() { + assert!(!(1 as $T).is_negative()); + assert!(!(0 as $T).is_negative()); + assert!(!(-0 as $T).is_negative()); + assert!((-1 as $T).is_negative()); + } + + #[test] + fn test_bitwise() { + assert!(0b1110 as $T == (0b1100 as $T).bitor(&(0b1010 as $T))); + assert!(0b1000 as $T == (0b1100 as $T).bitand(&(0b1010 as $T))); + assert!(0b0110 as $T == (0b1100 as $T).bitxor(&(0b1010 as $T))); + assert!(0b1110 as $T == (0b0111 as $T).shl(&(1 as $T))); + assert!(0b0111 as $T == (0b1110 as $T).shr(&(1 as $T))); + assert!(-(0b11 as $T) - (1 as $T) == (0b11 as $T).not()); + } + + #[test] + fn test_count_ones() { + assert!((0b0101100 as $T).count_ones() == 3); + assert!((0b0100001 as $T).count_ones() == 2); + assert!((0b1111001 as $T).count_ones() == 5); + } + + #[test] + fn test_count_zeros() { + assert!((0b0101100 as $T).count_zeros() == BITS as $T - 3); + assert!((0b0100001 as $T).count_zeros() == BITS as $T - 2); + assert!((0b1111001 as $T).count_zeros() == BITS as $T - 5); + } + + #[test] + fn test_signed_checked_div() { + assert!(10i.checked_div(&2) == Some(5)); + assert!(5i.checked_div(&0) == None); + assert!(int::MIN.checked_div(&-1) == None); + } +} + +)) diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs new file mode 100644 index 00000000000..22411fef3b2 --- /dev/null +++ b/src/libcore/num/mod.rs @@ -0,0 +1,876 @@ +// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! Numeric traits and functions for generic mathematics +//! +//! These are implemented for the primitive numeric types in `std::{u8, u16, +//! u32, u64, uint, i8, i16, i32, i64, int, f32, f64, float}`. + +#![allow(missing_doc)] + +use clone::Clone; +use cmp::{Eq, Ord}; +use kinds::Copy; +use mem::size_of; +use ops::{Add, Sub, Mul, Div, Rem, Neg}; +use ops::{Not, BitAnd, BitOr, BitXor, Shl, Shr}; +use option::{Option, Some, None}; + +/// The base trait for numeric types +pub trait Num: Eq + Zero + One + + Neg + + Add + + Sub + + Mul + + Div + + Rem {} + +/// Simultaneous division and remainder +#[inline] +pub fn div_rem + Rem>(x: T, y: T) -> (T, T) { + (x / y, x % y) +} + +/// Defines an additive identity element for `Self`. +/// +/// # Deriving +/// +/// This trait can be automatically be derived using `#[deriving(Zero)]` +/// attribute. If you choose to use this, make sure that the laws outlined in +/// the documentation for `Zero::zero` still hold. +pub trait Zero: Add { + /// Returns the additive identity element of `Self`, `0`. + /// + /// # Laws + /// + /// ~~~notrust + /// a + 0 = a ∀ a ∈ Self + /// 0 + a = a ∀ a ∈ Self + /// ~~~ + /// + /// # Purity + /// + /// This function should return the same result at all times regardless of + /// external mutable state, for example values stored in TLS or in + /// `static mut`s. + // FIXME (#5527): This should be an associated constant + fn zero() -> Self; + + /// Returns `true` if `self` is equal to the additive identity. + fn is_zero(&self) -> bool; +} + +/// Returns the additive identity, `0`. +#[inline(always)] pub fn zero() -> T { Zero::zero() } + +/// Defines a multiplicative identity element for `Self`. +pub trait One: Mul { + /// Returns the multiplicative identity element of `Self`, `1`. + /// + /// # Laws + /// + /// ~~~notrust + /// a * 1 = a ∀ a ∈ Self + /// 1 * a = a ∀ a ∈ Self + /// ~~~ + /// + /// # Purity + /// + /// This function should return the same result at all times regardless of + /// external mutable state, for example values stored in TLS or in + /// `static mut`s. + // FIXME (#5527): This should be an associated constant + fn one() -> Self; +} + +/// Returns the multiplicative identity, `1`. +#[inline(always)] pub fn one() -> T { One::one() } + +/// Useful functions for signed numbers (i.e. numbers that can be negative). +pub trait Signed: Num + Neg { + /// Computes the absolute value. + /// + /// For float, f32, and f64, `NaN` will be returned if the number is `NaN`. + fn abs(&self) -> Self; + + /// The positive difference of two numbers. + /// + /// Returns `zero` if the number is less than or equal to `other`, otherwise the difference + /// between `self` and `other` is returned. + fn abs_sub(&self, other: &Self) -> Self; + + /// Returns the sign of the number. + /// + /// For `float`, `f32`, `f64`: + /// * `1.0` if the number is positive, `+0.0` or `INFINITY` + /// * `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY` + /// * `NaN` if the number is `NaN` + /// + /// For `int`: + /// * `0` if the number is zero + /// * `1` if the number is positive + /// * `-1` if the number is negative + fn signum(&self) -> Self; + + /// Returns true if the number is positive and false if the number is zero or negative. + fn is_positive(&self) -> bool; + + /// Returns true if the number is negative and false if the number is zero or positive. + fn is_negative(&self) -> bool; +} + +/// Computes the absolute value. +/// +/// For float, f32, and f64, `NaN` will be returned if the number is `NaN` +#[inline(always)] +pub fn abs(value: T) -> T { + value.abs() +} + +/// The positive difference of two numbers. +/// +/// Returns `zero` if the number is less than or equal to `other`, +/// otherwise the difference between `self` and `other` is returned. +#[inline(always)] +pub fn abs_sub(x: T, y: T) -> T { + x.abs_sub(&y) +} + +/// Returns the sign of the number. +/// +/// For float, f32, f64: +/// - `1.0` if the number is positive, `+0.0` or `INFINITY` +/// - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY` +/// - `NAN` if the number is `NAN` +/// +/// For int: +/// - `0` if the number is zero +/// - `1` if the number is positive +/// - `-1` if the number is negative +#[inline(always)] pub fn signum(value: T) -> T { value.signum() } + +/// A trait for values which cannot be negative +pub trait Unsigned: Num {} + +/// Raises a value to the power of exp, using exponentiation by squaring. +/// +/// # Example +/// +/// ```rust +/// use std::num; +/// +/// assert_eq!(num::pow(2, 4), 16); +/// ``` +#[inline] +pub fn pow>(mut base: T, mut exp: uint) -> T { + if exp == 1 { base } + else { + let mut acc = one::(); + while exp > 0 { + if (exp & 1) == 1 { + acc = acc * base; + } + base = base * base; + exp = exp >> 1; + } + acc + } +} + +/// Numbers which have upper and lower bounds +pub trait Bounded { + // FIXME (#5527): These should be associated constants + /// returns the smallest finite number this type can represent + fn min_value() -> Self; + /// returns the largest finite number this type can represent + fn max_value() -> Self; +} + +/// Numbers with a fixed binary representation. +pub trait Bitwise: Bounded + + Not + + BitAnd + + BitOr + + BitXor + + Shl + + Shr { + /// Returns the number of ones in the binary representation of the number. + /// + /// # Example + /// + /// ```rust + /// use std::num::Bitwise; + /// + /// let n = 0b01001100u8; + /// assert_eq!(n.count_ones(), 3); + /// ``` + fn count_ones(&self) -> Self; + + /// Returns the number of zeros in the binary representation of the number. + /// + /// # Example + /// + /// ```rust + /// use std::num::Bitwise; + /// + /// let n = 0b01001100u8; + /// assert_eq!(n.count_zeros(), 5); + /// ``` + #[inline] + fn count_zeros(&self) -> Self { + (!*self).count_ones() + } + + /// Returns the number of leading zeros in the in the binary representation + /// of the number. + /// + /// # Example + /// + /// ```rust + /// use std::num::Bitwise; + /// + /// let n = 0b0101000u16; + /// assert_eq!(n.leading_zeros(), 10); + /// ``` + fn leading_zeros(&self) -> Self; + + /// Returns the number of trailing zeros in the in the binary representation + /// of the number. + /// + /// # Example + /// + /// ```rust + /// use std::num::Bitwise; + /// + /// let n = 0b0101000u16; + /// assert_eq!(n.trailing_zeros(), 3); + /// ``` + fn trailing_zeros(&self) -> Self; +} + +/// Specifies the available operations common to all of Rust's core numeric primitives. +/// These may not always make sense from a purely mathematical point of view, but +/// may be useful for systems programming. +pub trait Primitive: Copy + + Clone + + Num + + NumCast + + Ord + + Bounded {} + +/// A collection of traits relevant to primitive signed and unsigned integers +pub trait Int: Primitive + + Bitwise + + CheckedAdd + + CheckedSub + + CheckedMul + + CheckedDiv {} + +/// Returns the smallest power of 2 greater than or equal to `n`. +#[inline] +pub fn next_power_of_two(n: T) -> T { + let halfbits: T = cast(size_of::() * 4).unwrap(); + let mut tmp: T = n - one(); + let mut shift: T = one(); + while shift <= halfbits { + tmp = tmp | (tmp >> shift); + shift = shift << one(); + } + tmp + one() +} + +// Returns `true` iff `n == 2^k` for some k. +#[inline] +pub fn is_power_of_two(n: T) -> bool { + (n - one()) & n == zero() +} + +/// Returns the smallest power of 2 greater than or equal to `n`. If the next +/// power of two is greater than the type's maximum value, `None` is returned, +/// otherwise the power of 2 is wrapped in `Some`. +#[inline] +pub fn checked_next_power_of_two(n: T) -> Option { + let halfbits: T = cast(size_of::() * 4).unwrap(); + let mut tmp: T = n - one(); + let mut shift: T = one(); + while shift <= halfbits { + tmp = tmp | (tmp >> shift); + shift = shift << one(); + } + tmp.checked_add(&one()) +} + +/// A generic trait for converting a value to a number. +pub trait ToPrimitive { + /// Converts the value of `self` to an `int`. + #[inline] + fn to_int(&self) -> Option { + self.to_i64().and_then(|x| x.to_int()) + } + + /// Converts the value of `self` to an `i8`. + #[inline] + fn to_i8(&self) -> Option { + self.to_i64().and_then(|x| x.to_i8()) + } + + /// Converts the value of `self` to an `i16`. + #[inline] + fn to_i16(&self) -> Option { + self.to_i64().and_then(|x| x.to_i16()) + } + + /// Converts the value of `self` to an `i32`. + #[inline] + fn to_i32(&self) -> Option { + self.to_i64().and_then(|x| x.to_i32()) + } + + /// Converts the value of `self` to an `i64`. + fn to_i64(&self) -> Option; + + /// Converts the value of `self` to an `uint`. + #[inline] + fn to_uint(&self) -> Option { + self.to_u64().and_then(|x| x.to_uint()) + } + + /// Converts the value of `self` to an `u8`. + #[inline] + fn to_u8(&self) -> Option { + self.to_u64().and_then(|x| x.to_u8()) + } + + /// Converts the value of `self` to an `u16`. + #[inline] + fn to_u16(&self) -> Option { + self.to_u64().and_then(|x| x.to_u16()) + } + + /// Converts the value of `self` to an `u32`. + #[inline] + fn to_u32(&self) -> Option { + self.to_u64().and_then(|x| x.to_u32()) + } + + /// Converts the value of `self` to an `u64`. + #[inline] + fn to_u64(&self) -> Option; + + /// Converts the value of `self` to an `f32`. + #[inline] + fn to_f32(&self) -> Option { + self.to_f64().and_then(|x| x.to_f32()) + } + + /// Converts the value of `self` to an `f64`. + #[inline] + fn to_f64(&self) -> Option { + self.to_i64().and_then(|x| x.to_f64()) + } +} + +macro_rules! impl_to_primitive_int_to_int( + ($SrcT:ty, $DstT:ty) => ( + { + if size_of::<$SrcT>() <= size_of::<$DstT>() { + Some(*self as $DstT) + } else { + let n = *self as i64; + let min_value: $DstT = Bounded::min_value(); + let max_value: $DstT = Bounded::max_value(); + if min_value as i64 <= n && n <= max_value as i64 { + Some(*self as $DstT) + } else { + None + } + } + } + ) +) + +macro_rules! impl_to_primitive_int_to_uint( + ($SrcT:ty, $DstT:ty) => ( + { + let zero: $SrcT = Zero::zero(); + let max_value: $DstT = Bounded::max_value(); + if zero <= *self && *self as u64 <= max_value as u64 { + Some(*self as $DstT) + } else { + None + } + } + ) +) + +macro_rules! impl_to_primitive_int( + ($T:ty) => ( + impl ToPrimitive for $T { + #[inline] + fn to_int(&self) -> Option { impl_to_primitive_int_to_int!($T, int) } + #[inline] + fn to_i8(&self) -> Option { impl_to_primitive_int_to_int!($T, i8) } + #[inline] + fn to_i16(&self) -> Option { impl_to_primitive_int_to_int!($T, i16) } + #[inline] + fn to_i32(&self) -> Option { impl_to_primitive_int_to_int!($T, i32) } + #[inline] + fn to_i64(&self) -> Option { impl_to_primitive_int_to_int!($T, i64) } + + #[inline] + fn to_uint(&self) -> Option { impl_to_primitive_int_to_uint!($T, uint) } + #[inline] + fn to_u8(&self) -> Option { impl_to_primitive_int_to_uint!($T, u8) } + #[inline] + fn to_u16(&self) -> Option { impl_to_primitive_int_to_uint!($T, u16) } + #[inline] + fn to_u32(&self) -> Option { impl_to_primitive_int_to_uint!($T, u32) } + #[inline] + fn to_u64(&self) -> Option { impl_to_primitive_int_to_uint!($T, u64) } + + #[inline] + fn to_f32(&self) -> Option { Some(*self as f32) } + #[inline] + fn to_f64(&self) -> Option { Some(*self as f64) } + } + ) +) + +impl_to_primitive_int!(int) +impl_to_primitive_int!(i8) +impl_to_primitive_int!(i16) +impl_to_primitive_int!(i32) +impl_to_primitive_int!(i64) + +macro_rules! impl_to_primitive_uint_to_int( + ($DstT:ty) => ( + { + let max_value: $DstT = Bounded::max_value(); + if *self as u64 <= max_value as u64 { + Some(*self as $DstT) + } else { + None + } + } + ) +) + +macro_rules! impl_to_primitive_uint_to_uint( + ($SrcT:ty, $DstT:ty) => ( + { + if size_of::<$SrcT>() <= size_of::<$DstT>() { + Some(*self as $DstT) + } else { + let zero: $SrcT = Zero::zero(); + let max_value: $DstT = Bounded::max_value(); + if zero <= *self && *self as u64 <= max_value as u64 { + Some(*self as $DstT) + } else { + None + } + } + } + ) +) + +macro_rules! impl_to_primitive_uint( + ($T:ty) => ( + impl ToPrimitive for $T { + #[inline] + fn to_int(&self) -> Option { impl_to_primitive_uint_to_int!(int) } + #[inline] + fn to_i8(&self) -> Option { impl_to_primitive_uint_to_int!(i8) } + #[inline] + fn to_i16(&self) -> Option { impl_to_primitive_uint_to_int!(i16) } + #[inline] + fn to_i32(&self) -> Option { impl_to_primitive_uint_to_int!(i32) } + #[inline] + fn to_i64(&self) -> Option { impl_to_primitive_uint_to_int!(i64) } + + #[inline] + fn to_uint(&self) -> Option { impl_to_primitive_uint_to_uint!($T, uint) } + #[inline] + fn to_u8(&self) -> Option { impl_to_primitive_uint_to_uint!($T, u8) } + #[inline] + fn to_u16(&self) -> Option { impl_to_primitive_uint_to_uint!($T, u16) } + #[inline] + fn to_u32(&self) -> Option { impl_to_primitive_uint_to_uint!($T, u32) } + #[inline] + fn to_u64(&self) -> Option { impl_to_primitive_uint_to_uint!($T, u64) } + + #[inline] + fn to_f32(&self) -> Option { Some(*self as f32) } + #[inline] + fn to_f64(&self) -> Option { Some(*self as f64) } + } + ) +) + +impl_to_primitive_uint!(uint) +impl_to_primitive_uint!(u8) +impl_to_primitive_uint!(u16) +impl_to_primitive_uint!(u32) +impl_to_primitive_uint!(u64) + +macro_rules! impl_to_primitive_float_to_float( + ($SrcT:ty, $DstT:ty) => ( + if size_of::<$SrcT>() <= size_of::<$DstT>() { + Some(*self as $DstT) + } else { + let n = *self as f64; + let max_value: $SrcT = Bounded::max_value(); + if -max_value as f64 <= n && n <= max_value as f64 { + Some(*self as $DstT) + } else { + None + } + } + ) +) + +macro_rules! impl_to_primitive_float( + ($T:ty) => ( + impl ToPrimitive for $T { + #[inline] + fn to_int(&self) -> Option { Some(*self as int) } + #[inline] + fn to_i8(&self) -> Option { Some(*self as i8) } + #[inline] + fn to_i16(&self) -> Option { Some(*self as i16) } + #[inline] + fn to_i32(&self) -> Option { Some(*self as i32) } + #[inline] + fn to_i64(&self) -> Option { Some(*self as i64) } + + #[inline] + fn to_uint(&self) -> Option { Some(*self as uint) } + #[inline] + fn to_u8(&self) -> Option { Some(*self as u8) } + #[inline] + fn to_u16(&self) -> Option { Some(*self as u16) } + #[inline] + fn to_u32(&self) -> Option { Some(*self as u32) } + #[inline] + fn to_u64(&self) -> Option { Some(*self as u64) } + + #[inline] + fn to_f32(&self) -> Option { impl_to_primitive_float_to_float!($T, f32) } + #[inline] + fn to_f64(&self) -> Option { impl_to_primitive_float_to_float!($T, f64) } + } + ) +) + +impl_to_primitive_float!(f32) +impl_to_primitive_float!(f64) + +/// A generic trait for converting a number to a value. +pub trait FromPrimitive { + /// Convert an `int` to return an optional value of this type. If the + /// value cannot be represented by this value, the `None` is returned. + #[inline] + fn from_int(n: int) -> Option { + FromPrimitive::from_i64(n as i64) + } + + /// Convert an `i8` to return an optional value of this type. If the + /// type cannot be represented by this value, the `None` is returned. + #[inline] + fn from_i8(n: i8) -> Option { + FromPrimitive::from_i64(n as i64) + } + + /// Convert an `i16` to return an optional value of this type. If the + /// type cannot be represented by this value, the `None` is returned. + #[inline] + fn from_i16(n: i16) -> Option { + FromPrimitive::from_i64(n as i64) + } + + /// Convert an `i32` to return an optional value of this type. If the + /// type cannot be represented by this value, the `None` is returned. + #[inline] + fn from_i32(n: i32) -> Option { + FromPrimitive::from_i64(n as i64) + } + + /// Convert an `i64` to return an optional value of this type. If the + /// type cannot be represented by this value, the `None` is returned. + fn from_i64(n: i64) -> Option; + + /// Convert an `uint` to return an optional value of this type. If the + /// type cannot be represented by this value, the `None` is returned. + #[inline] + fn from_uint(n: uint) -> Option { + FromPrimitive::from_u64(n as u64) + } + + /// Convert an `u8` to return an optional value of this type. If the + /// type cannot be represented by this value, the `None` is returned. + #[inline] + fn from_u8(n: u8) -> Option { + FromPrimitive::from_u64(n as u64) + } + + /// Convert an `u16` to return an optional value of this type. If the + /// type cannot be represented by this value, the `None` is returned. + #[inline] + fn from_u16(n: u16) -> Option { + FromPrimitive::from_u64(n as u64) + } + + /// Convert an `u32` to return an optional value of this type. If the + /// type cannot be represented by this value, the `None` is returned. + #[inline] + fn from_u32(n: u32) -> Option { + FromPrimitive::from_u64(n as u64) + } + + /// Convert an `u64` to return an optional value of this type. If the + /// type cannot be represented by this value, the `None` is returned. + fn from_u64(n: u64) -> Option; + + /// Convert a `f32` to return an optional value of this type. If the + /// type cannot be represented by this value, the `None` is returned. + #[inline] + fn from_f32(n: f32) -> Option { + FromPrimitive::from_f64(n as f64) + } + + /// Convert a `f64` to return an optional value of this type. If the + /// type cannot be represented by this value, the `None` is returned. + #[inline] + fn from_f64(n: f64) -> Option { + FromPrimitive::from_i64(n as i64) + } +} + +/// A utility function that just calls `FromPrimitive::from_int`. +pub fn from_int(n: int) -> Option { + FromPrimitive::from_int(n) +} + +/// A utility function that just calls `FromPrimitive::from_i8`. +pub fn from_i8(n: i8) -> Option { + FromPrimitive::from_i8(n) +} + +/// A utility function that just calls `FromPrimitive::from_i16`. +pub fn from_i16(n: i16) -> Option { + FromPrimitive::from_i16(n) +} + +/// A utility function that just calls `FromPrimitive::from_i32`. +pub fn from_i32(n: i32) -> Option { + FromPrimitive::from_i32(n) +} + +/// A utility function that just calls `FromPrimitive::from_i64`. +pub fn from_i64(n: i64) -> Option { + FromPrimitive::from_i64(n) +} + +/// A utility function that just calls `FromPrimitive::from_uint`. +pub fn from_uint(n: uint) -> Option { + FromPrimitive::from_uint(n) +} + +/// A utility function that just calls `FromPrimitive::from_u8`. +pub fn from_u8(n: u8) -> Option { + FromPrimitive::from_u8(n) +} + +/// A utility function that just calls `FromPrimitive::from_u16`. +pub fn from_u16(n: u16) -> Option { + FromPrimitive::from_u16(n) +} + +/// A utility function that just calls `FromPrimitive::from_u32`. +pub fn from_u32(n: u32) -> Option { + FromPrimitive::from_u32(n) +} + +/// A utility function that just calls `FromPrimitive::from_u64`. +pub fn from_u64(n: u64) -> Option { + FromPrimitive::from_u64(n) +} + +/// A utility function that just calls `FromPrimitive::from_f32`. +pub fn from_f32(n: f32) -> Option { + FromPrimitive::from_f32(n) +} + +/// A utility function that just calls `FromPrimitive::from_f64`. +pub fn from_f64(n: f64) -> Option { + FromPrimitive::from_f64(n) +} + +macro_rules! impl_from_primitive( + ($T:ty, $to_ty:expr) => ( + impl FromPrimitive for $T { + #[inline] fn from_int(n: int) -> Option<$T> { $to_ty } + #[inline] fn from_i8(n: i8) -> Option<$T> { $to_ty } + #[inline] fn from_i16(n: i16) -> Option<$T> { $to_ty } + #[inline] fn from_i32(n: i32) -> Option<$T> { $to_ty } + #[inline] fn from_i64(n: i64) -> Option<$T> { $to_ty } + + #[inline] fn from_uint(n: uint) -> Option<$T> { $to_ty } + #[inline] fn from_u8(n: u8) -> Option<$T> { $to_ty } + #[inline] fn from_u16(n: u16) -> Option<$T> { $to_ty } + #[inline] fn from_u32(n: u32) -> Option<$T> { $to_ty } + #[inline] fn from_u64(n: u64) -> Option<$T> { $to_ty } + + #[inline] fn from_f32(n: f32) -> Option<$T> { $to_ty } + #[inline] fn from_f64(n: f64) -> Option<$T> { $to_ty } + } + ) +) + +impl_from_primitive!(int, n.to_int()) +impl_from_primitive!(i8, n.to_i8()) +impl_from_primitive!(i16, n.to_i16()) +impl_from_primitive!(i32, n.to_i32()) +impl_from_primitive!(i64, n.to_i64()) +impl_from_primitive!(uint, n.to_uint()) +impl_from_primitive!(u8, n.to_u8()) +impl_from_primitive!(u16, n.to_u16()) +impl_from_primitive!(u32, n.to_u32()) +impl_from_primitive!(u64, n.to_u64()) +impl_from_primitive!(f32, n.to_f32()) +impl_from_primitive!(f64, n.to_f64()) + +/// Cast from one machine scalar to another. +/// +/// # Example +/// +/// ``` +/// use std::num; +/// +/// let twenty: f32 = num::cast(0x14).unwrap(); +/// assert_eq!(twenty, 20f32); +/// ``` +/// +#[inline] +pub fn cast(n: T) -> Option { + NumCast::from(n) +} + +/// An interface for casting between machine scalars. +pub trait NumCast: ToPrimitive { + /// Creates a number from another value that can be converted into a primitive via the + /// `ToPrimitive` trait. + fn from(n: T) -> Option; +} + +macro_rules! impl_num_cast( + ($T:ty, $conv:ident) => ( + impl NumCast for $T { + #[inline] + fn from(n: N) -> Option<$T> { + // `$conv` could be generated using `concat_idents!`, but that + // macro seems to be broken at the moment + n.$conv() + } + } + ) +) + +impl_num_cast!(u8, to_u8) +impl_num_cast!(u16, to_u16) +impl_num_cast!(u32, to_u32) +impl_num_cast!(u64, to_u64) +impl_num_cast!(uint, to_uint) +impl_num_cast!(i8, to_i8) +impl_num_cast!(i16, to_i16) +impl_num_cast!(i32, to_i32) +impl_num_cast!(i64, to_i64) +impl_num_cast!(int, to_int) +impl_num_cast!(f32, to_f32) +impl_num_cast!(f64, to_f64) + +/// Saturating math operations +pub trait Saturating { + /// Saturating addition operator. + /// Returns a+b, saturating at the numeric bounds instead of overflowing. + fn saturating_add(self, v: Self) -> Self; + + /// Saturating subtraction operator. + /// Returns a-b, saturating at the numeric bounds instead of overflowing. + fn saturating_sub(self, v: Self) -> Self; +} + +impl Saturating for T { + #[inline] + fn saturating_add(self, v: T) -> T { + match self.checked_add(&v) { + Some(x) => x, + None => if v >= Zero::zero() { + Bounded::max_value() + } else { + Bounded::min_value() + } + } + } + + #[inline] + fn saturating_sub(self, v: T) -> T { + match self.checked_sub(&v) { + Some(x) => x, + None => if v >= Zero::zero() { + Bounded::min_value() + } else { + Bounded::max_value() + } + } + } +} + +/// Performs addition that returns `None` instead of wrapping around on overflow. +pub trait CheckedAdd: Add { + /// Adds two numbers, checking for overflow. If overflow happens, `None` is returned. + fn checked_add(&self, v: &Self) -> Option; +} + +/// Performs subtraction that returns `None` instead of wrapping around on underflow. +pub trait CheckedSub: Sub { + /// Subtracts two numbers, checking for underflow. If underflow happens, `None` is returned. + fn checked_sub(&self, v: &Self) -> Option; +} + +/// Performs multiplication that returns `None` instead of wrapping around on underflow or +/// overflow. +pub trait CheckedMul: Mul { + /// Multiplies two numbers, checking for underflow or overflow. If underflow or overflow + /// happens, `None` is returned. + fn checked_mul(&self, v: &Self) -> Option; +} + +/// Performs division that returns `None` instead of wrapping around on underflow or overflow. +pub trait CheckedDiv: Div { + /// Divides two numbers, checking for underflow or overflow. If underflow or overflow happens, + /// `None` is returned. + fn checked_div(&self, v: &Self) -> Option; +} + +/// Helper function for testing numeric operations +#[cfg(test)] +pub fn test_num(ten: T, two: T) { + assert_eq!(ten.add(&two), cast(12).unwrap()); + assert_eq!(ten.sub(&two), cast(8).unwrap()); + assert_eq!(ten.mul(&two), cast(20).unwrap()); + assert_eq!(ten.div(&two), cast(5).unwrap()); + assert_eq!(ten.rem(&two), cast(0).unwrap()); + + assert_eq!(ten.add(&two), ten + two); + assert_eq!(ten.sub(&two), ten - two); + assert_eq!(ten.mul(&two), ten * two); + assert_eq!(ten.div(&two), ten / two); + assert_eq!(ten.rem(&two), ten % two); +} diff --git a/src/libcore/num/u16.rs b/src/libcore/num/u16.rs new file mode 100644 index 00000000000..96db898e3b0 --- /dev/null +++ b/src/libcore/num/u16.rs @@ -0,0 +1,56 @@ +// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! Operations and constants for unsigned 16-bits integers (`u16` type) + +use default::Default; +use intrinsics; +use num::{Bitwise, Bounded, Zero, One, Unsigned, Num, Int, Primitive}; +use num::{CheckedAdd, CheckedSub, CheckedMul, CheckedDiv}; +use option::{Some, None, Option}; + +#[cfg(not(test))] +use cmp::{Eq, Ord, TotalEq, TotalOrd, Less, Greater, Equal, Ordering}; +#[cfg(not(test))] +use ops::{Add, Sub, Mul, Div, Rem, Neg, BitAnd, BitOr, BitXor}; +#[cfg(not(test))] +use ops::{Shl, Shr, Not}; + +uint_module!(u16, i16, 16) + +impl CheckedAdd for u16 { + #[inline] + fn checked_add(&self, v: &u16) -> Option { + unsafe { + let (x, y) = intrinsics::u16_add_with_overflow(*self, *v); + if y { None } else { Some(x) } + } + } +} + +impl CheckedSub for u16 { + #[inline] + fn checked_sub(&self, v: &u16) -> Option { + unsafe { + let (x, y) = intrinsics::u16_sub_with_overflow(*self, *v); + if y { None } else { Some(x) } + } + } +} + +impl CheckedMul for u16 { + #[inline] + fn checked_mul(&self, v: &u16) -> Option { + unsafe { + let (x, y) = intrinsics::u16_mul_with_overflow(*self, *v); + if y { None } else { Some(x) } + } + } +} diff --git a/src/libcore/num/u32.rs b/src/libcore/num/u32.rs new file mode 100644 index 00000000000..2748b001bb8 --- /dev/null +++ b/src/libcore/num/u32.rs @@ -0,0 +1,56 @@ +// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! Operations and constants for unsigned 32-bits integers (`u32` type) + +use default::Default; +use intrinsics; +use num::{Bitwise, Bounded, Zero, One, Unsigned, Num, Int, Primitive}; +use num::{CheckedAdd, CheckedSub, CheckedMul, CheckedDiv}; +use option::{Some, None, Option}; + +#[cfg(not(test))] +use cmp::{Eq, Ord, TotalEq, TotalOrd, Less, Greater, Equal, Ordering}; +#[cfg(not(test))] +use ops::{Add, Sub, Mul, Div, Rem, Neg, BitAnd, BitOr, BitXor}; +#[cfg(not(test))] +use ops::{Shl, Shr, Not}; + +uint_module!(u32, i32, 32) + +impl CheckedAdd for u32 { + #[inline] + fn checked_add(&self, v: &u32) -> Option { + unsafe { + let (x, y) = intrinsics::u32_add_with_overflow(*self, *v); + if y { None } else { Some(x) } + } + } +} + +impl CheckedSub for u32 { + #[inline] + fn checked_sub(&self, v: &u32) -> Option { + unsafe { + let (x, y) = intrinsics::u32_sub_with_overflow(*self, *v); + if y { None } else { Some(x) } + } + } +} + +impl CheckedMul for u32 { + #[inline] + fn checked_mul(&self, v: &u32) -> Option { + unsafe { + let (x, y) = intrinsics::u32_mul_with_overflow(*self, *v); + if y { None } else { Some(x) } + } + } +} diff --git a/src/libcore/num/u64.rs b/src/libcore/num/u64.rs new file mode 100644 index 00000000000..c047df09532 --- /dev/null +++ b/src/libcore/num/u64.rs @@ -0,0 +1,56 @@ +// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! Operations and constants for unsigned 64-bits integer (`u64` type) + +use default::Default; +use intrinsics; +use num::{Bitwise, Bounded, Zero, One, Unsigned, Num, Int, Primitive}; +use num::{CheckedAdd, CheckedSub, CheckedMul, CheckedDiv}; +use option::{Some, None, Option}; + +#[cfg(not(test))] +use cmp::{Eq, Ord, TotalEq, TotalOrd, Less, Greater, Equal, Ordering}; +#[cfg(not(test))] +use ops::{Add, Sub, Mul, Div, Rem, Neg, BitAnd, BitOr, BitXor}; +#[cfg(not(test))] +use ops::{Shl, Shr, Not}; + +uint_module!(u64, i64, 64) + +impl CheckedAdd for u64 { + #[inline] + fn checked_add(&self, v: &u64) -> Option { + unsafe { + let (x, y) = intrinsics::u64_add_with_overflow(*self, *v); + if y { None } else { Some(x) } + } + } +} + +impl CheckedSub for u64 { + #[inline] + fn checked_sub(&self, v: &u64) -> Option { + unsafe { + let (x, y) = intrinsics::u64_sub_with_overflow(*self, *v); + if y { None } else { Some(x) } + } + } +} + +impl CheckedMul for u64 { + #[inline] + fn checked_mul(&self, v: &u64) -> Option { + unsafe { + let (x, y) = intrinsics::u64_mul_with_overflow(*self, *v); + if y { None } else { Some(x) } + } + } +} diff --git a/src/libcore/num/u8.rs b/src/libcore/num/u8.rs new file mode 100644 index 00000000000..a6df17956a1 --- /dev/null +++ b/src/libcore/num/u8.rs @@ -0,0 +1,56 @@ +// Copyright 2012 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! Operations and constants for unsigned 8-bits integers (`u8` type) + +use default::Default; +use intrinsics; +use num::{Bitwise, Bounded, Zero, One, Unsigned, Num, Int, Primitive}; +use num::{CheckedAdd, CheckedSub, CheckedMul, CheckedDiv}; +use option::{Some, None, Option}; + +#[cfg(not(test))] +use cmp::{Eq, Ord, TotalEq, TotalOrd, Less, Greater, Equal, Ordering}; +#[cfg(not(test))] +use ops::{Add, Sub, Mul, Div, Rem, Neg, BitAnd, BitOr, BitXor}; +#[cfg(not(test))] +use ops::{Shl, Shr, Not}; + +uint_module!(u8, i8, 8) + +impl CheckedAdd for u8 { + #[inline] + fn checked_add(&self, v: &u8) -> Option { + unsafe { + let (x, y) = intrinsics::u8_add_with_overflow(*self, *v); + if y { None } else { Some(x) } + } + } +} + +impl CheckedSub for u8 { + #[inline] + fn checked_sub(&self, v: &u8) -> Option { + unsafe { + let (x, y) = intrinsics::u8_sub_with_overflow(*self, *v); + if y { None } else { Some(x) } + } + } +} + +impl CheckedMul for u8 { + #[inline] + fn checked_mul(&self, v: &u8) -> Option { + unsafe { + let (x, y) = intrinsics::u8_mul_with_overflow(*self, *v); + if y { None } else { Some(x) } + } + } +} diff --git a/src/libcore/num/uint.rs b/src/libcore/num/uint.rs new file mode 100644 index 00000000000..f988650cc01 --- /dev/null +++ b/src/libcore/num/uint.rs @@ -0,0 +1,92 @@ +// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! Operations and constants for architecture-sized unsigned integers (`uint` type) + +use default::Default; +use intrinsics; +use num::{Bitwise, Bounded, Zero, One, Unsigned, Num, Int, Primitive}; +use num::{CheckedAdd, CheckedSub, CheckedMul, CheckedDiv}; +use option::{Some, None, Option}; + +#[cfg(not(test))] +use cmp::{Eq, Ord, TotalEq, TotalOrd, Less, Greater, Equal, Ordering}; +#[cfg(not(test))] +use ops::{Add, Sub, Mul, Div, Rem, Neg, BitAnd, BitOr, BitXor}; +#[cfg(not(test))] +use ops::{Shl, Shr, Not}; + +uint_module!(uint, int, ::int::BITS) + +#[cfg(target_word_size = "32")] +impl CheckedAdd for uint { + #[inline] + fn checked_add(&self, v: &uint) -> Option { + unsafe { + let (x, y) = intrinsics::u32_add_with_overflow(*self as u32, *v as u32); + if y { None } else { Some(x as uint) } + } + } +} + +#[cfg(target_word_size = "64")] +impl CheckedAdd for uint { + #[inline] + fn checked_add(&self, v: &uint) -> Option { + unsafe { + let (x, y) = intrinsics::u64_add_with_overflow(*self as u64, *v as u64); + if y { None } else { Some(x as uint) } + } + } +} + +#[cfg(target_word_size = "32")] +impl CheckedSub for uint { + #[inline] + fn checked_sub(&self, v: &uint) -> Option { + unsafe { + let (x, y) = intrinsics::u32_sub_with_overflow(*self as u32, *v as u32); + if y { None } else { Some(x as uint) } + } + } +} + +#[cfg(target_word_size = "64")] +impl CheckedSub for uint { + #[inline] + fn checked_sub(&self, v: &uint) -> Option { + unsafe { + let (x, y) = intrinsics::u64_sub_with_overflow(*self as u64, *v as u64); + if y { None } else { Some(x as uint) } + } + } +} + +#[cfg(target_word_size = "32")] +impl CheckedMul for uint { + #[inline] + fn checked_mul(&self, v: &uint) -> Option { + unsafe { + let (x, y) = intrinsics::u32_mul_with_overflow(*self as u32, *v as u32); + if y { None } else { Some(x as uint) } + } + } +} + +#[cfg(target_word_size = "64")] +impl CheckedMul for uint { + #[inline] + fn checked_mul(&self, v: &uint) -> Option { + unsafe { + let (x, y) = intrinsics::u64_mul_with_overflow(*self as u64, *v as u64); + if y { None } else { Some(x as uint) } + } + } +} diff --git a/src/libcore/num/uint_macros.rs b/src/libcore/num/uint_macros.rs new file mode 100644 index 00000000000..092f7d81d22 --- /dev/null +++ b/src/libcore/num/uint_macros.rs @@ -0,0 +1,235 @@ +// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![macro_escape] +#![doc(hidden)] + +macro_rules! uint_module (($T:ty, $T_SIGNED:ty, $bits:expr) => ( + +pub static BITS : uint = $bits; +pub static BYTES : uint = ($bits / 8); + +pub static MIN: $T = 0 as $T; +pub static MAX: $T = 0 as $T - 1 as $T; + +#[cfg(not(test))] +impl Ord for $T { + #[inline] + fn lt(&self, other: &$T) -> bool { *self < *other } +} +#[cfg(not(test))] +impl TotalEq for $T {} +#[cfg(not(test))] +impl Eq for $T { + #[inline] + fn eq(&self, other: &$T) -> bool { *self == *other } +} +#[cfg(not(test))] +impl TotalOrd for $T { + #[inline] + fn cmp(&self, other: &$T) -> Ordering { + if *self < *other { Less } + else if *self > *other { Greater } + else { Equal } + } +} + +impl Num for $T {} + +impl Zero for $T { + #[inline] + fn zero() -> $T { 0 } + + #[inline] + fn is_zero(&self) -> bool { *self == 0 } +} + +impl One for $T { + #[inline] + fn one() -> $T { 1 } +} + +#[cfg(not(test))] +impl Add<$T,$T> for $T { + #[inline] + fn add(&self, other: &$T) -> $T { *self + *other } +} + +#[cfg(not(test))] +impl Sub<$T,$T> for $T { + #[inline] + fn sub(&self, other: &$T) -> $T { *self - *other } +} + +#[cfg(not(test))] +impl Mul<$T,$T> for $T { + #[inline] + fn mul(&self, other: &$T) -> $T { *self * *other } +} + +#[cfg(not(test))] +impl Div<$T,$T> for $T { + #[inline] + fn div(&self, other: &$T) -> $T { *self / *other } +} + +#[cfg(not(test))] +impl Rem<$T,$T> for $T { + #[inline] + fn rem(&self, other: &$T) -> $T { *self % *other } +} + +#[cfg(not(test))] +impl Neg<$T> for $T { + #[inline] + fn neg(&self) -> $T { -(*self as $T_SIGNED) as $T } +} + +impl Unsigned for $T {} + +#[cfg(not(test))] +impl BitOr<$T,$T> for $T { + #[inline] + fn bitor(&self, other: &$T) -> $T { *self | *other } +} + +#[cfg(not(test))] +impl BitAnd<$T,$T> for $T { + #[inline] + fn bitand(&self, other: &$T) -> $T { *self & *other } +} + +#[cfg(not(test))] +impl BitXor<$T,$T> for $T { + #[inline] + fn bitxor(&self, other: &$T) -> $T { *self ^ *other } +} + +#[cfg(not(test))] +impl Shl<$T,$T> for $T { + #[inline] + fn shl(&self, other: &$T) -> $T { *self << *other } +} + +#[cfg(not(test))] +impl Shr<$T,$T> for $T { + #[inline] + fn shr(&self, other: &$T) -> $T { *self >> *other } +} + +#[cfg(not(test))] +impl Not<$T> for $T { + #[inline] + fn not(&self) -> $T { !*self } +} + +impl Bounded for $T { + #[inline] + fn min_value() -> $T { MIN } + + #[inline] + fn max_value() -> $T { MAX } +} + +impl Bitwise for $T { + /// Returns the number of ones in the binary representation of the number. + #[inline] + fn count_ones(&self) -> $T { + (*self as $T_SIGNED).count_ones() as $T + } + + /// Returns the number of leading zeros in the in the binary representation + /// of the number. + #[inline] + fn leading_zeros(&self) -> $T { + (*self as $T_SIGNED).leading_zeros() as $T + } + + /// Returns the number of trailing zeros in the in the binary representation + /// of the number. + #[inline] + fn trailing_zeros(&self) -> $T { + (*self as $T_SIGNED).trailing_zeros() as $T + } +} + +impl CheckedDiv for $T { + #[inline] + fn checked_div(&self, v: &$T) -> Option<$T> { + if *v == 0 { + None + } else { + Some(self / *v) + } + } +} + +impl Int for $T {} + +impl Primitive for $T {} + +impl Default for $T { + #[inline] + fn default() -> $T { 0 } +} + +#[cfg(test)] +mod tests { + use prelude::*; + use super::*; + + use num; + use num::CheckedDiv; + use num::Bitwise; + + #[test] + fn test_overflows() { + assert!(MAX > 0); + assert!(MIN <= 0); + assert!(MIN + MAX + 1 == 0); + } + + #[test] + fn test_num() { + num::test_num(10 as $T, 2 as $T); + } + + #[test] + fn test_bitwise() { + assert!(0b1110 as $T == (0b1100 as $T).bitor(&(0b1010 as $T))); + assert!(0b1000 as $T == (0b1100 as $T).bitand(&(0b1010 as $T))); + assert!(0b0110 as $T == (0b1100 as $T).bitxor(&(0b1010 as $T))); + assert!(0b1110 as $T == (0b0111 as $T).shl(&(1 as $T))); + assert!(0b0111 as $T == (0b1110 as $T).shr(&(1 as $T))); + assert!(MAX - (0b1011 as $T) == (0b1011 as $T).not()); + } + + #[test] + fn test_count_ones() { + assert!((0b0101100 as $T).count_ones() == 3); + assert!((0b0100001 as $T).count_ones() == 2); + assert!((0b1111001 as $T).count_ones() == 5); + } + + #[test] + fn test_count_zeros() { + assert!((0b0101100 as $T).count_zeros() == BITS as $T - 3); + assert!((0b0100001 as $T).count_zeros() == BITS as $T - 2); + assert!((0b1111001 as $T).count_zeros() == BITS as $T - 5); + } + + #[test] + fn test_unsigned_checked_div() { + assert!(10u.checked_div(&2) == Some(5)); + assert!(5u.checked_div(&0) == None); + } +} + +)) diff --git a/src/libstd/ops.rs b/src/libcore/ops.rs similarity index 100% rename from src/libstd/ops.rs rename to src/libcore/ops.rs diff --git a/src/libcore/option.rs b/src/libcore/option.rs new file mode 100644 index 00000000000..c6884a8002f --- /dev/null +++ b/src/libcore/option.rs @@ -0,0 +1,866 @@ +// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! Optional values +//! +//! Type `Option` represents an optional value: every `Option` +//! is either `Some` and contains a value, or `None`, and +//! does not. `Option` types are very common in Rust code, as +//! they have a number of uses: +//! +//! * Initial values +//! * Return values for functions that are not defined +//! over their entire input range (partial functions) +//! * Return value for otherwise reporting simple errors, where `None` is +//! returned on error +//! * Optional struct fields +//! * Struct fields that can be loaned or "taken" +//! * Optional function arguments +//! * Nullable pointers +//! * Swapping things out of difficult situations +//! +//! Options are commonly paired with pattern matching to query the presence +//! of a value and take action, always accounting for the `None` case. +//! +//! ``` +//! # // FIXME This is not the greatest first example +//! // cow_says contains the word "moo" +//! let cow_says = Some("moo"); +//! // dog_says does not contain a value +//! let dog_says: Option<&str> = None; +//! +//! // Pattern match to retrieve the value +//! match (cow_says, dog_says) { +//! (Some(cow_words), Some(dog_words)) => { +//! println!("Cow says {} and dog says {}!", cow_words, dog_words); +//! } +//! (Some(cow_words), None) => println!("Cow says {}", cow_words), +//! (None, Some(dog_words)) => println!("Dog says {}", dog_words), +//! (None, None) => println!("Cow and dog are suspiciously silent") +//! } +//! ``` +//! +// +// FIXME: Show how `Option` is used in practice, with lots of methods +// +//! # Options and pointers ("nullable" pointers) +//! +//! Rust's pointer types must always point to a valid location; there are +//! no "null" pointers. Instead, Rust has *optional* pointers, like +//! the optional owned box, `Option>`. +//! +//! The following example uses `Option` to create an optional box of +//! `int`. Notice that in order to use the inner `int` value first the +//! `check_optional` function needs to use pattern matching to +//! determine whether the box has a value (i.e. it is `Some(...)`) or +//! not (`None`). +//! +//! ``` +//! let optional: Option> = None; +//! check_optional(&optional); +//! +//! let optional: Option> = Some(box 9000); +//! check_optional(&optional); +//! +//! fn check_optional(optional: &Option>) { +//! match *optional { +//! Some(ref p) => println!("have value {}", p), +//! None => println!("have no value") +//! } +//! } +//! ``` +//! +//! This usage of `Option` to create safe nullable pointers is so +//! common that Rust does special optimizations to make the +//! representation of `Option>` a single pointer. Optional pointers +//! in Rust are stored as efficiently as any other pointer type. +//! +//! # Examples +//! +//! Basic pattern matching on `Option`: +//! +//! ``` +//! let msg = Some("howdy"); +//! +//! // Take a reference to the contained string +//! match msg { +//! Some(ref m) => println!("{}", *m), +//! None => () +//! } +//! +//! // Remove the contained string, destroying the Option +//! let unwrapped_msg = match msg { +//! Some(m) => m, +//! None => "default message" +//! }; +//! ``` +//! +//! Initialize a result to `None` before a loop: +//! +//! ``` +//! enum Kingdom { Plant(uint, &'static str), Animal(uint, &'static str) } +//! +//! // A list of data to search through. +//! let all_the_big_things = [ +//! Plant(250, "redwood"), +//! Plant(230, "noble fir"), +//! Plant(229, "sugar pine"), +//! Animal(25, "blue whale"), +//! Animal(19, "fin whale"), +//! Animal(15, "north pacific right whale"), +//! ]; +//! +//! // We're going to search for the name of the biggest animal, +//! // but to start with we've just got `None`. +//! let mut name_of_biggest_animal = None; +//! let mut size_of_biggest_animal = 0; +//! for big_thing in all_the_big_things.iter() { +//! match *big_thing { +//! Animal(size, name) if size > size_of_biggest_animal => { +//! // Now we've found the name of some big animal +//! size_of_biggest_animal = size; +//! name_of_biggest_animal = Some(name); +//! } +//! Animal(..) | Plant(..) => () +//! } +//! } +//! +//! match name_of_biggest_animal { +//! Some(name) => println!("the biggest animal is {}", name), +//! None => println!("there are no animals :(") +//! } +//! ``` + +use cmp::{Eq, TotalEq, TotalOrd}; +use default::Default; +use iter::{Iterator, DoubleEndedIterator, FromIterator, ExactSize}; +use mem; +use slice; + +/// The `Option` +#[deriving(Clone, Eq, Ord, TotalEq, TotalOrd)] +pub enum Option { + /// No value + None, + /// Some value `T` + Some(T) +} + +///////////////////////////////////////////////////////////////////////////// +// Type implementation +///////////////////////////////////////////////////////////////////////////// + +impl Option { + ///////////////////////////////////////////////////////////////////////// + // Querying the contained values + ///////////////////////////////////////////////////////////////////////// + + /// Returns `true` if the option is a `Some` value + #[inline] + pub fn is_some(&self) -> bool { + match *self { + Some(_) => true, + None => false + } + } + + /// Returns `true` if the option is a `None` value + #[inline] + pub fn is_none(&self) -> bool { + !self.is_some() + } + + ///////////////////////////////////////////////////////////////////////// + // Adapter for working with references + ///////////////////////////////////////////////////////////////////////// + + /// Convert from `Option` to `Option<&T>` + /// + /// # Example + /// + /// Convert an `Option<~str>` into an `Option`, preserving the original. + /// The `map` method takes the `self` argument by value, consuming the original, + /// so this technique uses `as_ref` to first take an `Option` to a reference + /// to the value inside the original. + /// + /// ``` + /// let num_as_str: Option<~str> = Some("10".to_owned()); + /// // First, cast `Option<~str>` to `Option<&~str>` with `as_ref`, + /// // then consume *that* with `map`, leaving `num_as_str` on the stack. + /// let num_as_int: Option = num_as_str.as_ref().map(|n| n.len()); + /// println!("still can print num_as_str: {}", num_as_str); + /// ``` + #[inline] + pub fn as_ref<'r>(&'r self) -> Option<&'r T> { + match *self { Some(ref x) => Some(x), None => None } + } + + /// Convert from `Option` to `Option<&mut T>` + #[inline] + pub fn as_mut<'r>(&'r mut self) -> Option<&'r mut T> { + match *self { Some(ref mut x) => Some(x), None => None } + } + + /// Convert from `Option` to `&[T]` (without copying) + #[inline] + pub fn as_slice<'r>(&'r self) -> &'r [T] { + match *self { + Some(ref x) => slice::ref_slice(x), + None => &[] + } + } + + /// Convert from `Option` to `&mut [T]` (without copying) + #[inline] + pub fn as_mut_slice<'r>(&'r mut self) -> &'r mut [T] { + match *self { + Some(ref mut x) => slice::mut_ref_slice(x), + None => &mut [] + } + } + + ///////////////////////////////////////////////////////////////////////// + // Getting to contained values + ///////////////////////////////////////////////////////////////////////// + + /// Moves a value out of an option type and returns it, consuming the `Option`. + /// + /// # Failure + /// + /// Fails if the self value equals `None`. + /// + /// # Safety note + /// + /// In general, because this function may fail, its use is discouraged. + /// Instead, prefer to use pattern matching and handle the `None` + /// case explicitly. + #[inline] + pub fn unwrap(self) -> T { + match self { + Some(val) => val, + None => fail!("called `Option::unwrap()` on a `None` value"), + } + } + + /// Returns the contained value or a default. + #[inline] + pub fn unwrap_or(self, def: T) -> T { + match self { + Some(x) => x, + None => def + } + } + + /// Returns the contained value or computes it from a closure. + #[inline] + pub fn unwrap_or_else(self, f: || -> T) -> T { + match self { + Some(x) => x, + None => f() + } + } + + ///////////////////////////////////////////////////////////////////////// + // Transforming contained values + ///////////////////////////////////////////////////////////////////////// + + /// Maps an `Option` to `Option` by applying a function to a contained value + /// + /// # Example + /// + /// Convert an `Option<~str>` into an `Option`, consuming the original: + /// + /// ``` + /// let num_as_str: Option<~str> = Some("10".to_owned()); + /// // `Option::map` takes self *by value*, consuming `num_as_str` + /// let num_as_int: Option = num_as_str.map(|n| n.len()); + /// ``` + #[inline] + pub fn map(self, f: |T| -> U) -> Option { + match self { Some(x) => Some(f(x)), None => None } + } + + /// Applies a function to the contained value or returns a default. + #[inline] + pub fn map_or(self, def: U, f: |T| -> U) -> U { + match self { None => def, Some(t) => f(t) } + } + + /// Applies a function to the contained value or does nothing. + /// Returns true if the contained value was mutated. + pub fn mutate(&mut self, f: |T| -> T) -> bool { + if self.is_some() { + *self = Some(f(self.take_unwrap())); + true + } else { false } + } + + /// Applies a function to the contained value or sets it to a default. + /// Returns true if the contained value was mutated, or false if set to the default. + pub fn mutate_or_set(&mut self, def: T, f: |T| -> T) -> bool { + if self.is_some() { + *self = Some(f(self.take_unwrap())); + true + } else { + *self = Some(def); + false + } + } + + ///////////////////////////////////////////////////////////////////////// + // Iterator constructors + ///////////////////////////////////////////////////////////////////////// + + /// Returns an iterator over the possibly contained value. + #[inline] + pub fn iter<'r>(&'r self) -> Item<&'r T> { + Item{opt: self.as_ref()} + } + + /// Returns a mutable iterator over the possibly contained value. + #[inline] + pub fn mut_iter<'r>(&'r mut self) -> Item<&'r mut T> { + Item{opt: self.as_mut()} + } + + /// Returns a consuming iterator over the possibly contained value. + #[inline] + pub fn move_iter(self) -> Item { + Item{opt: self} + } + + ///////////////////////////////////////////////////////////////////////// + // Boolean operations on the values, eager and lazy + ///////////////////////////////////////////////////////////////////////// + + /// Returns `None` if the option is `None`, otherwise returns `optb`. + #[inline] + pub fn and(self, optb: Option) -> Option { + match self { + Some(_) => optb, + None => None, + } + } + + /// Returns `None` if the option is `None`, otherwise calls `f` with the + /// wrapped value and returns the result. + #[inline] + pub fn and_then(self, f: |T| -> Option) -> Option { + match self { + Some(x) => f(x), + None => None, + } + } + + /// Returns the option if it contains a value, otherwise returns `optb`. + #[inline] + pub fn or(self, optb: Option) -> Option { + match self { + Some(_) => self, + None => optb + } + } + + /// Returns the option if it contains a value, otherwise calls `f` and + /// returns the result. + #[inline] + pub fn or_else(self, f: || -> Option) -> Option { + match self { + Some(_) => self, + None => f() + } + } + + ///////////////////////////////////////////////////////////////////////// + // Misc + ///////////////////////////////////////////////////////////////////////// + + /// Takes the value out of the option, leaving a `None` in its place. + #[inline] + pub fn take(&mut self) -> Option { + mem::replace(self, None) + } + + /// Filters an optional value using a given function. + #[inline(always)] + pub fn filtered(self, f: |t: &T| -> bool) -> Option { + match self { + Some(x) => if f(&x) { Some(x) } else { None }, + None => None + } + } + + /// Applies a function zero or more times until the result is `None`. + #[inline] + pub fn while_some(self, f: |v: T| -> Option) { + let mut opt = self; + loop { + match opt { + Some(x) => opt = f(x), + None => break + } + } + } + + ///////////////////////////////////////////////////////////////////////// + // Common special cases + ///////////////////////////////////////////////////////////////////////// + + /// The option dance. Moves a value out of an option type and returns it, + /// replacing the original with `None`. + /// + /// # Failure + /// + /// Fails if the value equals `None`. + #[inline] + pub fn take_unwrap(&mut self) -> T { + match self.take() { + Some(x) => x, + None => fail!("called `Option::take_unwrap()` on a `None` value") + } + } + + /// Gets an immutable reference to the value inside an option. + /// + /// # Failure + /// + /// Fails if the value equals `None` + /// + /// # Safety note + /// + /// In general, because this function may fail, its use is discouraged + /// (calling `get` on `None` is akin to dereferencing a null pointer). + /// Instead, prefer to use pattern matching and handle the `None` + /// case explicitly. + #[inline] + pub fn get_ref<'a>(&'a self) -> &'a T { + match *self { + Some(ref x) => x, + None => fail!("called `Option::get_ref()` on a `None` value"), + } + } + + /// Gets a mutable reference to the value inside an option. + /// + /// # Failure + /// + /// Fails if the value equals `None` + /// + /// # Safety note + /// + /// In general, because this function may fail, its use is discouraged + /// (calling `get` on `None` is akin to dereferencing a null pointer). + /// Instead, prefer to use pattern matching and handle the `None` + /// case explicitly. + #[inline] + pub fn get_mut_ref<'a>(&'a mut self) -> &'a mut T { + match *self { + Some(ref mut x) => x, + None => fail!("called `Option::get_mut_ref()` on a `None` value"), + } + } +} + +impl Option { + /// Returns the contained value or a default + /// + /// Consumes the `self` argument then, if `Some`, returns the contained + /// value, otherwise if `None`, returns the default value for that + /// type. + /// + /// # Example + /// + /// Convert a string to an integer, turning poorly-formed strings + /// into 0 (the default value for integers). `from_str` converts + /// a string to any other type that implements `FromStr`, returning + /// `None` on error. + /// + /// ``` + /// let good_year_from_input = "1909"; + /// let bad_year_from_input = "190blarg"; + /// let good_year = from_str(good_year_from_input).unwrap_or_default(); + /// let bad_year = from_str(bad_year_from_input).unwrap_or_default(); + /// + /// assert_eq!(1909, good_year); + /// assert_eq!(0, bad_year); + /// ``` + #[inline] + pub fn unwrap_or_default(self) -> T { + match self { + Some(x) => x, + None => Default::default() + } + } +} + +///////////////////////////////////////////////////////////////////////////// +// Trait implementations +///////////////////////////////////////////////////////////////////////////// + +impl Default for Option { + #[inline] + fn default() -> Option { None } +} + +///////////////////////////////////////////////////////////////////////////// +// The Option Iterator +///////////////////////////////////////////////////////////////////////////// + +/// An `Option` iterator that yields either one or zero elements +/// +/// The `Item` iterator is returned by the `iter`, `mut_iter` and `move_iter` +/// methods on `Option`. +#[deriving(Clone)] +pub struct Item { + opt: Option +} + +impl Iterator for Item { + #[inline] + fn next(&mut self) -> Option { + self.opt.take() + } + + #[inline] + fn size_hint(&self) -> (uint, Option) { + match self.opt { + Some(_) => (1, Some(1)), + None => (0, Some(0)), + } + } +} + +impl DoubleEndedIterator for Item { + #[inline] + fn next_back(&mut self) -> Option { + self.opt.take() + } +} + +impl ExactSize for Item {} + +///////////////////////////////////////////////////////////////////////////// +// Free functions +///////////////////////////////////////////////////////////////////////////// + +/// Takes each element in the `Iterator`: if it is `None`, no further +/// elements are taken, and the `None` is returned. Should no `None` occur, a +/// vector containing the values of each `Option` is returned. +/// +/// Here is an example which increments every integer in a vector, +/// checking for overflow: +/// +/// fn inc_conditionally(x: uint) -> Option { +/// if x == uint::MAX { return None; } +/// else { return Some(x+1u); } +/// } +/// let v = [1u, 2, 3]; +/// let res = collect(v.iter().map(|&x| inc_conditionally(x))); +/// assert!(res == Some(~[2u, 3, 4])); +#[inline] +pub fn collect>, V: FromIterator>(iter: Iter) -> Option { + // FIXME(#11084): This should be twice as fast once this bug is closed. + let mut iter = iter.scan(false, |state, x| { + match x { + Some(x) => Some(x), + None => { + *state = true; + None + } + } + }); + + let v: V = FromIterator::from_iter(iter.by_ref()); + + if iter.state { + None + } else { + Some(v) + } +} + +///////////////////////////////////////////////////////////////////////////// +// Tests +///////////////////////////////////////////////////////////////////////////// + +#[cfg(test)] +mod tests { + use realstd::option::collect; + use realstd::prelude::*; + use realstd::iter::range; + + use str::StrSlice; + use kinds::marker; + use slice::ImmutableVector; + + #[test] + fn test_get_ptr() { + unsafe { + let x = box 0; + let addr_x: *int = ::cast::transmute(&*x); + let opt = Some(x); + let y = opt.unwrap(); + let addr_y: *int = ::cast::transmute(&*y); + assert_eq!(addr_x, addr_y); + } + } + + #[test] + fn test_get_str() { + let x = "test".to_owned(); + let addr_x = x.as_ptr(); + let opt = Some(x); + let y = opt.unwrap(); + let addr_y = y.as_ptr(); + assert_eq!(addr_x, addr_y); + } + + #[test] + fn test_get_resource() { + use realstd::rc::Rc; + use cell::RefCell; + + struct R { + i: Rc>, + } + + #[unsafe_destructor] + impl ::ops::Drop for R { + fn drop(&mut self) { + let ii = &*self.i; + let i = ii.borrow().clone(); + *ii.borrow_mut() = i + 1; + } + } + + fn R(i: Rc>) -> R { + R { + i: i + } + } + + let i = Rc::new(RefCell::new(0)); + { + let x = R(i.clone()); + let opt = Some(x); + let _y = opt.unwrap(); + } + assert_eq!(*i.borrow(), 1); + } + + #[test] + fn test_option_dance() { + let x = Some(()); + let mut y = Some(5); + let mut y2 = 0; + for _x in x.iter() { + y2 = y.take_unwrap(); + } + assert_eq!(y2, 5); + assert!(y.is_none()); + } + + #[test] #[should_fail] + fn test_option_too_much_dance() { + let mut y = Some(marker::NoCopy); + let _y2 = y.take_unwrap(); + let _y3 = y.take_unwrap(); + } + + #[test] + fn test_and() { + let x: Option = Some(1); + assert_eq!(x.and(Some(2)), Some(2)); + assert_eq!(x.and(None::), None); + + let x: Option = None; + assert_eq!(x.and(Some(2)), None); + assert_eq!(x.and(None::), None); + } + + #[test] + fn test_and_then() { + let x: Option = Some(1); + assert_eq!(x.and_then(|x| Some(x + 1)), Some(2)); + assert_eq!(x.and_then(|_| None::), None); + + let x: Option = None; + assert_eq!(x.and_then(|x| Some(x + 1)), None); + assert_eq!(x.and_then(|_| None::), None); + } + + #[test] + fn test_or() { + let x: Option = Some(1); + assert_eq!(x.or(Some(2)), Some(1)); + assert_eq!(x.or(None), Some(1)); + + let x: Option = None; + assert_eq!(x.or(Some(2)), Some(2)); + assert_eq!(x.or(None), None); + } + + #[test] + fn test_or_else() { + let x: Option = Some(1); + assert_eq!(x.or_else(|| Some(2)), Some(1)); + assert_eq!(x.or_else(|| None), Some(1)); + + let x: Option = None; + assert_eq!(x.or_else(|| Some(2)), Some(2)); + assert_eq!(x.or_else(|| None), None); + } + + #[test] + fn test_option_while_some() { + let mut i = 0; + Some(10).while_some(|j| { + i += 1; + if j > 0 { + Some(j-1) + } else { + None + } + }); + assert_eq!(i, 11); + } + + #[test] + fn test_unwrap() { + assert_eq!(Some(1).unwrap(), 1); + assert_eq!(Some("hello".to_owned()).unwrap(), "hello".to_owned()); + } + + #[test] + #[should_fail] + fn test_unwrap_fail1() { + let x: Option = None; + x.unwrap(); + } + + #[test] + #[should_fail] + fn test_unwrap_fail2() { + let x: Option<~str> = None; + x.unwrap(); + } + + #[test] + fn test_unwrap_or() { + let x: Option = Some(1); + assert_eq!(x.unwrap_or(2), 1); + + let x: Option = None; + assert_eq!(x.unwrap_or(2), 2); + } + + #[test] + fn test_unwrap_or_else() { + let x: Option = Some(1); + assert_eq!(x.unwrap_or_else(|| 2), 1); + + let x: Option = None; + assert_eq!(x.unwrap_or_else(|| 2), 2); + } + + #[test] + fn test_filtered() { + let some_stuff = Some(42); + let modified_stuff = some_stuff.filtered(|&x| {x < 10}); + assert_eq!(some_stuff.unwrap(), 42); + assert!(modified_stuff.is_none()); + } + + #[test] + fn test_iter() { + let val = 5; + + let x = Some(val); + let mut it = x.iter(); + + assert_eq!(it.size_hint(), (1, Some(1))); + assert_eq!(it.next(), Some(&val)); + assert_eq!(it.size_hint(), (0, Some(0))); + assert!(it.next().is_none()); + } + + #[test] + fn test_mut_iter() { + let val = 5; + let new_val = 11; + + let mut x = Some(val); + { + let mut it = x.mut_iter(); + + assert_eq!(it.size_hint(), (1, Some(1))); + + match it.next() { + Some(interior) => { + assert_eq!(*interior, val); + *interior = new_val; + } + None => assert!(false), + } + + assert_eq!(it.size_hint(), (0, Some(0))); + assert!(it.next().is_none()); + } + assert_eq!(x, Some(new_val)); + } + + #[test] + fn test_ord() { + let small = Some(1.0); + let big = Some(5.0); + let nan = Some(0.0/0.0); + assert!(!(nan < big)); + assert!(!(nan > big)); + assert!(small < big); + assert!(None < big); + assert!(big > None); + } + + #[test] + fn test_mutate() { + let mut x = Some(3i); + assert!(x.mutate(|i| i+1)); + assert_eq!(x, Some(4i)); + assert!(x.mutate_or_set(0, |i| i+1)); + assert_eq!(x, Some(5i)); + x = None; + assert!(!x.mutate(|i| i+1)); + assert_eq!(x, None); + assert!(!x.mutate_or_set(0i, |i| i+1)); + assert_eq!(x, Some(0i)); + } + + #[test] + fn test_collect() { + let v: Option<~[int]> = collect(range(0, 0) + .map(|_| Some(0))); + assert_eq!(v, Some(box [])); + + let v: Option<~[int]> = collect(range(0, 3) + .map(|x| Some(x))); + assert_eq!(v, Some(box [0, 1, 2])); + + let v: Option<~[int]> = collect(range(0, 3) + .map(|x| if x > 1 { None } else { Some(x) })); + assert_eq!(v, None); + + // test that it does not take more elements than it needs + let mut functions = [|| Some(()), || None, || fail!()]; + + let v: Option<~[()]> = collect(functions.mut_iter().map(|f| (*f)())); + + assert_eq!(v, None); + } +} diff --git a/src/libstd/owned.rs b/src/libcore/owned.rs similarity index 56% rename from src/libstd/owned.rs rename to src/libcore/owned.rs index 48b80e0ca8e..d5cdd9c39b6 100644 --- a/src/libstd/owned.rs +++ b/src/libcore/owned.rs @@ -10,7 +10,10 @@ //! Operations on unique pointer types -#[cfg(not(test))] use cmp::*; +// FIXME: this module should not exist in libcore. It must currently because the +// Box implementation is quite ad-hoc in the compiler. Once there is +// proper support in the compiler this type will be able to be defined in +// its own module. /// A value that represents the global exchange heap. This is the default /// place that the `box` keyword allocates into when no place is supplied. @@ -33,32 +36,3 @@ pub struct Box(*T); #[cfg(test)] pub struct Box(*T); - -#[cfg(not(test))] -impl Eq for Box { - #[inline] - fn eq(&self, other: &Box) -> bool { *(*self) == *(*other) } - #[inline] - fn ne(&self, other: &Box) -> bool { *(*self) != *(*other) } -} - -#[cfg(not(test))] -impl Ord for Box { - #[inline] - fn lt(&self, other: &Box) -> bool { *(*self) < *(*other) } - #[inline] - fn le(&self, other: &Box) -> bool { *(*self) <= *(*other) } - #[inline] - fn ge(&self, other: &Box) -> bool { *(*self) >= *(*other) } - #[inline] - fn gt(&self, other: &Box) -> bool { *(*self) > *(*other) } -} - -#[cfg(not(test))] -impl TotalOrd for Box { - #[inline] - fn cmp(&self, other: &Box) -> Ordering { (**self).cmp(*other) } -} - -#[cfg(not(test))] -impl TotalEq for Box {} diff --git a/src/libcore/prelude.rs b/src/libcore/prelude.rs new file mode 100644 index 00000000000..efd6732f653 --- /dev/null +++ b/src/libcore/prelude.rs @@ -0,0 +1,47 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! The core prelude +//! +//! For more information, see std::prelude. + +// Reexported core operators +pub use kinds::{Copy, Send, Sized, Share}; +pub use ops::{Add, Sub, Mul, Div, Rem, Neg, Not}; +pub use ops::{BitAnd, BitOr, BitXor}; +pub use ops::{Drop, Deref, DerefMut}; +pub use ops::{Shl, Shr, Index}; +pub use option::{Option, Some, None}; +pub use result::{Result, Ok, Err}; + +// Reexported functions +pub use iter::range; +pub use mem::drop; + +// Reexported types and traits + +pub use char::Char; +pub use clone::Clone; +pub use cmp::{Eq, Ord, TotalEq, TotalOrd, Ordering, Less, Equal, Greater, Equiv}; +pub use container::{Container, Mutable, Map, MutableMap, Set, MutableSet}; +pub use iter::{FromIterator, Extendable}; +pub use iter::{Iterator, DoubleEndedIterator, RandomAccessIterator, CloneableIterator}; +pub use iter::{OrdIterator, MutableDoubleEndedIterator, ExactSize}; +pub use num::{Num, NumCast, CheckedAdd, CheckedSub, CheckedMul}; +pub use num::{Signed, Unsigned}; +pub use num::{Primitive, Int, ToPrimitive, FromPrimitive}; +pub use ptr::RawPtr; +pub use str::{Str, StrSlice}; +pub use tuple::{Tuple1, Tuple2, Tuple3, Tuple4}; +pub use tuple::{Tuple5, Tuple6, Tuple7, Tuple8}; +pub use tuple::{Tuple9, Tuple10, Tuple11, Tuple12}; +pub use slice::{ImmutableEqVector, ImmutableTotalOrdVector}; +pub use slice::{MutableVector}; +pub use slice::{Vector, ImmutableVector}; diff --git a/src/libstd/ptr.rs b/src/libcore/ptr.rs similarity index 94% rename from src/libstd/ptr.rs rename to src/libcore/ptr.rs index dac727c2aa4..e3a3f78dcb9 100644 --- a/src/libstd/ptr.rs +++ b/src/libcore/ptr.rs @@ -92,14 +92,12 @@ use cast; use clone::Clone; -#[cfg(not(test))] -use cmp::Equiv; +use intrinsics; use iter::{range, Iterator}; use mem; -use option::{Option, Some, None}; -use intrinsics; +use option::{Some, None, Option}; -#[cfg(not(test))] use cmp::{Eq, TotalEq, Ord}; +#[cfg(not(test))] use cmp::{Eq, TotalEq, Ord, Equiv}; /// Return the offset of the first null pointer in `buf`. #[inline] @@ -377,7 +375,9 @@ impl RawPtr for *mut T { fn to_uint(&self) -> uint { *self as uint } #[inline] - unsafe fn offset(self, count: int) -> *mut T { intrinsics::offset(self as *T, count) as *mut T } + unsafe fn offset(self, count: int) -> *mut T { + intrinsics::offset(self as *T, count) as *mut T + } #[inline] unsafe fn to_option(&self) -> Option<&T> { @@ -444,10 +444,6 @@ mod externfnpointers { let other_: *() = unsafe { cast::transmute(*other) }; self_ == other_ } - #[inline] - fn ne(&self, other: &extern "C" fn() -> _R) -> bool { - !self.eq(other) - } } macro_rules! fnptreq( ($($p:ident),*) => { @@ -458,10 +454,6 @@ mod externfnpointers { let other_: *() = unsafe { cast::transmute(*other) }; self_ == other_ } - #[inline] - fn ne(&self, other: &extern "C" fn($($p),*) -> _R) -> bool { - !self.eq(other) - } } } ) @@ -476,52 +468,24 @@ mod externfnpointers { #[cfg(not(test))] impl Ord for *T { #[inline] - fn lt(&self, other: &*T) -> bool { - *self < *other - } - #[inline] - fn le(&self, other: &*T) -> bool { - *self <= *other - } - #[inline] - fn ge(&self, other: &*T) -> bool { - *self >= *other - } - #[inline] - fn gt(&self, other: &*T) -> bool { - *self > *other - } + fn lt(&self, other: &*T) -> bool { *self < *other } } #[cfg(not(test))] impl Ord for *mut T { #[inline] - fn lt(&self, other: &*mut T) -> bool { - *self < *other - } - #[inline] - fn le(&self, other: &*mut T) -> bool { - *self <= *other - } - #[inline] - fn ge(&self, other: &*mut T) -> bool { - *self >= *other - } - #[inline] - fn gt(&self, other: &*mut T) -> bool { - *self > *other - } + fn lt(&self, other: &*mut T) -> bool { *self < *other } } #[cfg(test)] pub mod ptr_tests { use super::*; - use prelude::*; + use realstd::prelude::*; - use c_str::ToCStr; + use realstd::c_str::ToCStr; use cast; use libc; - use str; + use realstd::str; use slice::{ImmutableVector, MutableVector}; #[test] diff --git a/src/libstd/raw.rs b/src/libcore/raw.rs similarity index 99% rename from src/libstd/raw.rs rename to src/libcore/raw.rs index 9b0463089d0..d6caa145ae9 100644 --- a/src/libstd/raw.rs +++ b/src/libcore/raw.rs @@ -9,6 +9,7 @@ // except according to those terms. #![allow(missing_doc)] +#![experimental] //! Contains struct definitions for the layout of compiler built-in types. //! diff --git a/src/libcore/result.rs b/src/libcore/result.rs new file mode 100644 index 00000000000..337b2ac89dd --- /dev/null +++ b/src/libcore/result.rs @@ -0,0 +1,752 @@ +// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! Error handling with the `Result` type +//! +//! `Result` is the type used for returning and propagating +//! errors. It is an enum with the variants, `Ok(T)`, representing +//! success and containing a value, and `Err(E)`, representing error +//! and containing an error value. +//! +//! ~~~ +//! enum Result { +//! Ok(T), +//! Err(E) +//! } +//! ~~~ +//! +//! Functions return `Result` whenever errors are expected and +//! recoverable. In the `std` crate `Result` is most prominently used +//! for [I/O](../io/index.html). +//! +//! A simple function returning `Result` might be +//! defined and used like so: +//! +//! ~~~ +//! #[deriving(Show)] +//! enum Version { Version1, Version2 } +//! +//! fn parse_version(header: &[u8]) -> Result { +//! if header.len() < 1 { +//! return Err("invalid header length"); +//! } +//! match header[0] { +//! 1 => Ok(Version1), +//! 2 => Ok(Version2), +//! _ => Err("invalid version") +//! } +//! } +//! +//! let version = parse_version(&[1, 2, 3, 4]); +//! match version { +//! Ok(v) => { +//! println!("working with version: {}", v); +//! } +//! Err(e) => { +//! println!("error parsing header: {}", e); +//! } +//! } +//! ~~~ +//! +//! Pattern matching on `Result`s is clear and straightforward for +//! simple cases, but `Result` comes with some convenience methods +//! that make working it more succinct. +//! +//! ~~~ +//! let good_result: Result = Ok(10); +//! let bad_result: Result = Err(10); +//! +//! // The `is_ok` and `is_err` methods do what they say. +//! assert!(good_result.is_ok() && !good_result.is_err()); +//! assert!(bad_result.is_err() && !bad_result.is_ok()); +//! +//! // `map` consumes the `Result` and produces another. +//! let good_result: Result = good_result.map(|i| i + 1); +//! let bad_result: Result = bad_result.map(|i| i - 1); +//! +//! // Use `and_then` to continue the computation. +//! let good_result: Result = good_result.and_then(|i| Ok(i == 11)); +//! +//! // Use `or_else` to handle the error. +//! let bad_result: Result = bad_result.or_else(|i| Ok(11)); +//! +//! // Consume the result and return the contents with `unwrap`. +//! let final_awesome_result = good_result.ok().unwrap(); +//! ~~~ +//! +//! # Results must be used +//! +//! A common problem with using return values to indicate errors is +//! that it is easy to ignore the return value, thus failing to handle +//! the error. Result is annotated with the #[must_use] attribute, +//! which will cause the compiler to issue a warning when a Result +//! value is ignored. This makes `Result` especially useful with +//! functions that may encounter errors but don't otherwise return a +//! useful value. +//! +//! Consider the `write_line` method defined for I/O types +//! by the [`Writer`](../io/trait.Writer.html) trait: +//! +//! ~~~ +//! use std::io::IoError; +//! +//! trait Writer { +//! fn write_line(&mut self, s: &str) -> Result<(), IoError>; +//! } +//! ~~~ +//! +//! *Note: The actual definition of `Writer` uses `IoResult`, which +//! is just a synonym for `Result`.* +//! +//! This method doesn`t produce a value, but the write may +//! fail. It's crucial to handle the error case, and *not* write +//! something like this: +//! +//! ~~~ignore +//! use std::io::{File, Open, Write}; +//! +//! let mut file = File::open_mode(&Path::new("valuable_data.txt"), Open, Write); +//! // If `write_line` errors, then we'll never know, because the return +//! // value is ignored. +//! file.write_line("important message"); +//! drop(file); +//! ~~~ +//! +//! If you *do* write that in Rust, the compiler will by give you a +//! warning (by default, controlled by the `unused_must_use` lint). +//! +//! You might instead, if you don't want to handle the error, simply +//! fail, by converting to an `Option` with `ok`, then asserting +//! success with `expect`. This will fail if the write fails, proving +//! a marginally useful message indicating why: +//! +//! ~~~no_run +//! use std::io::{File, Open, Write}; +//! +//! let mut file = File::open_mode(&Path::new("valuable_data.txt"), Open, Write); +//! file.write_line("important message").ok().expect("failed to write message"); +//! drop(file); +//! ~~~ +//! +//! You might also simply assert success: +//! +//! ~~~no_run +//! # use std::io::{File, Open, Write}; +//! +//! # let mut file = File::open_mode(&Path::new("valuable_data.txt"), Open, Write); +//! assert!(file.write_line("important message").is_ok()); +//! # drop(file); +//! ~~~ +//! +//! Or propagate the error up the call stack with `try!`: +//! +//! ~~~ +//! # use std::io::{File, Open, Write, IoError}; +//! fn write_message() -> Result<(), IoError> { +//! let mut file = File::open_mode(&Path::new("valuable_data.txt"), Open, Write); +//! try!(file.write_line("important message")); +//! drop(file); +//! return Ok(()); +//! } +//! ~~~ +//! +//! # The `try!` macro +//! +//! When writing code that calls many functions that return the +//! `Result` type, the error handling can be tedious. The `try!` +//! macro hides some of the boilerplate of propagating errors up the +//! call stack. +//! +//! It replaces this: +//! +//! ~~~ +//! use std::io::{File, Open, Write, IoError}; +//! +//! struct Info { name: ~str, age: int, rating: int } +//! +//! fn write_info(info: &Info) -> Result<(), IoError> { +//! let mut file = File::open_mode(&Path::new("my_best_friends.txt"), Open, Write); +//! // Early return on error +//! match file.write_line(format!("name: {}", info.name)) { +//! Ok(_) => (), +//! Err(e) => return Err(e) +//! } +//! match file.write_line(format!("age: {}", info.age)) { +//! Ok(_) => (), +//! Err(e) => return Err(e) +//! } +//! return file.write_line(format!("rating: {}", info.rating)); +//! } +//! ~~~ +//! +//! With this: +//! +//! ~~~ +//! use std::io::{File, Open, Write, IoError}; +//! +//! struct Info { name: ~str, age: int, rating: int } +//! +//! fn write_info(info: &Info) -> Result<(), IoError> { +//! let mut file = File::open_mode(&Path::new("my_best_friends.txt"), Open, Write); +//! // Early return on error +//! try!(file.write_line(format!("name: {}", info.name))); +//! try!(file.write_line(format!("age: {}", info.age))); +//! try!(file.write_line(format!("rating: {}", info.rating))); +//! return Ok(()); +//! } +//! ~~~ +//! +//! *It's much nicer!* +//! +//! Wrapping an expression in `try!` will result in the unwrapped +//! success (`Ok`) value, unless the result is `Err`, in which case +//! `Err` is returned early from the enclosing function. Its simple definition +//! makes it clear: +//! +//! ~~~ +//! # #![feature(macro_rules)] +//! macro_rules! try( +//! ($e:expr) => (match $e { Ok(e) => e, Err(e) => return Err(e) }) +//! ) +//! # fn main() { } +//! ~~~ +//! +//! `try!` is imported by the prelude, and is available everywhere. +//! +//! # `Result` and `Option` +//! +//! The `Result` and [`Option`](../option/index.html) types are +//! similar and complementary: they are often employed to indicate a +//! lack of a return value; and they are trivially converted between +//! each other, so `Result`s are often handled by first converting to +//! `Option` with the [`ok`](enum.Result.html#method.ok) and +//! [`err`](enum.Result.html#method.ok) methods. +//! +//! Whereas `Option` only indicates the lack of a value, `Result` is +//! specifically for error reporting, and carries with it an error +//! value. Sometimes `Option` is used for indicating errors, but this +//! is only for simple cases and is generally discouraged. Even when +//! there is no useful error value to return, prefer `Result`. +//! +//! Converting to an `Option` with `ok()` to handle an error: +//! +//! ~~~ +//! use std::io::Timer; +//! let mut t = Timer::new().ok().expect("failed to create timer!"); +//! ~~~ +//! +//! # `Result` vs. `fail!` +//! +//! `Result` is for recoverable errors; `fail!` is for unrecoverable +//! errors. Callers should always be able to avoid failure if they +//! take the proper precautions, for example, calling `is_some()` +//! on an `Option` type before calling `unwrap`. +//! +//! The suitability of `fail!` as an error handling mechanism is +//! limited by Rust's lack of any way to "catch" and resume execution +//! from a thrown exception. Therefore using failure for error +//! handling requires encapsulating fallable code in a task. Calling +//! the `fail!` macro, or invoking `fail!` indirectly should be +//! avoided as an error reporting strategy. Failure is only for +//! unrecoverable errors and a failing task is typically the sign of +//! a bug. +//! +//! A module that instead returns `Results` is alerting the caller +//! that failure is possible, and providing precise control over how +//! it is handled. +//! +//! Furthermore, failure may not be recoverable at all, depending on +//! the context. The caller of `fail!` should assume that execution +//! will not resume after failure, that failure is catastrophic. + +use clone::Clone; +use cmp::Eq; +use iter::{Iterator, FromIterator}; +use option::{None, Option, Some}; + +/// `Result` is a type that represents either success (`Ok`) or failure (`Err`). +/// +/// See the [`std::result`](index.html) module documentation for details. +#[deriving(Clone, Eq, Ord, TotalEq, TotalOrd)] +#[must_use] +pub enum Result { + /// Contains the success value + Ok(T), + + /// Contains the error value + Err(E) +} + +///////////////////////////////////////////////////////////////////////////// +// Type implementation +///////////////////////////////////////////////////////////////////////////// + +impl Result { + ///////////////////////////////////////////////////////////////////////// + // Querying the contained values + ///////////////////////////////////////////////////////////////////////// + + /// Returns true if the result is `Ok` + /// + /// # Example + /// + /// ~~~ + /// use std::io::{File, Open, Write}; + /// + /// # fn do_not_run_example() { // creates a file + /// let mut file = File::open_mode(&Path::new("secret.txt"), Open, Write); + /// assert!(file.write_line("it's cold in here").is_ok()); + /// # } + /// ~~~ + #[inline] + pub fn is_ok(&self) -> bool { + match *self { + Ok(_) => true, + Err(_) => false + } + } + + /// Returns true if the result is `Err` + /// + /// # Example + /// + /// ~~~ + /// use std::io::{File, Open, Read}; + /// + /// // When opening with `Read` access, if the file does not exist + /// // then `open_mode` returns an error. + /// let bogus = File::open_mode(&Path::new("not_a_file.txt"), Open, Read); + /// assert!(bogus.is_err()); + /// ~~~ + #[inline] + pub fn is_err(&self) -> bool { + !self.is_ok() + } + + + ///////////////////////////////////////////////////////////////////////// + // Adapter for each variant + ///////////////////////////////////////////////////////////////////////// + + /// Convert from `Result` to `Option` + /// + /// Converts `self` into an `Option`, consuming `self`, + /// and discarding the error, if any. + /// + /// To convert to an `Option` without discarding the error value, + /// use `as_ref` to first convert the `Result` into a + /// `Result<&T, &E>`. + /// + /// # Examples + /// + /// ~~~{.should_fail} + /// use std::io::{File, IoResult}; + /// + /// let bdays: IoResult = File::open(&Path::new("important_birthdays.txt")); + /// let bdays: File = bdays.ok().expect("unable to open birthday file"); + /// ~~~ + #[inline] + pub fn ok(self) -> Option { + match self { + Ok(x) => Some(x), + Err(_) => None, + } + } + + /// Convert from `Result` to `Option` + /// + /// Converts `self` into an `Option`, consuming `self`, + /// and discarding the value, if any. + #[inline] + pub fn err(self) -> Option { + match self { + Ok(_) => None, + Err(x) => Some(x), + } + } + + ///////////////////////////////////////////////////////////////////////// + // Adapter for working with references + ///////////////////////////////////////////////////////////////////////// + + /// Convert from `Result` to `Result<&T, &E>` + /// + /// Produces a new `Result`, containing a reference + /// into the original, leaving the original in place. + #[inline] + pub fn as_ref<'r>(&'r self) -> Result<&'r T, &'r E> { + match *self { + Ok(ref x) => Ok(x), + Err(ref x) => Err(x), + } + } + + /// Convert from `Result` to `Result<&mut T, &mut E>` + #[inline] + pub fn as_mut<'r>(&'r mut self) -> Result<&'r mut T, &'r mut E> { + match *self { + Ok(ref mut x) => Ok(x), + Err(ref mut x) => Err(x), + } + } + + ///////////////////////////////////////////////////////////////////////// + // Transforming contained values + ///////////////////////////////////////////////////////////////////////// + + /// Maps a `Result` to `Result` by applying a function to an + /// contained `Ok` value, leaving an `Err` value untouched. + /// + /// This function can be used to compose the results of two functions. + /// + /// # Examples + /// + /// Sum the lines of a buffer by mapping strings to numbers, + /// ignoring I/O and parse errors: + /// + /// ~~~ + /// use std::io::{BufReader, IoResult}; + /// + /// let buffer = "1\n2\n3\n4\n"; + /// let mut reader = BufReader::new(buffer.as_bytes()); + /// + /// let mut sum = 0; + /// + /// while !reader.eof() { + /// let line: IoResult<~str> = reader.read_line(); + /// // Convert the string line to a number using `map` and `from_str` + /// let val: IoResult = line.map(|line| { + /// from_str::(line).unwrap_or(0) + /// }); + /// // Add the value if there were no errors, otherwise add 0 + /// sum += val.ok().unwrap_or(0); + /// } + /// ~~~ + #[inline] + pub fn map(self, op: |T| -> U) -> Result { + match self { + Ok(t) => Ok(op(t)), + Err(e) => Err(e) + } + } + + /// Maps a `Result` to `Result` by applying a function to an + /// contained `Err` value, leaving an `Ok` value untouched. + /// + /// This function can be used to pass through a successful result while handling + /// an error. + #[inline] + pub fn map_err(self, op: |E| -> F) -> Result { + match self { + Ok(t) => Ok(t), + Err(e) => Err(op(e)) + } + } + + //////////////////////////////////////////////////////////////////////// + // Boolean operations on the values, eager and lazy + ///////////////////////////////////////////////////////////////////////// + + /// Returns `res` if the result is `Ok`, otherwise returns the `Err` value of `self`. + #[inline] + pub fn and(self, res: Result) -> Result { + match self { + Ok(_) => res, + Err(e) => Err(e), + } + } + + /// Calls `op` if the result is `Ok`, otherwise returns the `Err` value of `self`. + /// + /// This function can be used for control flow based on result values + #[inline] + pub fn and_then(self, op: |T| -> Result) -> Result { + match self { + Ok(t) => op(t), + Err(e) => Err(e), + } + } + + /// Returns `res` if the result is `Err`, otherwise returns the `Ok` value of `self`. + #[inline] + pub fn or(self, res: Result) -> Result { + match self { + Ok(_) => self, + Err(_) => res, + } + } + + /// Calls `op` if the result is `Err`, otherwise returns the `Ok` value of `self`. + /// + /// This function can be used for control flow based on result values + #[inline] + pub fn or_else(self, op: |E| -> Result) -> Result { + match self { + Ok(t) => Ok(t), + Err(e) => op(e), + } + } + + /// Unwraps a result, yielding the content of an `Ok`. + /// Else it returns `optb`. + #[inline] + pub fn unwrap_or(self, optb: T) -> T { + match self { + Ok(t) => t, + Err(_) => optb + } + } + + /// Unwraps a result, yielding the content of an `Ok`. + /// If the value is an `Err` then it calls `op` with its value. + #[inline] + pub fn unwrap_or_handle(self, op: |E| -> T) -> T { + match self { + Ok(t) => t, + Err(e) => op(e) + } + } +} + +///////////////////////////////////////////////////////////////////////////// +// Free functions +///////////////////////////////////////////////////////////////////////////// + +/// Takes each element in the `Iterator`: if it is an `Err`, no further +/// elements are taken, and the `Err` is returned. Should no `Err` occur, a +/// vector containing the values of each `Result` is returned. +/// +/// Here is an example which increments every integer in a vector, +/// checking for overflow: +/// +/// fn inc_conditionally(x: uint) -> Result { +/// if x == uint::MAX { return Err("overflow"); } +/// else { return Ok(x+1u); } +/// } +/// let v = [1u, 2, 3]; +/// let res = collect(v.iter().map(|&x| inc_conditionally(x))); +/// assert!(res == Ok(~[2u, 3, 4])); +#[inline] +pub fn collect>, V: FromIterator>(iter: Iter) -> Result { + // FIXME(#11084): This should be twice as fast once this bug is closed. + let mut iter = iter.scan(None, |state, x| { + match x { + Ok(x) => Some(x), + Err(err) => { + *state = Some(err); + None + } + } + }); + + let v: V = FromIterator::from_iter(iter.by_ref()); + + match iter.state { + Some(err) => Err(err), + None => Ok(v), + } +} + +/// Perform a fold operation over the result values from an iterator. +/// +/// If an `Err` is encountered, it is immediately returned. +/// Otherwise, the folded value is returned. +#[inline] +pub fn fold>>( + mut iterator: Iter, + mut init: V, + f: |V, T| -> V) + -> Result { + for t in iterator { + match t { + Ok(v) => init = f(init, v), + Err(u) => return Err(u) + } + } + Ok(init) +} + +/// Perform a trivial fold operation over the result values +/// from an iterator. +/// +/// If an `Err` is encountered, it is immediately returned. +/// Otherwise, a simple `Ok(())` is returned. +#[inline] +pub fn fold_>>(iterator: Iter) -> Result<(),E> { + fold(iterator, (), |_, _| ()) +} + +///////////////////////////////////////////////////////////////////////////// +// Tests +///////////////////////////////////////////////////////////////////////////// + +#[cfg(test)] +mod tests { + use realstd::result::{collect, fold, fold_}; + use realstd::prelude::*; + use realstd::iter::range; + + pub fn op1() -> Result { Ok(666) } + pub fn op2() -> Result { Err("sadface".to_owned()) } + + #[test] + pub fn test_and() { + assert_eq!(op1().and(Ok(667)).unwrap(), 667); + assert_eq!(op1().and(Err::<(), ~str>("bad".to_owned())).unwrap_err(), "bad".to_owned()); + + assert_eq!(op2().and(Ok(667)).unwrap_err(), "sadface".to_owned()); + assert_eq!(op2().and(Err::<(), ~str>("bad".to_owned())).unwrap_err(), "sadface".to_owned()); + } + + #[test] + pub fn test_and_then() { + assert_eq!(op1().and_then(|i| Ok::(i + 1)).unwrap(), 667); + assert_eq!(op1().and_then(|_| Err::("bad".to_owned())).unwrap_err(), + "bad".to_owned()); + + assert_eq!(op2().and_then(|i| Ok::(i + 1)).unwrap_err(), + "sadface".to_owned()); + assert_eq!(op2().and_then(|_| Err::("bad".to_owned())).unwrap_err(), + "sadface".to_owned()); + } + + #[test] + pub fn test_or() { + assert_eq!(op1().or(Ok(667)).unwrap(), 666); + assert_eq!(op1().or(Err("bad".to_owned())).unwrap(), 666); + + assert_eq!(op2().or(Ok(667)).unwrap(), 667); + assert_eq!(op2().or(Err("bad".to_owned())).unwrap_err(), "bad".to_owned()); + } + + #[test] + pub fn test_or_else() { + assert_eq!(op1().or_else(|_| Ok::(667)).unwrap(), 666); + assert_eq!(op1().or_else(|e| Err::(e + "!")).unwrap(), 666); + + assert_eq!(op2().or_else(|_| Ok::(667)).unwrap(), 667); + assert_eq!(op2().or_else(|e| Err::(e + "!")).unwrap_err(), + "sadface!".to_owned()); + } + + #[test] + pub fn test_impl_map() { + assert_eq!(Ok::<~str, ~str>("a".to_owned()).map(|x| x + "b"), Ok("ab".to_owned())); + assert_eq!(Err::<~str, ~str>("a".to_owned()).map(|x| x + "b"), Err("a".to_owned())); + } + + #[test] + pub fn test_impl_map_err() { + assert_eq!(Ok::<~str, ~str>("a".to_owned()).map_err(|x| x + "b"), Ok("a".to_owned())); + assert_eq!(Err::<~str, ~str>("a".to_owned()).map_err(|x| x + "b"), Err("ab".to_owned())); + } + + #[test] + fn test_collect() { + let v: Result<~[int], ()> = collect(range(0, 0).map(|_| Ok::(0))); + assert_eq!(v, Ok(box [])); + + let v: Result<~[int], ()> = collect(range(0, 3).map(|x| Ok::(x))); + assert_eq!(v, Ok(box [0, 1, 2])); + + let v: Result<~[int], int> = collect(range(0, 3) + .map(|x| if x > 1 { Err(x) } else { Ok(x) })); + assert_eq!(v, Err(2)); + + // test that it does not take more elements than it needs + let mut functions = [|| Ok(()), || Err(1), || fail!()]; + + let v: Result<~[()], int> = collect(functions.mut_iter().map(|f| (*f)())); + assert_eq!(v, Err(1)); + } + + #[test] + fn test_fold() { + assert_eq!(fold_(range(0, 0) + .map(|_| Ok::<(), ()>(()))), + Ok(())); + assert_eq!(fold(range(0, 3) + .map(|x| Ok::(x)), + 0, |a, b| a + b), + Ok(3)); + assert_eq!(fold_(range(0, 3) + .map(|x| if x > 1 { Err(x) } else { Ok(()) })), + Err(2)); + + // test that it does not take more elements than it needs + let mut functions = [|| Ok(()), || Err(1), || fail!()]; + + assert_eq!(fold_(functions.mut_iter() + .map(|f| (*f)())), + Err(1)); + } + + #[test] + pub fn test_to_str() { + let ok: Result = Ok(100); + let err: Result = Err("Err".to_owned()); + + assert_eq!(ok.to_str(), "Ok(100)".to_owned()); + assert_eq!(err.to_str(), "Err(Err)".to_owned()); + } + + #[test] + pub fn test_fmt_default() { + let ok: Result = Ok(100); + let err: Result = Err("Err".to_owned()); + + assert_eq!(format!("{}", ok), "Ok(100)".to_owned()); + assert_eq!(format!("{}", err), "Err(Err)".to_owned()); + } + + #[test] + pub fn test_unwrap_or() { + let ok: Result = Ok(100); + let ok_err: Result = Err("Err".to_owned()); + + assert_eq!(ok.unwrap_or(50), 100); + assert_eq!(ok_err.unwrap_or(50), 50); + } + + #[test] + pub fn test_unwrap_or_else() { + fn handler(msg: ~str) -> int { + if msg == "I got this.".to_owned() { + 50 + } else { + fail!("BadBad") + } + } + + let ok: Result = Ok(100); + let ok_err: Result = Err("I got this.".to_owned()); + + assert_eq!(ok.unwrap_or_handle(handler), 100); + assert_eq!(ok_err.unwrap_or_handle(handler), 50); + } + + #[test] + #[should_fail] + pub fn test_unwrap_or_else_failure() { + fn handler(msg: ~str) -> int { + if msg == "I got this.".to_owned() { + 50 + } else { + fail!("BadBad") + } + } + + let bad_err: Result = Err("Unrecoverable mess.".to_owned()); + let _ : int = bad_err.unwrap_or_handle(handler); + } +} diff --git a/src/libcore/should_not_exist.rs b/src/libcore/should_not_exist.rs new file mode 100644 index 00000000000..50447f0c5b3 --- /dev/null +++ b/src/libcore/should_not_exist.rs @@ -0,0 +1,202 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +use cast; +use char::Char; +use clone::Clone; +use container::Container; +use default::Default; +use intrinsics; +use iter::{Iterator, FromIterator}; +use mem; +use num::{CheckedMul, CheckedAdd}; +use option::{Some, None}; +use ptr::RawPtr; +use ptr; +use raw::Vec; +use slice::ImmutableVector; +use str::StrSlice; + +#[cfg(not(test))] use ops::Add; +#[cfg(not(test))] use slice::Vector; + +#[allow(ctypes)] +extern { + fn malloc(size: uint) -> *u8; + fn free(ptr: *u8); +} + +unsafe fn alloc(cap: uint) -> *mut Vec<()> { + let cap = cap.checked_add(&mem::size_of::>()).unwrap(); + let ret = malloc(cap) as *mut Vec<()>; + if ret.is_null() { + intrinsics::abort(); + } + (*ret).fill = 0; + (*ret).alloc = cap; + ret +} + +// Strings + +impl Default for ~str { + fn default() -> ~str { + unsafe { + // Get some memory + let ptr = alloc(0); + + // Initialize the memory + (*ptr).fill = 0; + (*ptr).alloc = 0; + + cast::transmute(ptr) + } + } +} + +impl Clone for ~str { + fn clone(&self) -> ~str { + // Don't use the clone() implementation above because it'll start + // requiring the eh_personality lang item (no fun) + unsafe { + let bytes = self.as_bytes().as_ptr(); + let len = self.len(); + + let ptr = alloc(len) as *mut Vec; + ptr::copy_nonoverlapping_memory(&mut (*ptr).data, bytes, len); + (*ptr).fill = len; + (*ptr).alloc = len; + + cast::transmute(ptr) + } + } +} + +impl FromIterator for ~str { + #[inline] + fn from_iter>(mut iterator: T) -> ~str { + let (lower, _) = iterator.size_hint(); + let mut cap = if lower == 0 {16} else {lower}; + let mut len = 0; + let mut tmp = [0u8, ..4]; + + unsafe { + let mut ptr = alloc(cap) as *mut Vec; + let mut ret = cast::transmute(ptr); + for ch in iterator { + let amt = ch.encode_utf8(tmp); + + if len + amt > cap { + cap = cap.checked_mul(&2).unwrap(); + if cap < len + amt { + cap = len + amt; + } + let ptr2 = alloc(cap) as *mut Vec; + ptr::copy_nonoverlapping_memory(&mut (*ptr2).data, + &(*ptr).data, + len); + free(ptr as *u8); + cast::forget(ret); + ret = cast::transmute(ptr2); + ptr = ptr2; + } + + let base = &mut (*ptr).data as *mut u8; + for byte in tmp.slice_to(amt).iter() { + *base.offset(len as int) = *byte; + len += 1; + } + (*ptr).fill = len; + } + ret + } + } +} + +#[cfg(not(test))] +impl<'a> Add<&'a str,~str> for &'a str { + #[inline] + fn add(&self, rhs: & &'a str) -> ~str { + let amt = self.len().checked_add(&rhs.len()).unwrap(); + unsafe { + let ptr = alloc(amt) as *mut Vec; + let base = &mut (*ptr).data as *mut _; + ptr::copy_nonoverlapping_memory(base, + self.as_bytes().as_ptr(), + self.len()); + let base = base.offset(self.len() as int); + ptr::copy_nonoverlapping_memory(base, + rhs.as_bytes().as_ptr(), + rhs.len()); + (*ptr).fill = amt; + (*ptr).alloc = amt; + cast::transmute(ptr) + } + } +} + +// Arrays + +impl Clone for ~[A] { + #[inline] + fn clone(&self) -> ~[A] { + self.iter().map(|a| a.clone()).collect() + } +} + +impl FromIterator for ~[A] { + fn from_iter>(mut iterator: T) -> ~[A] { + let (lower, _) = iterator.size_hint(); + let cap = if lower == 0 {16} else {lower}; + let mut cap = cap.checked_mul(&mem::size_of::()).unwrap(); + let mut len = 0; + + unsafe { + let mut ptr = alloc(cap) as *mut Vec; + let mut ret = cast::transmute(ptr); + for elt in iterator { + if len * mem::size_of::() >= cap { + cap = cap.checked_mul(&2).unwrap(); + let ptr2 = alloc(cap) as *mut Vec; + ptr::copy_nonoverlapping_memory(&mut (*ptr2).data, + &(*ptr).data, + len); + free(ptr as *u8); + cast::forget(ret); + ret = cast::transmute(ptr2); + ptr = ptr2; + } + + let base = &mut (*ptr).data as *mut A; + intrinsics::move_val_init(&mut *base.offset(len as int), elt); + len += 1; + (*ptr).fill = len * mem::nonzero_size_of::(); + } + ret + } + } +} + +#[cfg(not(test))] +impl<'a,T:Clone, V: Vector> Add for &'a [T] { + #[inline] + fn add(&self, rhs: &V) -> ~[T] { + let first = self.iter().map(|t| t.clone()); + first.chain(rhs.as_slice().iter().map(|t| t.clone())).collect() + } +} + +#[cfg(not(test))] +impl> Add for ~[T] { + #[inline] + fn add(&self, rhs: &V) -> ~[T] { + self.as_slice() + rhs.as_slice() + } +} diff --git a/src/libcore/slice.rs b/src/libcore/slice.rs new file mode 100644 index 00000000000..b828ad3361e --- /dev/null +++ b/src/libcore/slice.rs @@ -0,0 +1,1483 @@ +// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! Slice management and manipulation +//! +//! For more details `std::slice`. + +use cast; +use cast::transmute; +use clone::Clone; +use container::Container; +use cmp::{Eq, TotalOrd, Ordering, Less, Equal, Greater}; +use cmp; +use default::Default; +use iter::*; +use num::{CheckedAdd, Saturating, div_rem}; +use option::{None, Option, Some}; +use ptr; +use ptr::RawPtr; +use mem; +use mem::size_of; +use kinds::marker; +use raw::{Repr, Slice}; + +/** + * Converts a pointer to A into a slice of length 1 (without copying). + */ +pub fn ref_slice<'a, A>(s: &'a A) -> &'a [A] { + unsafe { + transmute(Slice { data: s, len: 1 }) + } +} + +/** + * Converts a pointer to A into a slice of length 1 (without copying). + */ +pub fn mut_ref_slice<'a, A>(s: &'a mut A) -> &'a mut [A] { + unsafe { + let ptr: *A = transmute(s); + transmute(Slice { data: ptr, len: 1 }) + } +} + +/// An iterator over the slices of a vector separated by elements that +/// match a predicate function. +pub struct Splits<'a, T> { + v: &'a [T], + pred: |t: &T|: 'a -> bool, + finished: bool +} + +impl<'a, T> Iterator<&'a [T]> for Splits<'a, T> { + #[inline] + fn next(&mut self) -> Option<&'a [T]> { + if self.finished { return None; } + + match self.v.iter().position(|x| (self.pred)(x)) { + None => { + self.finished = true; + Some(self.v) + } + Some(idx) => { + let ret = Some(self.v.slice(0, idx)); + self.v = self.v.slice(idx + 1, self.v.len()); + ret + } + } + } + + #[inline] + fn size_hint(&self) -> (uint, Option) { + if self.finished { + (0, Some(0)) + } else { + (1, Some(self.v.len() + 1)) + } + } +} + +impl<'a, T> DoubleEndedIterator<&'a [T]> for Splits<'a, T> { + #[inline] + fn next_back(&mut self) -> Option<&'a [T]> { + if self.finished { return None; } + + match self.v.iter().rposition(|x| (self.pred)(x)) { + None => { + self.finished = true; + Some(self.v) + } + Some(idx) => { + let ret = Some(self.v.slice(idx + 1, self.v.len())); + self.v = self.v.slice(0, idx); + ret + } + } + } +} + +/// An iterator over the slices of a vector separated by elements that +/// match a predicate function, splitting at most a fixed number of times. +pub struct SplitsN<'a, T> { + iter: Splits<'a, T>, + count: uint, + invert: bool +} + +impl<'a, T> Iterator<&'a [T]> for SplitsN<'a, T> { + #[inline] + fn next(&mut self) -> Option<&'a [T]> { + if self.count == 0 { + if self.iter.finished { + None + } else { + self.iter.finished = true; + Some(self.iter.v) + } + } else { + self.count -= 1; + if self.invert { self.iter.next_back() } else { self.iter.next() } + } + } + + #[inline] + fn size_hint(&self) -> (uint, Option) { + if self.iter.finished { + (0, Some(0)) + } else { + (1, Some(cmp::min(self.count, self.iter.v.len()) + 1)) + } + } +} + +// Functional utilities + +/// An iterator over the (overlapping) slices of length `size` within +/// a vector. +#[deriving(Clone)] +pub struct Windows<'a, T> { + v: &'a [T], + size: uint +} + +impl<'a, T> Iterator<&'a [T]> for Windows<'a, T> { + #[inline] + fn next(&mut self) -> Option<&'a [T]> { + if self.size > self.v.len() { + None + } else { + let ret = Some(self.v.slice(0, self.size)); + self.v = self.v.slice(1, self.v.len()); + ret + } + } + + #[inline] + fn size_hint(&self) -> (uint, Option) { + if self.size > self.v.len() { + (0, Some(0)) + } else { + let x = self.v.len() - self.size; + (x.saturating_add(1), x.checked_add(&1u)) + } + } +} + +/// An iterator over a vector in (non-overlapping) chunks (`size` +/// elements at a time). +/// +/// When the vector len is not evenly divided by the chunk size, +/// the last slice of the iteration will be the remainder. +#[deriving(Clone)] +pub struct Chunks<'a, T> { + v: &'a [T], + size: uint +} + +impl<'a, T> Iterator<&'a [T]> for Chunks<'a, T> { + #[inline] + fn next(&mut self) -> Option<&'a [T]> { + if self.v.len() == 0 { + None + } else { + let chunksz = cmp::min(self.v.len(), self.size); + let (fst, snd) = (self.v.slice_to(chunksz), + self.v.slice_from(chunksz)); + self.v = snd; + Some(fst) + } + } + + #[inline] + fn size_hint(&self) -> (uint, Option) { + if self.v.len() == 0 { + (0, Some(0)) + } else { + let (n, rem) = div_rem(self.v.len(), self.size); + let n = if rem > 0 { n+1 } else { n }; + (n, Some(n)) + } + } +} + +impl<'a, T> DoubleEndedIterator<&'a [T]> for Chunks<'a, T> { + #[inline] + fn next_back(&mut self) -> Option<&'a [T]> { + if self.v.len() == 0 { + None + } else { + let remainder = self.v.len() % self.size; + let chunksz = if remainder != 0 { remainder } else { self.size }; + let (fst, snd) = (self.v.slice_to(self.v.len() - chunksz), + self.v.slice_from(self.v.len() - chunksz)); + self.v = fst; + Some(snd) + } + } +} + +impl<'a, T> RandomAccessIterator<&'a [T]> for Chunks<'a, T> { + #[inline] + fn indexable(&self) -> uint { + self.v.len()/self.size + if self.v.len() % self.size != 0 { 1 } else { 0 } + } + + #[inline] + fn idx(&mut self, index: uint) -> Option<&'a [T]> { + if index < self.indexable() { + let lo = index * self.size; + let mut hi = lo + self.size; + if hi < lo || hi > self.v.len() { hi = self.v.len(); } + + Some(self.v.slice(lo, hi)) + } else { + None + } + } +} + +// Equality + +#[cfg(not(test))] +#[allow(missing_doc)] +pub mod traits { + use super::*; + + use cmp::{Eq, Ord, TotalEq, TotalOrd, Ordering, Equiv}; + use iter::{order, Iterator}; + use container::Container; + + impl<'a,T:Eq> Eq for &'a [T] { + fn eq(&self, other: & &'a [T]) -> bool { + self.len() == other.len() && + order::eq(self.iter(), other.iter()) + } + fn ne(&self, other: & &'a [T]) -> bool { + self.len() != other.len() || + order::ne(self.iter(), other.iter()) + } + } + + impl Eq for ~[T] { + #[inline] + fn eq(&self, other: &~[T]) -> bool { self.as_slice() == *other } + #[inline] + fn ne(&self, other: &~[T]) -> bool { !self.eq(other) } + } + + impl<'a,T:TotalEq> TotalEq for &'a [T] {} + + impl TotalEq for ~[T] {} + + impl<'a,T:Eq, V: Vector> Equiv for &'a [T] { + #[inline] + fn equiv(&self, other: &V) -> bool { self.as_slice() == other.as_slice() } + } + + impl<'a,T:Eq, V: Vector> Equiv for ~[T] { + #[inline] + fn equiv(&self, other: &V) -> bool { self.as_slice() == other.as_slice() } + } + + impl<'a,T:TotalOrd> TotalOrd for &'a [T] { + fn cmp(&self, other: & &'a [T]) -> Ordering { + order::cmp(self.iter(), other.iter()) + } + } + + impl TotalOrd for ~[T] { + #[inline] + fn cmp(&self, other: &~[T]) -> Ordering { self.as_slice().cmp(&other.as_slice()) } + } + + impl<'a, T: Ord> Ord for &'a [T] { + fn lt(&self, other: & &'a [T]) -> bool { + order::lt(self.iter(), other.iter()) + } + #[inline] + fn le(&self, other: & &'a [T]) -> bool { + order::le(self.iter(), other.iter()) + } + #[inline] + fn ge(&self, other: & &'a [T]) -> bool { + order::ge(self.iter(), other.iter()) + } + #[inline] + fn gt(&self, other: & &'a [T]) -> bool { + order::gt(self.iter(), other.iter()) + } + } + + impl Ord for ~[T] { + #[inline] + fn lt(&self, other: &~[T]) -> bool { self.as_slice() < other.as_slice() } + #[inline] + fn le(&self, other: &~[T]) -> bool { self.as_slice() <= other.as_slice() } + #[inline] + fn ge(&self, other: &~[T]) -> bool { self.as_slice() >= other.as_slice() } + #[inline] + fn gt(&self, other: &~[T]) -> bool { self.as_slice() > other.as_slice() } + } +} + +#[cfg(test)] +pub mod traits {} + +/// Any vector that can be represented as a slice. +pub trait Vector { + /// Work with `self` as a slice. + fn as_slice<'a>(&'a self) -> &'a [T]; +} + +impl<'a,T> Vector for &'a [T] { + #[inline(always)] + fn as_slice<'a>(&'a self) -> &'a [T] { *self } +} + +impl Vector for ~[T] { + #[inline(always)] + fn as_slice<'a>(&'a self) -> &'a [T] { let v: &'a [T] = *self; v } +} + +impl<'a, T> Container for &'a [T] { + /// Returns the length of a vector + #[inline] + fn len(&self) -> uint { + self.repr().len + } +} + +impl Container for ~[T] { + /// Returns the length of a vector + #[inline] + fn len(&self) -> uint { + self.as_slice().len() + } +} + +/// Extension methods for vectors +pub trait ImmutableVector<'a, T> { + /** + * Returns a slice of self between `start` and `end`. + * + * Fails when `start` or `end` point outside the bounds of self, + * or when `start` > `end`. + */ + fn slice(&self, start: uint, end: uint) -> &'a [T]; + + /** + * Returns a slice of self from `start` to the end of the vec. + * + * Fails when `start` points outside the bounds of self. + */ + fn slice_from(&self, start: uint) -> &'a [T]; + + /** + * Returns a slice of self from the start of the vec to `end`. + * + * Fails when `end` points outside the bounds of self. + */ + fn slice_to(&self, end: uint) -> &'a [T]; + /// Returns an iterator over the vector + fn iter(self) -> Items<'a, T>; + /// Returns a reversed iterator over a vector + #[deprecated = "replaced by .iter().rev()"] + fn rev_iter(self) -> Rev>; + /// Returns an iterator over the subslices of the vector which are + /// separated by elements that match `pred`. The matched element + /// is not contained in the subslices. + fn split(self, pred: |&T|: 'a -> bool) -> Splits<'a, T>; + /// Returns an iterator over the subslices of the vector which are + /// separated by elements that match `pred`, limited to splitting + /// at most `n` times. The matched element is not contained in + /// the subslices. + fn splitn(self, n: uint, pred: |&T|: 'a -> bool) -> SplitsN<'a, T>; + /// Returns an iterator over the subslices of the vector which are + /// separated by elements that match `pred`. This starts at the + /// end of the vector and works backwards. The matched element is + /// not contained in the subslices. + #[deprecated = "replaced by .split(pred).rev()"] + fn rsplit(self, pred: |&T|: 'a -> bool) -> Rev>; + /// Returns an iterator over the subslices of the vector which are + /// separated by elements that match `pred` limited to splitting + /// at most `n` times. This starts at the end of the vector and + /// works backwards. The matched element is not contained in the + /// subslices. + fn rsplitn(self, n: uint, pred: |&T|: 'a -> bool) -> SplitsN<'a, T>; + + /** + * Returns an iterator over all contiguous windows of length + * `size`. The windows overlap. If the vector is shorter than + * `size`, the iterator returns no values. + * + * # Failure + * + * Fails if `size` is 0. + * + * # Example + * + * Print the adjacent pairs of a vector (i.e. `[1,2]`, `[2,3]`, + * `[3,4]`): + * + * ```rust + * let v = &[1,2,3,4]; + * for win in v.windows(2) { + * println!("{:?}", win); + * } + * ``` + * + */ + fn windows(self, size: uint) -> Windows<'a, T>; + /** + * + * Returns an iterator over `size` elements of the vector at a + * time. The chunks do not overlap. If `size` does not divide the + * length of the vector, then the last chunk will not have length + * `size`. + * + * # Failure + * + * Fails if `size` is 0. + * + * # Example + * + * Print the vector two elements at a time (i.e. `[1,2]`, + * `[3,4]`, `[5]`): + * + * ```rust + * let v = &[1,2,3,4,5]; + * for win in v.chunks(2) { + * println!("{:?}", win); + * } + * ``` + * + */ + fn chunks(self, size: uint) -> Chunks<'a, T>; + + /// Returns the element of a vector at the given index, or `None` if the + /// index is out of bounds + fn get(&self, index: uint) -> Option<&'a T>; + /// Returns the first element of a vector, or `None` if it is empty + fn head(&self) -> Option<&'a T>; + /// Returns all but the first element of a vector + fn tail(&self) -> &'a [T]; + /// Returns all but the first `n' elements of a vector + fn tailn(&self, n: uint) -> &'a [T]; + /// Returns all but the last element of a vector + fn init(&self) -> &'a [T]; + /// Returns all but the last `n' elements of a vector + fn initn(&self, n: uint) -> &'a [T]; + /// Returns the last element of a vector, or `None` if it is empty. + fn last(&self) -> Option<&'a T>; + + /// Returns a pointer to the element at the given index, without doing + /// bounds checking. + unsafe fn unsafe_ref(self, index: uint) -> &'a T; + + /** + * Returns an unsafe pointer to the vector's buffer + * + * The caller must ensure that the vector outlives the pointer this + * function returns, or else it will end up pointing to garbage. + * + * Modifying the vector may cause its buffer to be reallocated, which + * would also make any pointers to it invalid. + */ + fn as_ptr(&self) -> *T; + + /** + * Binary search a sorted vector with a comparator function. + * + * The comparator function should implement an order consistent + * with the sort order of the underlying vector, returning an + * order code that indicates whether its argument is `Less`, + * `Equal` or `Greater` the desired target. + * + * Returns the index where the comparator returned `Equal`, or `None` if + * not found. + */ + fn bsearch(&self, f: |&T| -> Ordering) -> Option; + + /** + * Returns a mutable reference to the first element in this slice + * and adjusts the slice in place so that it no longer contains + * that element. O(1). + * + * Equivalent to: + * + * ```ignore + * if self.len() == 0 { return None } + * let head = &self[0]; + * *self = self.slice_from(1); + * Some(head) + * ``` + * + * Returns `None` if vector is empty + */ + fn shift_ref(&mut self) -> Option<&'a T>; + + /** + * Returns a mutable reference to the last element in this slice + * and adjusts the slice in place so that it no longer contains + * that element. O(1). + * + * Equivalent to: + * + * ```ignore + * if self.len() == 0 { return None; } + * let tail = &self[self.len() - 1]; + * *self = self.slice_to(self.len() - 1); + * Some(tail) + * ``` + * + * Returns `None` if slice is empty. + */ + fn pop_ref(&mut self) -> Option<&'a T>; +} + +impl<'a,T> ImmutableVector<'a, T> for &'a [T] { + #[inline] + fn slice(&self, start: uint, end: uint) -> &'a [T] { + assert!(start <= end); + assert!(end <= self.len()); + unsafe { + transmute(Slice { + data: self.as_ptr().offset(start as int), + len: (end - start) + }) + } + } + + #[inline] + fn slice_from(&self, start: uint) -> &'a [T] { + self.slice(start, self.len()) + } + + #[inline] + fn slice_to(&self, end: uint) -> &'a [T] { + self.slice(0, end) + } + + #[inline] + fn iter(self) -> Items<'a, T> { + unsafe { + let p = self.as_ptr(); + if mem::size_of::() == 0 { + Items{ptr: p, + end: (p as uint + self.len()) as *T, + marker: marker::ContravariantLifetime::<'a>} + } else { + Items{ptr: p, + end: p.offset(self.len() as int), + marker: marker::ContravariantLifetime::<'a>} + } + } + } + + #[inline] + #[deprecated = "replaced by .iter().rev()"] + fn rev_iter(self) -> Rev> { + self.iter().rev() + } + + #[inline] + fn split(self, pred: |&T|: 'a -> bool) -> Splits<'a, T> { + Splits { + v: self, + pred: pred, + finished: false + } + } + + #[inline] + fn splitn(self, n: uint, pred: |&T|: 'a -> bool) -> SplitsN<'a, T> { + SplitsN { + iter: self.split(pred), + count: n, + invert: false + } + } + + #[inline] + #[deprecated = "replaced by .split(pred).rev()"] + fn rsplit(self, pred: |&T|: 'a -> bool) -> Rev> { + self.split(pred).rev() + } + + #[inline] + fn rsplitn(self, n: uint, pred: |&T|: 'a -> bool) -> SplitsN<'a, T> { + SplitsN { + iter: self.split(pred), + count: n, + invert: true + } + } + + #[inline] + fn windows(self, size: uint) -> Windows<'a, T> { + assert!(size != 0); + Windows { v: self, size: size } + } + + #[inline] + fn chunks(self, size: uint) -> Chunks<'a, T> { + assert!(size != 0); + Chunks { v: self, size: size } + } + + #[inline] + fn get(&self, index: uint) -> Option<&'a T> { + if index < self.len() { Some(&self[index]) } else { None } + } + + #[inline] + fn head(&self) -> Option<&'a T> { + if self.len() == 0 { None } else { Some(&self[0]) } + } + + #[inline] + fn tail(&self) -> &'a [T] { self.slice(1, self.len()) } + + #[inline] + fn tailn(&self, n: uint) -> &'a [T] { self.slice(n, self.len()) } + + #[inline] + fn init(&self) -> &'a [T] { + self.slice(0, self.len() - 1) + } + + #[inline] + fn initn(&self, n: uint) -> &'a [T] { + self.slice(0, self.len() - n) + } + + #[inline] + fn last(&self) -> Option<&'a T> { + if self.len() == 0 { None } else { Some(&self[self.len() - 1]) } + } + + #[inline] + unsafe fn unsafe_ref(self, index: uint) -> &'a T { + transmute(self.repr().data.offset(index as int)) + } + + #[inline] + fn as_ptr(&self) -> *T { + self.repr().data + } + + + fn bsearch(&self, f: |&T| -> Ordering) -> Option { + let mut base : uint = 0; + let mut lim : uint = self.len(); + + while lim != 0 { + let ix = base + (lim >> 1); + match f(&self[ix]) { + Equal => return Some(ix), + Less => { + base = ix + 1; + lim -= 1; + } + Greater => () + } + lim >>= 1; + } + return None; + } + + fn shift_ref(&mut self) -> Option<&'a T> { + if self.len() == 0 { return None; } + unsafe { + let s: &mut Slice = transmute(self); + Some(&*raw::shift_ptr(s)) + } + } + + fn pop_ref(&mut self) -> Option<&'a T> { + if self.len() == 0 { return None; } + unsafe { + let s: &mut Slice = transmute(self); + Some(&*raw::pop_ptr(s)) + } + } +} + +/// Extension methods for vectors contain `Eq` elements. +pub trait ImmutableEqVector { + /// Find the first index containing a matching value + fn position_elem(&self, t: &T) -> Option; + + /// Find the last index containing a matching value + fn rposition_elem(&self, t: &T) -> Option; + + /// Return true if a vector contains an element with the given value + fn contains(&self, x: &T) -> bool; + + /// Returns true if `needle` is a prefix of the vector. + fn starts_with(&self, needle: &[T]) -> bool; + + /// Returns true if `needle` is a suffix of the vector. + fn ends_with(&self, needle: &[T]) -> bool; +} + +impl<'a,T:Eq> ImmutableEqVector for &'a [T] { + #[inline] + fn position_elem(&self, x: &T) -> Option { + self.iter().position(|y| *x == *y) + } + + #[inline] + fn rposition_elem(&self, t: &T) -> Option { + self.iter().rposition(|x| *x == *t) + } + + #[inline] + fn contains(&self, x: &T) -> bool { + self.iter().any(|elt| *x == *elt) + } + + #[inline] + fn starts_with(&self, needle: &[T]) -> bool { + let n = needle.len(); + self.len() >= n && needle == self.slice_to(n) + } + + #[inline] + fn ends_with(&self, needle: &[T]) -> bool { + let (m, n) = (self.len(), needle.len()); + m >= n && needle == self.slice_from(m - n) + } +} + +/// Extension methods for vectors containing `TotalOrd` elements. +pub trait ImmutableTotalOrdVector { + /** + * Binary search a sorted vector for a given element. + * + * Returns the index of the element or None if not found. + */ + fn bsearch_elem(&self, x: &T) -> Option; +} + +impl<'a, T: TotalOrd> ImmutableTotalOrdVector for &'a [T] { + fn bsearch_elem(&self, x: &T) -> Option { + self.bsearch(|p| p.cmp(x)) + } +} + +/// Extension methods for vectors such that their elements are +/// mutable. +pub trait MutableVector<'a, T> { + /// Work with `self` as a mut slice. + /// Primarily intended for getting a &mut [T] from a [T, ..N]. + fn as_mut_slice(self) -> &'a mut [T]; + + /// Return a slice that points into another slice. + fn mut_slice(self, start: uint, end: uint) -> &'a mut [T]; + + /** + * Returns a slice of self from `start` to the end of the vec. + * + * Fails when `start` points outside the bounds of self. + */ + fn mut_slice_from(self, start: uint) -> &'a mut [T]; + + /** + * Returns a slice of self from the start of the vec to `end`. + * + * Fails when `end` points outside the bounds of self. + */ + fn mut_slice_to(self, end: uint) -> &'a mut [T]; + + /// Returns an iterator that allows modifying each value + fn mut_iter(self) -> MutItems<'a, T>; + + /// Returns a mutable pointer to the last item in the vector. + fn mut_last(self) -> Option<&'a mut T>; + + /// Returns a reversed iterator that allows modifying each value + #[deprecated = "replaced by .mut_iter().rev()"] + fn mut_rev_iter(self) -> Rev>; + + /// Returns an iterator over the mutable subslices of the vector + /// which are separated by elements that match `pred`. The + /// matched element is not contained in the subslices. + fn mut_split(self, pred: |&T|: 'a -> bool) -> MutSplits<'a, T>; + + /** + * Returns an iterator over `size` elements of the vector at a time. + * The chunks are mutable and do not overlap. If `size` does not divide the + * length of the vector, then the last chunk will not have length + * `size`. + * + * # Failure + * + * Fails if `size` is 0. + */ + fn mut_chunks(self, chunk_size: uint) -> MutChunks<'a, T>; + + /** + * Returns a mutable reference to the first element in this slice + * and adjusts the slice in place so that it no longer contains + * that element. O(1). + * + * Equivalent to: + * + * ```ignore + * if self.len() == 0 { return None; } + * let head = &mut self[0]; + * *self = self.mut_slice_from(1); + * Some(head) + * ``` + * + * Returns `None` if slice is empty + */ + fn mut_shift_ref(&mut self) -> Option<&'a mut T>; + + /** + * Returns a mutable reference to the last element in this slice + * and adjusts the slice in place so that it no longer contains + * that element. O(1). + * + * Equivalent to: + * + * ```ignore + * if self.len() == 0 { return None; } + * let tail = &mut self[self.len() - 1]; + * *self = self.mut_slice_to(self.len() - 1); + * Some(tail) + * ``` + * + * Returns `None` if slice is empty. + */ + fn mut_pop_ref(&mut self) -> Option<&'a mut T>; + + /// Swaps two elements in a vector. + /// + /// Fails if `a` or `b` are out of bounds. + /// + /// # Arguments + /// + /// * a - The index of the first element + /// * b - The index of the second element + /// + /// # Example + /// + /// ```rust + /// let mut v = ["a", "b", "c", "d"]; + /// v.swap(1, 3); + /// assert!(v == ["a", "d", "c", "b"]); + /// ``` + fn swap(self, a: uint, b: uint); + + + /// Divides one `&mut` into two at an index. + /// + /// The first will contain all indices from `[0, mid)` (excluding + /// the index `mid` itself) and the second will contain all + /// indices from `[mid, len)` (excluding the index `len` itself). + /// + /// Fails if `mid > len`. + /// + /// # Example + /// + /// ```rust + /// let mut v = [1, 2, 3, 4, 5, 6]; + /// + /// // scoped to restrict the lifetime of the borrows + /// { + /// let (left, right) = v.mut_split_at(0); + /// assert!(left == &mut []); + /// assert!(right == &mut [1, 2, 3, 4, 5, 6]); + /// } + /// + /// { + /// let (left, right) = v.mut_split_at(2); + /// assert!(left == &mut [1, 2]); + /// assert!(right == &mut [3, 4, 5, 6]); + /// } + /// + /// { + /// let (left, right) = v.mut_split_at(6); + /// assert!(left == &mut [1, 2, 3, 4, 5, 6]); + /// assert!(right == &mut []); + /// } + /// ``` + fn mut_split_at(self, mid: uint) -> (&'a mut [T], &'a mut [T]); + + /// Reverse the order of elements in a vector, in place. + /// + /// # Example + /// + /// ```rust + /// let mut v = [1, 2, 3]; + /// v.reverse(); + /// assert!(v == [3, 2, 1]); + /// ``` + fn reverse(self); + + /// Returns an unsafe mutable pointer to the element in index + unsafe fn unsafe_mut_ref(self, index: uint) -> &'a mut T; + + /// Return an unsafe mutable pointer to the vector's buffer. + /// + /// The caller must ensure that the vector outlives the pointer this + /// function returns, or else it will end up pointing to garbage. + /// + /// Modifying the vector may cause its buffer to be reallocated, which + /// would also make any pointers to it invalid. + #[inline] + fn as_mut_ptr(self) -> *mut T; + + /// Unsafely sets the element in index to the value. + /// + /// This performs no bounds checks, and it is undefined behaviour + /// if `index` is larger than the length of `self`. However, it + /// does run the destructor at `index`. It is equivalent to + /// `self[index] = val`. + /// + /// # Example + /// + /// ```rust + /// let mut v = ~["foo".to_owned(), "bar".to_owned(), "baz".to_owned()]; + /// + /// unsafe { + /// // `"baz".to_owned()` is deallocated. + /// v.unsafe_set(2, "qux".to_owned()); + /// + /// // Out of bounds: could cause a crash, or overwriting + /// // other data, or something else. + /// // v.unsafe_set(10, "oops".to_owned()); + /// } + /// ``` + unsafe fn unsafe_set(self, index: uint, val: T); + + /// Unchecked vector index assignment. Does not drop the + /// old value and hence is only suitable when the vector + /// is newly allocated. + /// + /// # Example + /// + /// ```rust + /// let mut v = ["foo".to_owned(), "bar".to_owned()]; + /// + /// // memory leak! `"bar".to_owned()` is not deallocated. + /// unsafe { v.init_elem(1, "baz".to_owned()); } + /// ``` + unsafe fn init_elem(self, i: uint, val: T); + + /// Copies raw bytes from `src` to `self`. + /// + /// This does not run destructors on the overwritten elements, and + /// ignores move semantics. `self` and `src` must not + /// overlap. Fails if `self` is shorter than `src`. + unsafe fn copy_memory(self, src: &[T]); +} + +impl<'a,T> MutableVector<'a, T> for &'a mut [T] { + #[inline] + fn as_mut_slice(self) -> &'a mut [T] { self } + + fn mut_slice(self, start: uint, end: uint) -> &'a mut [T] { + assert!(start <= end); + assert!(end <= self.len()); + unsafe { + transmute(Slice { + data: self.as_mut_ptr().offset(start as int) as *T, + len: (end - start) + }) + } + } + + #[inline] + fn mut_slice_from(self, start: uint) -> &'a mut [T] { + let len = self.len(); + self.mut_slice(start, len) + } + + #[inline] + fn mut_slice_to(self, end: uint) -> &'a mut [T] { + self.mut_slice(0, end) + } + + #[inline] + fn mut_split_at(self, mid: uint) -> (&'a mut [T], &'a mut [T]) { + unsafe { + let len = self.len(); + let self2: &'a mut [T] = cast::transmute_copy(&self); + (self.mut_slice(0, mid), self2.mut_slice(mid, len)) + } + } + + #[inline] + fn mut_iter(self) -> MutItems<'a, T> { + unsafe { + let p = self.as_mut_ptr(); + if mem::size_of::() == 0 { + MutItems{ptr: p, + end: (p as uint + self.len()) as *mut T, + marker: marker::ContravariantLifetime::<'a>, + marker2: marker::NoCopy} + } else { + MutItems{ptr: p, + end: p.offset(self.len() as int), + marker: marker::ContravariantLifetime::<'a>, + marker2: marker::NoCopy} + } + } + } + + #[inline] + fn mut_last(self) -> Option<&'a mut T> { + let len = self.len(); + if len == 0 { return None; } + Some(&mut self[len - 1]) + } + + #[inline] + #[deprecated = "replaced by .mut_iter().rev()"] + fn mut_rev_iter(self) -> Rev> { + self.mut_iter().rev() + } + + #[inline] + fn mut_split(self, pred: |&T|: 'a -> bool) -> MutSplits<'a, T> { + MutSplits { v: self, pred: pred, finished: false } + } + + #[inline] + fn mut_chunks(self, chunk_size: uint) -> MutChunks<'a, T> { + assert!(chunk_size > 0); + MutChunks { v: self, chunk_size: chunk_size } + } + + fn mut_shift_ref(&mut self) -> Option<&'a mut T> { + if self.len() == 0 { return None; } + unsafe { + let s: &mut Slice = transmute(self); + // FIXME #13933: this `&` -> `&mut` cast is a little + // dubious + Some(&mut *(raw::shift_ptr(s) as *mut _)) + } + } + + fn mut_pop_ref(&mut self) -> Option<&'a mut T> { + if self.len() == 0 { return None; } + unsafe { + let s: &mut Slice = transmute(self); + // FIXME #13933: this `&` -> `&mut` cast is a little + // dubious + Some(&mut *(raw::pop_ptr(s) as *mut _)) + } + } + + fn swap(self, a: uint, b: uint) { + unsafe { + // Can't take two mutable loans from one vector, so instead just cast + // them to their raw pointers to do the swap + let pa: *mut T = &mut self[a]; + let pb: *mut T = &mut self[b]; + ptr::swap(pa, pb); + } + } + + fn reverse(self) { + let mut i: uint = 0; + let ln = self.len(); + while i < ln / 2 { + self.swap(i, ln - i - 1); + i += 1; + } + } + + #[inline] + unsafe fn unsafe_mut_ref(self, index: uint) -> &'a mut T { + transmute((self.repr().data as *mut T).offset(index as int)) + } + + #[inline] + fn as_mut_ptr(self) -> *mut T { + self.repr().data as *mut T + } + + #[inline] + unsafe fn unsafe_set(self, index: uint, val: T) { + *self.unsafe_mut_ref(index) = val; + } + + #[inline] + unsafe fn init_elem(self, i: uint, val: T) { + mem::move_val_init(&mut (*self.as_mut_ptr().offset(i as int)), val); + } + + #[inline] + unsafe fn copy_memory(self, src: &[T]) { + let len_src = src.len(); + assert!(self.len() >= len_src); + ptr::copy_nonoverlapping_memory(self.as_mut_ptr(), src.as_ptr(), len_src) + } +} + +/// Trait for &[T] where T is Cloneable +pub trait MutableCloneableVector { + /// Copies as many elements from `src` as it can into `self` (the + /// shorter of `self.len()` and `src.len()`). Returns the number + /// of elements copied. + /// + /// # Example + /// + /// ```rust + /// use std::slice::MutableCloneableVector; + /// + /// let mut dst = [0, 0, 0]; + /// let src = [1, 2]; + /// + /// assert!(dst.copy_from(src) == 2); + /// assert!(dst == [1, 2, 0]); + /// + /// let src2 = [3, 4, 5, 6]; + /// assert!(dst.copy_from(src2) == 3); + /// assert!(dst == [3, 4, 5]); + /// ``` + fn copy_from(self, &[T]) -> uint; +} + +impl<'a, T:Clone> MutableCloneableVector for &'a mut [T] { + #[inline] + fn copy_from(self, src: &[T]) -> uint { + for (a, b) in self.mut_iter().zip(src.iter()) { + a.clone_from(b); + } + cmp::min(self.len(), src.len()) + } +} + +/// Unsafe operations +pub mod raw { + use cast::transmute; + use iter::Iterator; + use ptr::RawPtr; + use raw::Slice; + + /** + * Form a slice from a pointer and length (as a number of units, + * not bytes). + */ + #[inline] + pub unsafe fn buf_as_slice(p: *T, len: uint, f: |v: &[T]| -> U) + -> U { + f(transmute(Slice { + data: p, + len: len + })) + } + + /** + * Form a slice from a pointer and length (as a number of units, + * not bytes). + */ + #[inline] + pub unsafe fn mut_buf_as_slice( + p: *mut T, + len: uint, + f: |v: &mut [T]| -> U) + -> U { + f(transmute(Slice { + data: p as *T, + len: len + })) + } + + /** + * Returns a pointer to first element in slice and adjusts + * slice so it no longer contains that element. Fails if + * slice is empty. O(1). + */ + pub unsafe fn shift_ptr(slice: &mut Slice) -> *T { + if slice.len == 0 { fail!("shift on empty slice"); } + let head: *T = slice.data; + slice.data = slice.data.offset(1); + slice.len -= 1; + head + } + + /** + * Returns a pointer to last element in slice and adjusts + * slice so it no longer contains that element. Fails if + * slice is empty. O(1). + */ + pub unsafe fn pop_ptr(slice: &mut Slice) -> *T { + if slice.len == 0 { fail!("pop on empty slice"); } + let tail: *T = slice.data.offset((slice.len - 1) as int); + slice.len -= 1; + tail + } +} + +/// Operations on `[u8]`. +pub mod bytes { + use container::Container; + use ptr; + use slice::MutableVector; + + /// A trait for operations on mutable `[u8]`s. + pub trait MutableByteVector { + /// Sets all bytes of the receiver to the given value. + fn set_memory(self, value: u8); + } + + impl<'a> MutableByteVector for &'a mut [u8] { + #[inline] + fn set_memory(self, value: u8) { + unsafe { ptr::set_memory(self.as_mut_ptr(), value, self.len()) }; + } + } + + /// Copies data from `src` to `dst` + /// + /// `src` and `dst` must not overlap. Fails if the length of `dst` + /// is less than the length of `src`. + #[inline] + pub fn copy_memory(dst: &mut [u8], src: &[u8]) { + // Bound checks are done at .copy_memory. + unsafe { dst.copy_memory(src) } + } +} + +/// Immutable slice iterator +pub struct Items<'a, T> { + ptr: *T, + end: *T, + marker: marker::ContravariantLifetime<'a> +} + +/// Mutable slice iterator +pub struct MutItems<'a, T> { + ptr: *mut T, + end: *mut T, + marker: marker::ContravariantLifetime<'a>, + marker2: marker::NoCopy +} + +macro_rules! iterator { + (struct $name:ident -> $ptr:ty, $elem:ty) => { + impl<'a, T> Iterator<$elem> for $name<'a, T> { + #[inline] + fn next(&mut self) -> Option<$elem> { + // could be implemented with slices, but this avoids bounds checks + unsafe { + if self.ptr == self.end { + None + } else { + let old = self.ptr; + self.ptr = if mem::size_of::() == 0 { + // purposefully don't use 'ptr.offset' because for + // vectors with 0-size elements this would return the + // same pointer. + transmute(self.ptr as uint + 1) + } else { + self.ptr.offset(1) + }; + + Some(transmute(old)) + } + } + } + + #[inline] + fn size_hint(&self) -> (uint, Option) { + let diff = (self.end as uint) - (self.ptr as uint); + let exact = diff / mem::nonzero_size_of::(); + (exact, Some(exact)) + } + } + + impl<'a, T> DoubleEndedIterator<$elem> for $name<'a, T> { + #[inline] + fn next_back(&mut self) -> Option<$elem> { + // could be implemented with slices, but this avoids bounds checks + unsafe { + if self.end == self.ptr { + None + } else { + self.end = if mem::size_of::() == 0 { + // See above for why 'ptr.offset' isn't used + transmute(self.end as uint - 1) + } else { + self.end.offset(-1) + }; + Some(transmute(self.end)) + } + } + } + } + } +} + +impl<'a, T> RandomAccessIterator<&'a T> for Items<'a, T> { + #[inline] + fn indexable(&self) -> uint { + let (exact, _) = self.size_hint(); + exact + } + + #[inline] + fn idx(&mut self, index: uint) -> Option<&'a T> { + unsafe { + if index < self.indexable() { + transmute(self.ptr.offset(index as int)) + } else { + None + } + } + } +} + +iterator!{struct Items -> *T, &'a T} +#[deprecated = "replaced by Rev>"] +pub type RevItems<'a, T> = Rev>; + +impl<'a, T> ExactSize<&'a T> for Items<'a, T> {} +impl<'a, T> ExactSize<&'a mut T> for MutItems<'a, T> {} + +impl<'a, T> Clone for Items<'a, T> { + fn clone(&self) -> Items<'a, T> { *self } +} + +iterator!{struct MutItems -> *mut T, &'a mut T} +#[deprecated = "replaced by Rev>"] +pub type RevMutItems<'a, T> = Rev>; + +/// An iterator over the subslices of the vector which are separated +/// by elements that match `pred`. +pub struct MutSplits<'a, T> { + v: &'a mut [T], + pred: |t: &T|: 'a -> bool, + finished: bool +} + +impl<'a, T> Iterator<&'a mut [T]> for MutSplits<'a, T> { + #[inline] + fn next(&mut self) -> Option<&'a mut [T]> { + if self.finished { return None; } + + let pred = &mut self.pred; + match self.v.iter().position(|x| (*pred)(x)) { + None => { + self.finished = true; + let tmp = mem::replace(&mut self.v, &mut []); + let len = tmp.len(); + let (head, tail) = tmp.mut_split_at(len); + self.v = tail; + Some(head) + } + Some(idx) => { + let tmp = mem::replace(&mut self.v, &mut []); + let (head, tail) = tmp.mut_split_at(idx); + self.v = tail.mut_slice_from(1); + Some(head) + } + } + } + + #[inline] + fn size_hint(&self) -> (uint, Option) { + if self.finished { + (0, Some(0)) + } else { + // if the predicate doesn't match anything, we yield one slice + // if it matches every element, we yield len+1 empty slices. + (1, Some(self.v.len() + 1)) + } + } +} + +impl<'a, T> DoubleEndedIterator<&'a mut [T]> for MutSplits<'a, T> { + #[inline] + fn next_back(&mut self) -> Option<&'a mut [T]> { + if self.finished { return None; } + + let pred = &mut self.pred; + match self.v.iter().rposition(|x| (*pred)(x)) { + None => { + self.finished = true; + let tmp = mem::replace(&mut self.v, &mut []); + Some(tmp) + } + Some(idx) => { + let tmp = mem::replace(&mut self.v, &mut []); + let (head, tail) = tmp.mut_split_at(idx); + self.v = head; + Some(tail.mut_slice_from(1)) + } + } + } +} + +/// An iterator over a vector in (non-overlapping) mutable chunks (`size` elements at a time). When +/// the vector len is not evenly divided by the chunk size, the last slice of the iteration will be +/// the remainder. +pub struct MutChunks<'a, T> { + v: &'a mut [T], + chunk_size: uint +} + +impl<'a, T> Iterator<&'a mut [T]> for MutChunks<'a, T> { + #[inline] + fn next(&mut self) -> Option<&'a mut [T]> { + if self.v.len() == 0 { + None + } else { + let sz = cmp::min(self.v.len(), self.chunk_size); + let tmp = mem::replace(&mut self.v, &mut []); + let (head, tail) = tmp.mut_split_at(sz); + self.v = tail; + Some(head) + } + } + + #[inline] + fn size_hint(&self) -> (uint, Option) { + if self.v.len() == 0 { + (0, Some(0)) + } else { + let (n, rem) = div_rem(self.v.len(), self.chunk_size); + let n = if rem > 0 { n + 1 } else { n }; + (n, Some(n)) + } + } +} + +impl<'a, T> DoubleEndedIterator<&'a mut [T]> for MutChunks<'a, T> { + #[inline] + fn next_back(&mut self) -> Option<&'a mut [T]> { + if self.v.len() == 0 { + None + } else { + let remainder = self.v.len() % self.chunk_size; + let sz = if remainder != 0 { remainder } else { self.chunk_size }; + let tmp = mem::replace(&mut self.v, &mut []); + let tmp_len = tmp.len(); + let (head, tail) = tmp.mut_split_at(tmp_len - sz); + self.v = head; + Some(tail) + } + } +} + +impl<'a, T> Default for &'a [T] { + fn default() -> &'a [T] { &[] } +} + +impl Default for ~[T] { + fn default() -> ~[T] { ~[] } +} diff --git a/src/libcore/str.rs b/src/libcore/str.rs new file mode 100644 index 00000000000..9d9e12d0ad5 --- /dev/null +++ b/src/libcore/str.rs @@ -0,0 +1,1861 @@ +// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +//! String manipulation +//! +//! For more details, see std::str + +use cast::transmute; +use cast; +use char; +use clone::Clone; +use cmp::{Eq, TotalEq}; +use container::Container; +use default::Default; +use iter::{Filter, Map, Iterator}; +use iter::{Rev, DoubleEndedIterator, ExactSize}; +use num::Saturating; +use option::{None, Option, Some}; +use raw::Repr; +use slice::{ImmutableVector, Vector}; +use slice; + +/* +Section: Creating a string +*/ + +/// Converts a vector to a string slice without performing any allocations. +/// +/// Once the slice has been validated as utf-8, it is transmuted in-place and +/// returned as a '&str' instead of a '&[u8]' +/// +/// Returns None if the slice is not utf-8. +pub fn from_utf8<'a>(v: &'a [u8]) -> Option<&'a str> { + if is_utf8(v) { + Some(unsafe { raw::from_utf8(v) }) + } else { None } +} + +/// Something that can be used to compare against a character +pub trait CharEq { + /// Determine if the splitter should split at the given character + fn matches(&mut self, char) -> bool; + /// Indicate if this is only concerned about ASCII characters, + /// which can allow for a faster implementation. + fn only_ascii(&self) -> bool; +} + +impl CharEq for char { + #[inline] + fn matches(&mut self, c: char) -> bool { *self == c } + + #[inline] + fn only_ascii(&self) -> bool { (*self as uint) < 128 } +} + +impl<'a> CharEq for |char|: 'a -> bool { + #[inline] + fn matches(&mut self, c: char) -> bool { (*self)(c) } + + #[inline] + fn only_ascii(&self) -> bool { false } +} + +impl CharEq for extern "Rust" fn(char) -> bool { + #[inline] + fn matches(&mut self, c: char) -> bool { (*self)(c) } + + #[inline] + fn only_ascii(&self) -> bool { false } +} + +impl<'a> CharEq for &'a [char] { + #[inline] + fn matches(&mut self, c: char) -> bool { + self.iter().any(|&mut m| m.matches(c)) + } + + #[inline] + fn only_ascii(&self) -> bool { + self.iter().all(|m| m.only_ascii()) + } +} + +/* +Section: Iterators +*/ + +/// External iterator for a string's characters. +/// Use with the `std::iter` module. +#[deriving(Clone)] +pub struct Chars<'a> { + /// The slice remaining to be iterated + string: &'a str, +} + +impl<'a> Iterator for Chars<'a> { + #[inline] + fn next(&mut self) -> Option { + // Decode the next codepoint, then update + // the slice to be just the remaining part + if self.string.len() != 0 { + let CharRange {ch, next} = self.string.char_range_at(0); + unsafe { + self.string = raw::slice_unchecked(self.string, next, self.string.len()); + } + Some(ch) + } else { + None + } + } + + #[inline] + fn size_hint(&self) -> (uint, Option) { + (self.string.len().saturating_add(3)/4, Some(self.string.len())) + } +} + +impl<'a> DoubleEndedIterator for Chars<'a> { + #[inline] + fn next_back(&mut self) -> Option { + if self.string.len() != 0 { + let CharRange {ch, next} = self.string.char_range_at_reverse(self.string.len()); + unsafe { + self.string = raw::slice_unchecked(self.string, 0, next); + } + Some(ch) + } else { + None + } + } +} + +/// External iterator for a string's characters and their byte offsets. +/// Use with the `std::iter` module. +#[deriving(Clone)] +pub struct CharOffsets<'a> { + /// The original string to be iterated + string: &'a str, + iter: Chars<'a>, +} + +impl<'a> Iterator<(uint, char)> for CharOffsets<'a> { + #[inline] + fn next(&mut self) -> Option<(uint, char)> { + // Compute the byte offset by using the pointer offset between + // the original string slice and the iterator's remaining part + let offset = self.iter.string.as_ptr() as uint - self.string.as_ptr() as uint; + self.iter.next().map(|ch| (offset, ch)) + } + + #[inline] + fn size_hint(&self) -> (uint, Option) { + self.iter.size_hint() + } +} + +impl<'a> DoubleEndedIterator<(uint, char)> for CharOffsets<'a> { + #[inline] + fn next_back(&mut self) -> Option<(uint, char)> { + self.iter.next_back().map(|ch| { + let offset = self.iter.string.len() + + self.iter.string.as_ptr() as uint - self.string.as_ptr() as uint; + (offset, ch) + }) + } +} + +#[deprecated = "replaced by Rev>"] +pub type RevChars<'a> = Rev>; + +#[deprecated = "replaced by Rev>"] +pub type RevCharOffsets<'a> = Rev>; + +/// External iterator for a string's bytes. +/// Use with the `std::iter` module. +pub type Bytes<'a> = + Map<'a, &'a u8, u8, slice::Items<'a, u8>>; + +#[deprecated = "replaced by Rev>"] +pub type RevBytes<'a> = Rev>; + +/// An iterator over the substrings of a string, separated by `sep`. +#[deriving(Clone)] +pub struct CharSplits<'a, Sep> { + /// The slice remaining to be iterated + string: &'a str, + sep: Sep, + /// Whether an empty string at the end is allowed + allow_trailing_empty: bool, + only_ascii: bool, + finished: bool, +} + +#[deprecated = "replaced by Rev>"] +pub type RevCharSplits<'a, Sep> = Rev>; + +/// An iterator over the substrings of a string, separated by `sep`, +/// splitting at most `count` times. +#[deriving(Clone)] +pub struct CharSplitsN<'a, Sep> { + iter: CharSplits<'a, Sep>, + /// The number of splits remaining + count: uint, + invert: bool, +} + +/// An iterator over the words of a string, separated by a sequence of whitespace +pub type Words<'a> = + Filter<'a, &'a str, CharSplits<'a, extern "Rust" fn(char) -> bool>>; + +/// An iterator over the lines of a string, separated by either `\n` or (`\r\n`). +pub type AnyLines<'a> = + Map<'a, &'a str, &'a str, CharSplits<'a, char>>; + +impl<'a, Sep> CharSplits<'a, Sep> { + #[inline] + fn get_end(&mut self) -> Option<&'a str> { + if !self.finished && (self.allow_trailing_empty || self.string.len() > 0) { + self.finished = true; + Some(self.string) + } else { + None + } + } +} + +impl<'a, Sep: CharEq> Iterator<&'a str> for CharSplits<'a, Sep> { + #[inline] + fn next(&mut self) -> Option<&'a str> { + if self.finished { return None } + + let mut next_split = None; + if self.only_ascii { + for (idx, byte) in self.string.bytes().enumerate() { + if self.sep.matches(byte as char) && byte < 128u8 { + next_split = Some((idx, idx + 1)); + break; + } + } + } else { + for (idx, ch) in self.string.char_indices() { + if self.sep.matches(ch) { + next_split = Some((idx, self.string.char_range_at(idx).next)); + break; + } + } + } + match next_split { + Some((a, b)) => unsafe { + let elt = raw::slice_unchecked(self.string, 0, a); + self.string = raw::slice_unchecked(self.string, b, self.string.len()); + Some(elt) + }, + None => self.get_end(), + } + } +} + +impl<'a, Sep: CharEq> DoubleEndedIterator<&'a str> +for CharSplits<'a, Sep> { + #[inline] + fn next_back(&mut self) -> Option<&'a str> { + if self.finished { return None } + + if !self.allow_trailing_empty { + self.allow_trailing_empty = true; + match self.next_back() { + Some(elt) if !elt.is_empty() => return Some(elt), + _ => if self.finished { return None } + } + } + let len = self.string.len(); + let mut next_split = None; + + if self.only_ascii { + for (idx, byte) in self.string.bytes().enumerate().rev() { + if self.sep.matches(byte as char) && byte < 128u8 { + next_split = Some((idx, idx + 1)); + break; + } + } + } else { + for (idx, ch) in self.string.char_indices().rev() { + if self.sep.matches(ch) { + next_split = Some((idx, self.string.char_range_at(idx).next)); + break; + } + } + } + match next_split { + Some((a, b)) => unsafe { + let elt = raw::slice_unchecked(self.string, b, len); + self.string = raw::slice_unchecked(self.string, 0, a); + Some(elt) + }, + None => { self.finished = true; Some(self.string) } + } + } +} + +impl<'a, Sep: CharEq> Iterator<&'a str> for CharSplitsN<'a, Sep> { + #[inline] + fn next(&mut self) -> Option<&'a str> { + if self.count != 0 { + self.count -= 1; + if self.invert { self.iter.next_back() } else { self.iter.next() } + } else { + self.iter.get_end() + } + } +} + +/// An iterator over the start and end indices of the matches of a +/// substring within a larger string +#[deriving(Clone)] +pub struct MatchIndices<'a> { + haystack: &'a str, + needle: &'a str, + position: uint, +} + +/// An iterator over the substrings of a string separated by a given +/// search string +#[deriving(Clone)] +pub struct StrSplits<'a> { + it: MatchIndices<'a>, + last_end: uint, + finished: bool +} + +impl<'a> Iterator<(uint, uint)> for MatchIndices<'a> { + #[inline] + fn next(&mut self) -> Option<(uint, uint)> { + // See Issue #1932 for why this is a naive search + let (h_len, n_len) = (self.haystack.len(), self.needle.len()); + let mut match_start = 0; + let mut match_i = 0; + + while self.position < h_len { + if self.haystack[self.position] == self.needle[match_i] { + if match_i == 0 { match_start = self.position; } + match_i += 1; + self.position += 1; + + if match_i == n_len { + // found a match! + return Some((match_start, self.position)); + } + } else { + // failed match, backtrack + if match_i > 0 { + match_i = 0; + self.position = match_start; + } + self.position += 1; + } + } + None + } +} + +impl<'a> Iterator<&'a str> for StrSplits<'a> { + #[inline] + fn next(&mut self) -> Option<&'a str> { + if self.finished { return None; } + + match self.it.next() { + Some((from, to)) => { + let ret = Some(self.it.haystack.slice(self.last_end, from)); + self.last_end = to; + ret + } + None => { + self.finished = true; + Some(self.it.haystack.slice(self.last_end, self.it.haystack.len())) + } + } + } +} + +/* +Section: Comparing strings +*/ + +// share the implementation of the lang-item vs. non-lang-item +// eq_slice. +#[inline] +fn eq_slice_(a: &str, b: &str) -> bool { + #[allow(ctypes)] + extern { fn memcmp(s1: *i8, s2: *i8, n: uint) -> i32; } + a.len() == b.len() && unsafe { + memcmp(a.as_ptr() as *i8, + b.as_ptr() as *i8, + a.len()) == 0 + } +} + +/// Bytewise slice equality +#[cfg(not(test))] +#[lang="str_eq"] +#[inline] +pub fn eq_slice(a: &str, b: &str) -> bool { + eq_slice_(a, b) +} + +/// Bytewise slice equality +#[cfg(test)] +#[inline] +pub fn eq_slice(a: &str, b: &str) -> bool { + eq_slice_(a, b) +} + +/// Bytewise string equality +#[cfg(not(test))] +#[lang="uniq_str_eq"] +#[inline] +pub fn eq(a: &~str, b: &~str) -> bool { + eq_slice(*a, *b) +} + +#[cfg(test)] +#[inline] +pub fn eq(a: &~str, b: &~str) -> bool { + eq_slice(*a, *b) +} + +/* +Section: Misc +*/ + +/// Walk through `iter` checking that it's a valid UTF-8 sequence, +/// returning `true` in that case, or, if it is invalid, `false` with +/// `iter` reset such that it is pointing at the first byte in the +/// invalid sequence. +#[inline(always)] +fn run_utf8_validation_iterator(iter: &mut slice::Items) -> bool { + loop { + // save the current thing we're pointing at. + let old = *iter; + + // restore the iterator we had at the start of this codepoint. + macro_rules! err ( () => { {*iter = old; return false} }); + macro_rules! next ( () => { + match iter.next() { + Some(a) => *a, + // we needed data, but there was none: error! + None => err!() + } + }); + + let first = match iter.next() { + Some(&b) => b, + // we're at the end of the iterator and a codepoint + // boundary at the same time, so this string is valid. + None => return true + }; + + // ASCII characters are always valid, so only large + // bytes need more examination. + if first >= 128 { + let w = utf8_char_width(first); + let second = next!(); + // 2-byte encoding is for codepoints \u0080 to \u07ff + // first C2 80 last DF BF + // 3-byte encoding is for codepoints \u0800 to \uffff + // first E0 A0 80 last EF BF BF + // excluding surrogates codepoints \ud800 to \udfff + // ED A0 80 to ED BF BF + // 4-byte encoding is for codepoints \u10000 to \u10ffff + // first F0 90 80 80 last F4 8F BF BF + // + // Use the UTF-8 syntax from the RFC + // + // https://tools.ietf.org/html/rfc3629 + // UTF8-1 = %x00-7F + // UTF8-2 = %xC2-DF UTF8-tail + // UTF8-3 = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2( UTF8-tail ) / + // %xED %x80-9F UTF8-tail / %xEE-EF 2( UTF8-tail ) + // UTF8-4 = %xF0 %x90-BF 2( UTF8-tail ) / %xF1-F3 3( UTF8-tail ) / + // %xF4 %x80-8F 2( UTF8-tail ) + match w { + 2 => if second & 192 != TAG_CONT_U8 {err!()}, + 3 => { + match (first, second, next!() & 192) { + (0xE0 , 0xA0 .. 0xBF, TAG_CONT_U8) | + (0xE1 .. 0xEC, 0x80 .. 0xBF, TAG_CONT_U8) | + (0xED , 0x80 .. 0x9F, TAG_CONT_U8) | + (0xEE .. 0xEF, 0x80 .. 0xBF, TAG_CONT_U8) => {} + _ => err!() + } + } + 4 => { + match (first, second, next!() & 192, next!() & 192) { + (0xF0 , 0x90 .. 0xBF, TAG_CONT_U8, TAG_CONT_U8) | + (0xF1 .. 0xF3, 0x80 .. 0xBF, TAG_CONT_U8, TAG_CONT_U8) | + (0xF4 , 0x80 .. 0x8F, TAG_CONT_U8, TAG_CONT_U8) => {} + _ => err!() + } + } + _ => err!() + } + } + } +} + +/// Determines if a vector of bytes contains valid UTF-8. +pub fn is_utf8(v: &[u8]) -> bool { + run_utf8_validation_iterator(&mut v.iter()) +} + +/// Determines if a vector of `u16` contains valid UTF-16 +pub fn is_utf16(v: &[u16]) -> bool { + let mut it = v.iter(); + macro_rules! next ( ($ret:expr) => { + match it.next() { Some(u) => *u, None => return $ret } + } + ) + loop { + let u = next!(true); + + match char::from_u32(u as u32) { + Some(_) => {} + None => { + let u2 = next!(false); + if u < 0xD7FF || u > 0xDBFF || + u2 < 0xDC00 || u2 > 0xDFFF { return false; } + } + } + } +} + +/// An iterator that decodes UTF-16 encoded codepoints from a vector +/// of `u16`s. +#[deriving(Clone)] +pub struct UTF16Items<'a> { + iter: slice::Items<'a, u16> +} +/// The possibilities for values decoded from a `u16` stream. +#[deriving(Eq, TotalEq, Clone)] +pub enum UTF16Item { + /// A valid codepoint. + ScalarValue(char), + /// An invalid surrogate without its pair. + LoneSurrogate(u16) +} + +impl UTF16Item { + /// Convert `self` to a `char`, taking `LoneSurrogate`s to the + /// replacement character (U+FFFD). + #[inline] + pub fn to_char_lossy(&self) -> char { + match *self { + ScalarValue(c) => c, + LoneSurrogate(_) => '\uFFFD' + } + } +} + +impl<'a> Iterator for UTF16Items<'a> { + fn next(&mut self) -> Option { + let u = match self.iter.next() { + Some(u) => *u, + None => return None + }; + + if u < 0xD800 || 0xDFFF < u { + // not a surrogate + Some(ScalarValue(unsafe {cast::transmute(u as u32)})) + } else if u >= 0xDC00 { + // a trailing surrogate + Some(LoneSurrogate(u)) + } else { + // preserve state for rewinding. + let old = self.iter; + + let u2 = match self.iter.next() { + Some(u2) => *u2, + // eof + None => return Some(LoneSurrogate(u)) + }; + if u2 < 0xDC00 || u2 > 0xDFFF { + // not a trailing surrogate so we're not a valid + // surrogate pair, so rewind to redecode u2 next time. + self.iter = old; + return Some(LoneSurrogate(u)) + } + + // all ok, so lets decode it. + let c = ((u - 0xD800) as u32 << 10 | (u2 - 0xDC00) as u32) + 0x1_0000; + Some(ScalarValue(unsafe {cast::transmute(c)})) + } + } + + #[inline] + fn size_hint(&self) -> (uint, Option) { + let (low, high) = self.iter.size_hint(); + // we could be entirely valid surrogates (2 elements per + // char), or entirely non-surrogates (1 element per char) + (low / 2, high) + } +} + +/// Create an iterator over the UTF-16 encoded codepoints in `v`, +/// returning invalid surrogates as `LoneSurrogate`s. +/// +/// # Example +/// +/// ```rust +/// use std::str; +/// use std::str::{ScalarValue, LoneSurrogate}; +/// +/// // 𝄞music +/// let v = [0xD834, 0xDD1E, 0x006d, 0x0075, +/// 0x0073, 0xDD1E, 0x0069, 0x0063, +/// 0xD834]; +/// +/// assert_eq!(str::utf16_items(v).collect::<~[_]>(), +/// ~[ScalarValue('𝄞'), +/// ScalarValue('m'), ScalarValue('u'), ScalarValue('s'), +/// LoneSurrogate(0xDD1E), +/// ScalarValue('i'), ScalarValue('c'), +/// LoneSurrogate(0xD834)]); +/// ``` +pub fn utf16_items<'a>(v: &'a [u16]) -> UTF16Items<'a> { + UTF16Items { iter : v.iter() } +} + +/// Return a slice of `v` ending at (and not including) the first NUL +/// (0). +/// +/// # Example +/// +/// ```rust +/// use std::str; +/// +/// // "abcd" +/// let mut v = ['a' as u16, 'b' as u16, 'c' as u16, 'd' as u16]; +/// // no NULs so no change +/// assert_eq!(str::truncate_utf16_at_nul(v), v.as_slice()); +/// +/// // "ab\0d" +/// v[2] = 0; +/// assert_eq!(str::truncate_utf16_at_nul(v), +/// &['a' as u16, 'b' as u16]); +/// ``` +pub fn truncate_utf16_at_nul<'a>(v: &'a [u16]) -> &'a [u16] { + match v.iter().position(|c| *c == 0) { + // don't include the 0 + Some(i) => v.slice_to(i), + None => v + } +} + +// https://tools.ietf.org/html/rfc3629 +static UTF8_CHAR_WIDTH: [u8, ..256] = [ +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // 0x1F +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // 0x3F +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // 0x5F +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // 0x7F +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 0x9F +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 0xBF +0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, // 0xDF +3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, // 0xEF +4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0, // 0xFF +]; + +/// Given a first byte, determine how many bytes are in this UTF-8 character +#[inline] +pub fn utf8_char_width(b: u8) -> uint { + return UTF8_CHAR_WIDTH[b as uint] as uint; +} + +/// Struct that contains a `char` and the index of the first byte of +/// the next `char` in a string. This can be used as a data structure +/// for iterating over the UTF-8 bytes of a string. +pub struct CharRange { + /// Current `char` + pub ch: char, + /// Index of the first byte of the next `char` + pub next: uint, +} + +// Return the initial codepoint accumulator for the first byte. +// The first byte is special, only want bottom 5 bits for width 2, 4 bits +// for width 3, and 3 bits for width 4 +macro_rules! utf8_first_byte( + ($byte:expr, $width:expr) => (($byte & (0x7F >> $width)) as u32) +) + +// return the value of $ch updated with continuation byte $byte +macro_rules! utf8_acc_cont_byte( + ($ch:expr, $byte:expr) => (($ch << 6) | ($byte & 63u8) as u32) +) + +static TAG_CONT_U8: u8 = 128u8; + +/// Unsafe operations +pub mod raw { + use cast; + use container::Container; + use iter::Iterator; + use ptr::RawPtr; + use raw::Slice; + use slice::{ImmutableVector}; + use str::{is_utf8, StrSlice}; + + /// Converts a slice of bytes to a string slice without checking + /// that the string contains valid UTF-8. + pub unsafe fn from_utf8<'a>(v: &'a [u8]) -> &'a str { + cast::transmute(v) + } + + /// Form a slice from a C string. Unsafe because the caller must ensure the + /// C string has the static lifetime, or else the return value may be + /// invalidated later. + pub unsafe fn c_str_to_static_slice(s: *i8) -> &'static str { + let s = s as *u8; + let mut curr = s; + let mut len = 0u; + while *curr != 0u8 { + len += 1u; + curr = s.offset(len as int); + } + let v = Slice { data: s, len: len }; + assert!(is_utf8(::cast::transmute(v))); + ::cast::transmute(v) + } + + /// Takes a bytewise (not UTF-8) slice from a string. + /// + /// Returns the substring from [`begin`..`end`). + /// + /// # Failure + /// + /// If begin is greater than end. + /// If end is greater than the length of the string. + #[inline] + pub unsafe fn slice_bytes<'a>(s: &'a str, begin: uint, end: uint) -> &'a str { + assert!(begin <= end); + assert!(end <= s.len()); + slice_unchecked(s, begin, end) + } + + /// Takes a bytewise (not UTF-8) slice from a string. + /// + /// Returns the substring from [`begin`..`end`). + /// + /// Caller must check slice boundaries! + #[inline] + pub unsafe fn slice_unchecked<'a>(s: &'a str, begin: uint, end: uint) -> &'a str { + cast::transmute(Slice { + data: s.as_ptr().offset(begin as int), + len: end - begin, + }) + } +} + +/* +Section: Trait implementations +*/ + +#[cfg(not(test))] +#[allow(missing_doc)] +pub mod traits { + use container::Container; + use cmp::{TotalOrd, Ordering, Less, Equal, Greater, Eq, Ord, Equiv, TotalEq}; + use iter::Iterator; + use option::{Some, None}; + use str::{Str, StrSlice, eq_slice}; + + impl<'a> TotalOrd for &'a str { + #[inline] + fn cmp(&self, other: & &'a str) -> Ordering { + for (s_b, o_b) in self.bytes().zip(other.bytes()) { + match s_b.cmp(&o_b) { + Greater => return Greater, + Less => return Less, + Equal => () + } + } + + self.len().cmp(&other.len()) + } + } + + impl TotalOrd for ~str { + #[inline] + fn cmp(&self, other: &~str) -> Ordering { self.as_slice().cmp(&other.as_slice()) } + } + + impl<'a> Eq for &'a str { + #[inline] + fn eq(&self, other: & &'a str) -> bool { + eq_slice((*self), (*other)) + } + #[inline] + fn ne(&self, other: & &'a str) -> bool { !(*self).eq(other) } + } + + impl Eq for ~str { + #[inline] + fn eq(&self, other: &~str) -> bool { + eq_slice((*self), (*other)) + } + } + + impl<'a> TotalEq for &'a str {} + + impl TotalEq for ~str {} + + impl<'a> Ord for &'a str { + #[inline] + fn lt(&self, other: & &'a str) -> bool { self.cmp(other) == Less } + } + + impl Ord for ~str { + #[inline] + fn lt(&self, other: &~str) -> bool { self.cmp(other) == Less } + } + + impl<'a, S: Str> Equiv for &'a str { + #[inline] + fn equiv(&self, other: &S) -> bool { eq_slice(*self, other.as_slice()) } + } + + impl<'a, S: Str> Equiv for ~str { + #[inline] + fn equiv(&self, other: &S) -> bool { eq_slice(*self, other.as_slice()) } + } +} + +#[cfg(test)] +pub mod traits {} + +/// Any string that can be represented as a slice +pub trait Str { + /// Work with `self` as a slice. + fn as_slice<'a>(&'a self) -> &'a str; +} + +impl<'a> Str for &'a str { + #[inline] + fn as_slice<'a>(&'a self) -> &'a str { *self } +} + +impl<'a> Str for ~str { + #[inline] + fn as_slice<'a>(&'a self) -> &'a str { let s: &'a str = *self; s } +} + +impl<'a> Container for &'a str { + #[inline] + fn len(&self) -> uint { + self.repr().len + } +} + +impl Container for ~str { + #[inline] + fn len(&self) -> uint { self.as_slice().len() } +} + +/// Methods for string slices +pub trait StrSlice<'a> { + /// Returns true if one string contains another + /// + /// # Arguments + /// + /// - needle - The string to look for + fn contains<'a>(&self, needle: &'a str) -> bool; + + /// Returns true if a string contains a char. + /// + /// # Arguments + /// + /// - needle - The char to look for + fn contains_char(&self, needle: char) -> bool; + + /// An iterator over the characters of `self`. Note, this iterates + /// over unicode code-points, not unicode graphemes. + /// + /// # Example + /// + /// ```rust + /// let v: ~[char] = "abc åäö".chars().collect(); + /// assert_eq!(v, ~['a', 'b', 'c', ' ', 'å', 'ä', 'ö']); + /// ``` + fn chars(&self) -> Chars<'a>; + + /// Do not use this - it is deprecated. + #[deprecated = "replaced by .chars().rev()"] + fn chars_rev(&self) -> Rev>; + + /// An iterator over the bytes of `self` + fn bytes(&self) -> Bytes<'a>; + + /// Do not use this - it is deprecated. + #[deprecated = "replaced by .bytes().rev()"] + fn bytes_rev(&self) -> Rev>; + + /// An iterator over the characters of `self` and their byte offsets. + fn char_indices(&self) -> CharOffsets<'a>; + + /// Do not use this - it is deprecated. + #[deprecated = "replaced by .char_indices().rev()"] + fn char_indices_rev(&self) -> Rev>; + + /// An iterator over substrings of `self`, separated by characters + /// matched by `sep`. + /// + /// # Example + /// + /// ```rust + /// let v: ~[&str] = "Mary had a little lamb".split(' ').collect(); + /// assert_eq!(v, ~["Mary", "had", "a", "little", "lamb"]); + /// + /// let v: ~[&str] = "abc1def2ghi".split(|c: char| c.is_digit()).collect(); + /// assert_eq!(v, ~["abc", "def", "ghi"]); + /// + /// let v: ~[&str] = "lionXXtigerXleopard".split('X').collect(); + /// assert_eq!(v, ~["lion", "", "tiger", "leopard"]); + /// ``` + fn split(&self, sep: Sep) -> CharSplits<'a, Sep>; + + /// An iterator over substrings of `self`, separated by characters + /// matched by `sep`, restricted to splitting at most `count` + /// times. + /// + /// # Example + /// + /// ```rust + /// let v: ~[&str] = "Mary had a little lambda".splitn(' ', 2).collect(); + /// assert_eq!(v, ~["Mary", "had", "a little lambda"]); + /// + /// let v: ~[&str] = "abc1def2ghi".splitn(|c: char| c.is_digit(), 1).collect(); + /// assert_eq!(v, ~["abc", "def2ghi"]); + /// + /// let v: ~[&str] = "lionXXtigerXleopard".splitn('X', 2).collect(); + /// assert_eq!(v, ~["lion", "", "tigerXleopard"]); + /// ``` + fn splitn(&self, sep: Sep, count: uint) -> CharSplitsN<'a, Sep>; + + /// An iterator over substrings of `self`, separated by characters + /// matched by `sep`. + /// + /// Equivalent to `split`, except that the trailing substring + /// is skipped if empty (terminator semantics). + /// + /// # Example + /// + /// ```rust + /// let v: ~[&str] = "A.B.".split_terminator('.').collect(); + /// assert_eq!(v, ~["A", "B"]); + /// + /// let v: ~[&str] = "A..B..".split_terminator('.').collect(); + /// assert_eq!(v, ~["A", "", "B", ""]); + /// + /// let v: ~[&str] = "Mary had a little lamb".split(' ').rev().collect(); + /// assert_eq!(v, ~["lamb", "little", "a", "had", "Mary"]); + /// + /// let v: ~[&str] = "abc1def2ghi".split(|c: char| c.is_digit()).rev().collect(); + /// assert_eq!(v, ~["ghi", "def", "abc"]); + /// + /// let v: ~[&str] = "lionXXtigerXleopard".split('X').rev().collect(); + /// assert_eq!(v, ~["leopard", "tiger", "", "lion"]); + /// ``` + fn split_terminator(&self, sep: Sep) -> CharSplits<'a, Sep>; + + /// Do not use this - it is deprecated. + #[deprecated = "replaced by .split(sep).rev()"] + fn rsplit(&self, sep: Sep) -> Rev>; + + /// An iterator over substrings of `self`, separated by characters + /// matched by `sep`, starting from the end of the string. + /// Restricted to splitting at most `count` times. + /// + /// # Example + /// + /// ```rust + /// let v: ~[&str] = "Mary had a little lamb".rsplitn(' ', 2).collect(); + /// assert_eq!(v, ~["lamb", "little", "Mary had a"]); + /// + /// let v: ~[&str] = "abc1def2ghi".rsplitn(|c: char| c.is_digit(), 1).collect(); + /// assert_eq!(v, ~["ghi", "abc1def"]); + /// + /// let v: ~[&str] = "lionXXtigerXleopard".rsplitn('X', 2).collect(); + /// assert_eq!(v, ~["leopard", "tiger", "lionX"]); + /// ``` + fn rsplitn(&self, sep: Sep, count: uint) -> CharSplitsN<'a, Sep>; + + /// An iterator over the start and end indices of the disjoint + /// matches of `sep` within `self`. + /// + /// That is, each returned value `(start, end)` satisfies + /// `self.slice(start, end) == sep`. For matches of `sep` within + /// `self` that overlap, only the indicies corresponding to the + /// first match are returned. + /// + /// # Example + /// + /// ```rust + /// let v: ~[(uint, uint)] = "abcXXXabcYYYabc".match_indices("abc").collect(); + /// assert_eq!(v, ~[(0,3), (6,9), (12,15)]); + /// + /// let v: ~[(uint, uint)] = "1abcabc2".match_indices("abc").collect(); + /// assert_eq!(v, ~[(1,4), (4,7)]); + /// + /// let v: ~[(uint, uint)] = "ababa".match_indices("aba").collect(); + /// assert_eq!(v, ~[(0, 3)]); // only the first `aba` + /// ``` + fn match_indices(&self, sep: &'a str) -> MatchIndices<'a>; + + /// An iterator over the substrings of `self` separated by `sep`. + /// + /// # Example + /// + /// ```rust + /// let v: ~[&str] = "abcXXXabcYYYabc".split_str("abc").collect(); + /// assert_eq!(v, ~["", "XXX", "YYY", ""]); + /// + /// let v: ~[&str] = "1abcabc2".split_str("abc").collect(); + /// assert_eq!(v, ~["1", "", "2"]); + /// ``` + fn split_str(&self, &'a str) -> StrSplits<'a>; + + /// An iterator over the lines of a string (subsequences separated + /// by `\n`). This does not include the empty string after a + /// trailing `\n`. + /// + /// # Example + /// + /// ```rust + /// let four_lines = "foo\nbar\n\nbaz\n"; + /// let v: ~[&str] = four_lines.lines().collect(); + /// assert_eq!(v, ~["foo", "bar", "", "baz"]); + /// ``` + fn lines(&self) -> CharSplits<'a, char>; + + /// An iterator over the lines of a string, separated by either + /// `\n` or `\r\n`. As with `.lines()`, this does not include an + /// empty trailing line. + /// + /// # Example + /// + /// ```rust + /// let four_lines = "foo\r\nbar\n\r\nbaz\n"; + /// let v: ~[&str] = four_lines.lines_any().collect(); + /// assert_eq!(v, ~["foo", "bar", "", "baz"]); + /// ``` + fn lines_any(&self) -> AnyLines<'a>; + + /// An iterator over the words of a string (subsequences separated + /// by any sequence of whitespace). Sequences of whitespace are + /// collapsed, so empty "words" are not included. + /// + /// # Example + /// + /// ```rust + /// let some_words = " Mary had\ta little \n\t lamb"; + /// let v: ~[&str] = some_words.words().collect(); + /// assert_eq!(v, ~["Mary", "had", "a", "little", "lamb"]); + /// ``` + fn words(&self) -> Words<'a>; + + /// Returns true if the string contains only whitespace. + /// + /// Whitespace characters are determined by `char::is_whitespace`. + /// + /// # Example + /// + /// ```rust + /// assert!(" \t\n".is_whitespace()); + /// assert!("".is_whitespace()); + /// + /// assert!( !"abc".is_whitespace()); + /// ``` + fn is_whitespace(&self) -> bool; + + /// Returns true if the string contains only alphanumeric code + /// points. + /// + /// Alphanumeric characters are determined by `char::is_alphanumeric`. + /// + /// # Example + /// + /// ```rust + /// assert!("Löwe老虎Léopard123".is_alphanumeric()); + /// assert!("".is_alphanumeric()); + /// + /// assert!( !" &*~".is_alphanumeric()); + /// ``` + fn is_alphanumeric(&self) -> bool; + + /// Returns the number of Unicode code points (`char`) that a + /// string holds. + /// + /// This does not perform any normalization, and is `O(n)`, since + /// UTF-8 is a variable width encoding of code points. + /// + /// *Warning*: The number of code points in a string does not directly + /// correspond to the number of visible characters or width of the + /// visible text due to composing characters, and double- and + /// zero-width ones. + /// + /// See also `.len()` for the byte length. + /// + /// # Example + /// + /// ```rust + /// // composed forms of `ö` and `é` + /// let c = "Löwe 老虎 Léopard"; // German, Simplified Chinese, French + /// // decomposed forms of `ö` and `é` + /// let d = "Lo\u0308we 老虎 Le\u0301opard"; + /// + /// assert_eq!(c.char_len(), 15); + /// assert_eq!(d.char_len(), 17); + /// + /// assert_eq!(c.len(), 21); + /// assert_eq!(d.len(), 23); + /// + /// // the two strings *look* the same + /// println!("{}", c); + /// println!("{}", d); + /// ``` + fn char_len(&self) -> uint; + + /// Returns a slice of the given string from the byte range + /// [`begin`..`end`). + /// + /// This operation is `O(1)`. + /// + /// Fails when `begin` and `end` do not point to valid characters + /// or point beyond the last character of the string. + /// + /// See also `slice_to` and `slice_from` for slicing prefixes and + /// suffixes of strings, and `slice_chars` for slicing based on + /// code point counts. + /// + /// # Example + /// + /// ```rust + /// let s = "Löwe 老虎 Léopard"; + /// assert_eq!(s.slice(0, 1), "L"); + /// + /// assert_eq!(s.slice(1, 9), "öwe 老"); + /// + /// // these will fail: + /// // byte 2 lies within `ö`: + /// // s.slice(2, 3); + /// + /// // byte 8 lies within `老` + /// // s.slice(1, 8); + /// + /// // byte 100 is outside the string + /// // s.slice(3, 100); + /// ``` + fn slice(&self, begin: uint, end: uint) -> &'a str; + + /// Returns a slice of the string from `begin` to its end. + /// + /// Equivalent to `self.slice(begin, self.len())`. + /// + /// Fails when `begin` does not point to a valid character, or is + /// out of bounds. + /// + /// See also `slice`, `slice_to` and `slice_chars`. + fn slice_from(&self, begin: uint) -> &'a str; + + /// Returns a slice of the string from the beginning to byte + /// `end`. + /// + /// Equivalent to `self.slice(0, end)`. + /// + /// Fails when `end` does not point to a valid character, or is + /// out of bounds. + /// + /// See also `slice`, `slice_from` and `slice_chars`. + fn slice_to(&self, end: uint) -> &'a str; + + /// Returns a slice of the string from the character range + /// [`begin`..`end`). + /// + /// That is, start at the `begin`-th code point of the string and + /// continue to the `end`-th code point. This does not detect or + /// handle edge cases such as leaving a combining character as the + /// first code point of the string. + /// + /// Due to the design of UTF-8, this operation is `O(end)`. + /// See `slice`, `slice_to` and `slice_from` for `O(1)` + /// variants that use byte indices rather than code point + /// indices. + /// + /// Fails if `begin` > `end` or the either `begin` or `end` are + /// beyond the last character of the string. + /// + /// # Example + /// + /// ```rust + /// let s = "Löwe 老虎 Léopard"; + /// assert_eq!(s.slice_chars(0, 4), "Löwe"); + /// assert_eq!(s.slice_chars(5, 7), "老虎"); + /// ``` + fn slice_chars(&self, begin: uint, end: uint) -> &'a str; + + /// Returns true if `needle` is a prefix of the string. + fn starts_with(&self, needle: &str) -> bool; + + /// Returns true if `needle` is a suffix of the string. + fn ends_with(&self, needle: &str) -> bool; + + /// Returns a string with leading and trailing whitespace removed. + fn trim(&self) -> &'a str; + + /// Returns a string with leading whitespace removed. + fn trim_left(&self) -> &'a str; + + /// Returns a string with trailing whitespace removed. + fn trim_right(&self) -> &'a str; + + /// Returns a string with characters that match `to_trim` removed. + /// + /// # Arguments + /// + /// * to_trim - a character matcher + /// + /// # Example + /// + /// ```rust + /// assert_eq!("11foo1bar11".trim_chars('1'), "foo1bar") + /// assert_eq!("12foo1bar12".trim_chars(&['1', '2']), "foo1bar") + /// assert_eq!("123foo1bar123".trim_chars(|c: char| c.is_digit()), "foo1bar") + /// ``` + fn trim_chars(&self, to_trim: C) -> &'a str; + + /// Returns a string with leading `chars_to_trim` removed. + /// + /// # Arguments + /// + /// * to_trim - a character matcher + /// + /// # Example + /// + /// ```rust + /// assert_eq!("11foo1bar11".trim_left_chars('1'), "foo1bar11") + /// assert_eq!("12foo1bar12".trim_left_chars(&['1', '2']), "foo1bar12") + /// assert_eq!("123foo1bar123".trim_left_chars(|c: char| c.is_digit()), "foo1bar123") + /// ``` + fn trim_left_chars(&self, to_trim: C) -> &'a str; + + /// Returns a string with trailing `chars_to_trim` removed. + /// + /// # Arguments + /// + /// * to_trim - a character matcher + /// + /// # Example + /// + /// ```rust + /// assert_eq!("11foo1bar11".trim_right_chars('1'), "11foo1bar") + /// assert_eq!("12foo1bar12".trim_right_chars(&['1', '2']), "12foo1bar") + /// assert_eq!("123foo1bar123".trim_right_chars(|c: char| c.is_digit()), "123foo1bar") + /// ``` + fn trim_right_chars(&self, to_trim: C) -> &'a str; + + /// Check that `index`-th byte lies at the start and/or end of a + /// UTF-8 code point sequence. + /// + /// The start and end of the string (when `index == self.len()`) + /// are considered to be boundaries. + /// + /// Fails if `index` is greater than `self.len()`. + /// + /// # Example + /// + /// ```rust + /// let s = "Löwe 老虎 Léopard"; + /// assert!(s.is_char_boundary(0)); + /// // start of `老` + /// assert!(s.is_char_boundary(6)); + /// assert!(s.is_char_boundary(s.len())); + /// + /// // second byte of `ö` + /// assert!(!s.is_char_boundary(2)); + /// + /// // third byte of `老` + /// assert!(!s.is_char_boundary(8)); + /// ``` + fn is_char_boundary(&self, index: uint) -> bool; + + /// Pluck a character out of a string and return the index of the next + /// character. + /// + /// This function can be used to iterate over the unicode characters of a + /// string. + /// + /// # Example + /// + /// This example manually iterate through the characters of a + /// string; this should normally by done by `.chars()` or + /// `.char_indices`. + /// + /// ```rust + /// use std::str::CharRange; + /// + /// let s = "中华Việt Nam"; + /// let mut i = 0u; + /// while i < s.len() { + /// let CharRange {ch, next} = s.char_range_at(i); + /// println!("{}: {}", i, ch); + /// i = next; + /// } + /// ``` + /// + /// ## Output + /// + /// ```ignore + /// 0: 中 + /// 3: 华 + /// 6: V + /// 7: i + /// 8: ệ + /// 11: t + /// 12: + /// 13: N + /// 14: a + /// 15: m + /// ``` + /// + /// # Arguments + /// + /// * s - The string + /// * i - The byte offset of the char to extract + /// + /// # Return value + /// + /// A record {ch: char, next: uint} containing the char value and the byte + /// index of the next unicode character. + /// + /// # Failure + /// + /// If `i` is greater than or equal to the length of the string. + /// If `i` is not the index of the beginning of a valid UTF-8 character. + fn char_range_at(&self, start: uint) -> CharRange; + + /// Given a byte position and a str, return the previous char and its position. + /// + /// This function can be used to iterate over a unicode string in reverse. + /// + /// Returns 0 for next index if called on start index 0. + fn char_range_at_reverse(&self, start: uint) -> CharRange; + + /// Plucks the character starting at the `i`th byte of a string + fn char_at(&self, i: uint) -> char; + + /// Plucks the character ending at the `i`th byte of a string + fn char_at_reverse(&self, i: uint) -> char; + + /// Work with the byte buffer of a string as a byte slice. + fn as_bytes(&self) -> &'a [u8]; + + /// Returns the byte index of the first character of `self` that + /// matches `search`. + /// + /// # Return value + /// + /// `Some` containing the byte index of the last matching character + /// or `None` if there is no match + /// + /// # Example + /// + /// ```rust + /// let s = "Löwe 老虎 Léopard"; + /// + /// assert_eq!(s.find('L'), Some(0)); + /// assert_eq!(s.find('é'), Some(14)); + /// + /// // the first space + /// assert_eq!(s.find(|c: char| c.is_whitespace()), Some(5)); + /// + /// // neither are found + /// assert_eq!(s.find(&['1', '2']), None); + /// ``` + fn find(&self, search: C) -> Option; + + /// Returns the byte index of the last character of `self` that + /// matches `search`. + /// + /// # Return value + /// + /// `Some` containing the byte index of the last matching character + /// or `None` if there is no match. + /// + /// # Example + /// + /// ```rust + /// let s = "Löwe 老虎 Léopard"; + /// + /// assert_eq!(s.rfind('L'), Some(13)); + /// assert_eq!(s.rfind('é'), Some(14)); + /// + /// // the second space + /// assert_eq!(s.rfind(|c: char| c.is_whitespace()), Some(12)); + /// + /// // searches for an occurrence of either `1` or `2`, but neither are found + /// assert_eq!(s.rfind(&['1', '2']), None); + /// ``` + fn rfind(&self, search: C) -> Option; + + /// Returns the byte index of the first matching substring + /// + /// # Arguments + /// + /// * `needle` - The string to search for + /// + /// # Return value + /// + /// `Some` containing the byte index of the first matching substring + /// or `None` if there is no match. + /// + /// # Example + /// + /// ```rust + /// let s = "Löwe 老虎 Léopard"; + /// + /// assert_eq!(s.find_str("老虎 L"), Some(6)); + /// assert_eq!(s.find_str("muffin man"), None); + /// ``` + fn find_str(&self, &str) -> Option; + + /// Retrieves the first character from a string slice and returns + /// it. This does not allocate a new string; instead, it returns a + /// slice that point one character beyond the character that was + /// shifted. If the string does not contain any characters, + /// a tuple of None and an empty string is returned instead. + /// + /// # Example + /// + /// ```rust + /// let s = "Löwe 老虎 Léopard"; + /// let (c, s1) = s.slice_shift_char(); + /// assert_eq!(c, Some('L')); + /// assert_eq!(s1, "öwe 老虎 Léopard"); + /// + /// let (c, s2) = s1.slice_shift_char(); + /// assert_eq!(c, Some('ö')); + /// assert_eq!(s2, "we 老虎 Léopard"); + /// ``` + fn slice_shift_char(&self) -> (Option, &'a str); + + /// Returns the byte offset of an inner slice relative to an enclosing outer slice. + /// + /// Fails if `inner` is not a direct slice contained within self. + /// + /// # Example + /// + /// ```rust + /// let string = "a\nb\nc"; + /// let lines: ~[&str] = string.lines().collect(); + /// + /// assert!(string.subslice_offset(lines[0]) == 0); // &"a" + /// assert!(string.subslice_offset(lines[1]) == 2); // &"b" + /// assert!(string.subslice_offset(lines[2]) == 4); // &"c" + /// ``` + fn subslice_offset(&self, inner: &str) -> uint; + + /// Return an unsafe pointer to the strings buffer. + /// + /// The caller must ensure that the string outlives this pointer, + /// and that it is not reallocated (e.g. by pushing to the + /// string). + fn as_ptr(&self) -> *u8; +} + +impl<'a> StrSlice<'a> for &'a str { + #[inline] + fn contains<'a>(&self, needle: &'a str) -> bool { + self.find_str(needle).is_some() + } + + #[inline] + fn contains_char(&self, needle: char) -> bool { + self.find(needle).is_some() + } + + #[inline] + fn chars(&self) -> Chars<'a> { + Chars{string: *self} + } + + #[inline] + #[deprecated = "replaced by .chars().rev()"] + fn chars_rev(&self) -> RevChars<'a> { + self.chars().rev() + } + + #[inline] + fn bytes(&self) -> Bytes<'a> { + self.as_bytes().iter().map(|&b| b) + } + + #[inline] + #[deprecated = "replaced by .bytes().rev()"] + fn bytes_rev(&self) -> RevBytes<'a> { + self.bytes().rev() + } + + #[inline] + fn char_indices(&self) -> CharOffsets<'a> { + CharOffsets{string: *self, iter: self.chars()} + } + + #[inline] + #[deprecated = "replaced by .char_indices().rev()"] + fn char_indices_rev(&self) -> RevCharOffsets<'a> { + self.char_indices().rev() + } + + #[inline] + fn split(&self, sep: Sep) -> CharSplits<'a, Sep> { + CharSplits { + string: *self, + only_ascii: sep.only_ascii(), + sep: sep, + allow_trailing_empty: true, + finished: false, + } + } + + #[inline] + fn splitn(&self, sep: Sep, count: uint) + -> CharSplitsN<'a, Sep> { + CharSplitsN { + iter: self.split(sep), + count: count, + invert: false, + } + } + + #[inline] + fn split_terminator(&self, sep: Sep) + -> CharSplits<'a, Sep> { + CharSplits { + allow_trailing_empty: false, + ..self.split(sep) + } + } + + #[inline] + #[deprecated = "replaced by .split(sep).rev()"] + fn rsplit(&self, sep: Sep) -> RevCharSplits<'a, Sep> { + self.split(sep).rev() + } + + #[inline] + fn rsplitn(&self, sep: Sep, count: uint) + -> CharSplitsN<'a, Sep> { + CharSplitsN { + iter: self.split(sep), + count: count, + invert: true, + } + } + + #[inline] + fn match_indices(&self, sep: &'a str) -> MatchIndices<'a> { + assert!(!sep.is_empty()) + MatchIndices { + haystack: *self, + needle: sep, + position: 0 + } + } + + #[inline] + fn split_str(&self, sep: &'a str) -> StrSplits<'a> { + StrSplits { + it: self.match_indices(sep), + last_end: 0, + finished: false + } + } + + #[inline] + fn lines(&self) -> CharSplits<'a, char> { + self.split_terminator('\n') + } + + fn lines_any(&self) -> AnyLines<'a> { + self.lines().map(|line| { + let l = line.len(); + if l > 0 && line[l - 1] == '\r' as u8 { line.slice(0, l - 1) } + else { line } + }) + } + + #[inline] + fn words(&self) -> Words<'a> { + self.split(char::is_whitespace).filter(|s| !s.is_empty()) + } + + #[inline] + fn is_whitespace(&self) -> bool { self.chars().all(char::is_whitespace) } + + #[inline] + fn is_alphanumeric(&self) -> bool { self.chars().all(char::is_alphanumeric) } + + #[inline] + fn char_len(&self) -> uint { self.chars().len() } + + #[inline] + fn slice(&self, begin: uint, end: uint) -> &'a str { + assert!(self.is_char_boundary(begin) && self.is_char_boundary(end)); + unsafe { raw::slice_bytes(*self, begin, end) } + } + + #[inline] + fn slice_from(&self, begin: uint) -> &'a str { + self.slice(begin, self.len()) + } + + #[inline] + fn slice_to(&self, end: uint) -> &'a str { + assert!(self.is_char_boundary(end)); + unsafe { raw::slice_bytes(*self, 0, end) } + } + + fn slice_chars(&self, begin: uint, end: uint) -> &'a str { + assert!(begin <= end); + let mut count = 0; + let mut begin_byte = None; + let mut end_byte = None; + + // This could be even more efficient by not decoding, + // only finding the char boundaries + for (idx, _) in self.char_indices() { + if count == begin { begin_byte = Some(idx); } + if count == end { end_byte = Some(idx); break; } + count += 1; + } + if begin_byte.is_none() && count == begin { begin_byte = Some(self.len()) } + if end_byte.is_none() && count == end { end_byte = Some(self.len()) } + + match (begin_byte, end_byte) { + (None, _) => fail!("slice_chars: `begin` is beyond end of string"), + (_, None) => fail!("slice_chars: `end` is beyond end of string"), + (Some(a), Some(b)) => unsafe { raw::slice_bytes(*self, a, b) } + } + } + + #[inline] + fn starts_with<'a>(&self, needle: &'a str) -> bool { + let n = needle.len(); + self.len() >= n && needle.as_bytes() == self.as_bytes().slice_to(n) + } + + #[inline] + fn ends_with(&self, needle: &str) -> bool { + let (m, n) = (self.len(), needle.len()); + m >= n && needle.as_bytes() == self.as_bytes().slice_from(m - n) + } + + #[inline] + fn trim(&self) -> &'a str { + self.trim_left().trim_right() + } + + #[inline] + fn trim_left(&self) -> &'a str { + self.trim_left_chars(char::is_whitespace) + } + + #[inline] + fn trim_right(&self) -> &'a str { + self.trim_right_chars(char::is_whitespace) + } + + #[inline] + fn trim_chars(&self, mut to_trim: C) -> &'a str { + let cur = match self.find(|c: char| !to_trim.matches(c)) { + None => "", + Some(i) => unsafe { raw::slice_bytes(*self, i, self.len()) } + }; + match cur.rfind(|c: char| !to_trim.matches(c)) { + None => "", + Some(i) => { + let right = cur.char_range_at(i).next; + unsafe { raw::slice_bytes(cur, 0, right) } + } + } + } + + #[inline] + fn trim_left_chars(&self, mut to_trim: C) -> &'a str { + match self.find(|c: char| !to_trim.matches(c)) { + None => "", + Some(first) => unsafe { raw::slice_bytes(*self, first, self.len()) } + } + } + + #[inline] + fn trim_right_chars(&self, mut to_trim: C) -> &'a str { + match self.rfind(|c: char| !to_trim.matches(c)) { + None => "", + Some(last) => { + let next = self.char_range_at(last).next; + unsafe { raw::slice_bytes(*self, 0u, next) } + } + } + } + + #[inline] + fn is_char_boundary(&self, index: uint) -> bool { + if index == self.len() { return true; } + let b = self[index]; + return b < 128u8 || b >= 192u8; + } + + #[inline] + fn char_range_at(&self, i: uint) -> CharRange { + if self[i] < 128u8 { + return CharRange {ch: self[i] as char, next: i + 1 }; + } + + // Multibyte case is a fn to allow char_range_at to inline cleanly + fn multibyte_char_range_at(s: &str, i: uint) -> CharRange { + let mut val = s[i] as u32; + let w = UTF8_CHAR_WIDTH[val as uint] as uint; + assert!((w != 0)); + + val = utf8_first_byte!(val, w); + val = utf8_acc_cont_byte!(val, s[i + 1]); + if w > 2 { val = utf8_acc_cont_byte!(val, s[i + 2]); } + if w > 3 { val = utf8_acc_cont_byte!(val, s[i + 3]); } + + return CharRange {ch: unsafe { transmute(val) }, next: i + w}; + } + + return multibyte_char_range_at(*self, i); + } + + #[inline] + fn char_range_at_reverse(&self, start: uint) -> CharRange { + let mut prev = start; + + prev = prev.saturating_sub(1); + if self[prev] < 128 { return CharRange{ch: self[prev] as char, next: prev} } + + // Multibyte case is a fn to allow char_range_at_reverse to inline cleanly + fn multibyte_char_range_at_reverse(s: &str, mut i: uint) -> CharRange { + // while there is a previous byte == 10...... + while i > 0 && s[i] & 192u8 == TAG_CONT_U8 { + i -= 1u; + } + + let mut val = s[i] as u32; + let w = UTF8_CHAR_WIDTH[val as uint] as uint; + assert!((w != 0)); + + val = utf8_first_byte!(val, w); + val = utf8_acc_cont_byte!(val, s[i + 1]); + if w > 2 { val = utf8_acc_cont_byte!(val, s[i + 2]); } + if w > 3 { val = utf8_acc_cont_byte!(val, s[i + 3]); } + + return CharRange {ch: unsafe { transmute(val) }, next: i}; + } + + return multibyte_char_range_at_reverse(*self, prev); + } + + #[inline] + fn char_at(&self, i: uint) -> char { + self.char_range_at(i).ch + } + + #[inline] + fn char_at_reverse(&self, i: uint) -> char { + self.char_range_at_reverse(i).ch + } + + #[inline] + fn as_bytes(&self) -> &'a [u8] { + unsafe { cast::transmute(*self) } + } + + fn find(&self, mut search: C) -> Option { + if search.only_ascii() { + self.bytes().position(|b| search.matches(b as char)) + } else { + for (index, c) in self.char_indices() { + if search.matches(c) { return Some(index); } + } + None + } + } + + fn rfind(&self, mut search: C) -> Option { + if search.only_ascii() { + self.bytes().rposition(|b| search.matches(b as char)) + } else { + for (index, c) in self.char_indices().rev() { + if search.matches(c) { return Some(index); } + } + None + } + } + + fn find_str(&self, needle: &str) -> Option { + if needle.is_empty() { + Some(0) + } else { + self.match_indices(needle) + .next() + .map(|(start, _end)| start) + } + } + + #[inline] + fn slice_shift_char(&self) -> (Option, &'a str) { + if self.is_empty() { + return (None, *self); + } else { + let CharRange {ch, next} = self.char_range_at(0u); + let next_s = unsafe { raw::slice_bytes(*self, next, self.len()) }; + return (Some(ch), next_s); + } + } + + fn subslice_offset(&self, inner: &str) -> uint { + let a_start = self.as_ptr() as uint; + let a_end = a_start + self.len(); + let b_start = inner.as_ptr() as uint; + let b_end = b_start + inner.len(); + + assert!(a_start <= b_start); + assert!(b_end <= a_end); + b_start - a_start + } + + #[inline] + fn as_ptr(&self) -> *u8 { + self.repr().data + } +} + +impl<'a> Default for &'a str { + fn default() -> &'a str { "" } +} diff --git a/src/libstd/tuple.rs b/src/libcore/tuple.rs similarity index 95% rename from src/libstd/tuple.rs rename to src/libcore/tuple.rs index cf63ea43fdb..b73d85489a3 100644 --- a/src/libstd/tuple.rs +++ b/src/libcore/tuple.rs @@ -15,8 +15,6 @@ use clone::Clone; #[cfg(not(test))] use cmp::*; #[cfg(not(test))] use default::Default; -use fmt; -use result::{Ok, Err}; // macro for implementing n-ary tuple functions and operations macro_rules! tuple_impls { @@ -112,12 +110,6 @@ macro_rules! tuple_impls { ($({ let x: $T = Default::default(); x},)+) } } - - impl<$($T: fmt::Show),+> fmt::Show for ($($T,)+) { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - write_tuple!(f.buf, $(self.$refN()),+) - } - } )+ } } @@ -144,18 +136,6 @@ macro_rules! lexical_cmp { ($a:expr, $b:expr) => { ($a).cmp($b) }; } -macro_rules! write_tuple { - ($buf:expr, $x:expr) => ( - write!($buf, "({},)", *$x) - ); - ($buf:expr, $hd:expr, $($tl:expr),+) => ({ - try!(write!($buf, "(")); - try!(write!($buf, "{}", *$hd)); - $(try!(write!($buf, ", {}", *$tl));)+ - write!($buf, ")") - }); -} - tuple_impls! { Tuple1 { (val0, ref0, mut0) -> A { (a) => a } @@ -266,7 +246,7 @@ mod tests { use super::*; use clone::Clone; use cmp::*; - use str::StrSlice; + use realstd::str::StrAllocating; #[test] fn test_clone() { diff --git a/src/libstd/ty.rs b/src/libcore/ty.rs similarity index 100% rename from src/libstd/ty.rs rename to src/libcore/ty.rs diff --git a/src/libcore/unicode.rs b/src/libcore/unicode.rs new file mode 100644 index 00000000000..db016ad8807 --- /dev/null +++ b/src/libcore/unicode.rs @@ -0,0 +1,5009 @@ +// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +// The following code was generated by "src/etc/unicode.py" + +#![allow(missing_doc, non_uppercase_statics)] + +fn bsearch_range_table(c: char, r: &'static [(char,char)]) -> bool { + use cmp::{Equal, Less, Greater}; + use slice::ImmutableVector; + use option::None; + r.bsearch(|&(lo,hi)| { + if lo <= c && c <= hi { Equal } + else if hi < c { Less } + else { Greater } + }) != None +} + +pub mod general_category { + static Cc_table : &'static [(char,char)] = &[ + ('\x00', '\x1f'), ('\x7f', '\x9f') + ]; + + pub fn Cc(c: char) -> bool { + super::bsearch_range_table(c, Cc_table) + } + + static Nd_table : &'static [(char,char)] = &[ + ('\x30', '\x39'), ('\u0660', '\u0669'), + ('\u06f0', '\u06f9'), ('\u07c0', '\u07c9'), + ('\u0966', '\u096f'), ('\u09e6', '\u09ef'), + ('\u0a66', '\u0a6f'), ('\u0ae6', '\u0aef'), + ('\u0b66', '\u0b6f'), ('\u0be6', '\u0bef'), + ('\u0c66', '\u0c6f'), ('\u0ce6', '\u0cef'), + ('\u0d66', '\u0d6f'), ('\u0e50', '\u0e59'), + ('\u0ed0', '\u0ed9'), ('\u0f20', '\u0f29'), + ('\u1040', '\u1049'), ('\u1090', '\u1099'), + ('\u17e0', '\u17e9'), ('\u1810', '\u1819'), + ('\u1946', '\u194f'), ('\u19d0', '\u19d9'), + ('\u1a80', '\u1a99'), ('\u1b50', '\u1b59'), + ('\u1bb0', '\u1bb9'), ('\u1c40', '\u1c49'), + ('\u1c50', '\u1c59'), ('\ua620', '\ua629'), + ('\ua8d0', '\ua8d9'), ('\ua900', '\ua909'), + ('\ua9d0', '\ua9d9'), ('\uaa50', '\uaa59'), + ('\uabf0', '\uabf9'), ('\uff10', '\uff19'), + ('\U000104a0', '\U000104a9'), ('\U00011066', '\U0001106f'), + ('\U000110f0', '\U000110f9'), ('\U00011136', '\U0001113f'), + ('\U000111d0', '\U000111d9'), ('\U000116c0', '\U000116c9'), + ('\U0001d7ce', '\U0001d7ff') + ]; + + pub fn Nd(c: char) -> bool { + super::bsearch_range_table(c, Nd_table) + } + + static Nl_table : &'static [(char,char)] = &[ + ('\u16ee', '\u16f0'), ('\u2160', '\u2182'), + ('\u2185', '\u2188'), ('\u3007', '\u3007'), + ('\u3021', '\u3029'), ('\u3038', '\u303a'), + ('\ua6e6', '\ua6ef'), ('\U00010140', '\U00010174'), + ('\U00010341', '\U00010341'), ('\U0001034a', '\U0001034a'), + ('\U000103d1', '\U000103d5'), ('\U00012400', '\U00012462') + ]; + + pub fn Nl(c: char) -> bool { + super::bsearch_range_table(c, Nl_table) + } + + static No_table : &'static [(char,char)] = &[ + ('\xb2', '\xb3'), ('\xb9', '\xb9'), + ('\xbc', '\xbe'), ('\u09f4', '\u09f9'), + ('\u0b72', '\u0b77'), ('\u0bf0', '\u0bf2'), + ('\u0c78', '\u0c7e'), ('\u0d70', '\u0d75'), + ('\u0f2a', '\u0f33'), ('\u1369', '\u137c'), + ('\u17f0', '\u17f9'), ('\u19da', '\u19da'), + ('\u2070', '\u2070'), ('\u2074', '\u2079'), + ('\u2080', '\u2089'), ('\u2150', '\u215f'), + ('\u2189', '\u2189'), ('\u2460', '\u249b'), + ('\u24ea', '\u24ff'), ('\u2776', '\u2793'), + ('\u2cfd', '\u2cfd'), ('\u3192', '\u3195'), + ('\u3220', '\u3229'), ('\u3248', '\u324f'), + ('\u3251', '\u325f'), ('\u3280', '\u3289'), + ('\u32b1', '\u32bf'), ('\ua830', '\ua835'), + ('\U00010107', '\U00010133'), ('\U00010175', '\U00010178'), + ('\U0001018a', '\U0001018a'), ('\U00010320', '\U00010323'), + ('\U00010858', '\U0001085f'), ('\U00010916', '\U0001091b'), + ('\U00010a40', '\U00010a47'), ('\U00010a7d', '\U00010a7e'), + ('\U00010b58', '\U00010b5f'), ('\U00010b78', '\U00010b7f'), + ('\U00010e60', '\U00010e7e'), ('\U00011052', '\U00011065'), + ('\U0001d360', '\U0001d371'), ('\U0001f100', '\U0001f10a') + ]; + + pub fn No(c: char) -> bool { + super::bsearch_range_table(c, No_table) + } + +} +pub mod decompose { + use option::Option; + use option::{Some, None}; + use slice::ImmutableVector; + + fn bsearch_table(c: char, r: &'static [(char, &'static [char])]) -> Option<&'static [char]> { + use cmp::{Equal, Less, Greater}; + match r.bsearch(|&(val, _)| { + if c == val { Equal } + else if val < c { Less } + else { Greater } + }) { + Some(idx) => { + let (_, result) = r[idx]; + Some(result) + } + None => None + } + } + + + + // Canonical decompositions + static canonical_table : &'static [(char, &'static [char])] = &[ + ('\xc0', &['\x41', '\u0300']), ('\xc1', &['\x41', '\u0301']), ('\xc2', &['\x41', '\u0302']), + ('\xc3', &['\x41', '\u0303']), ('\xc4', &['\x41', '\u0308']), ('\xc5', &['\x41', '\u030a']), + ('\xc7', &['\x43', '\u0327']), ('\xc8', &['\x45', '\u0300']), ('\xc9', &['\x45', '\u0301']), + ('\xca', &['\x45', '\u0302']), ('\xcb', &['\x45', '\u0308']), ('\xcc', &['\x49', '\u0300']), + ('\xcd', &['\x49', '\u0301']), ('\xce', &['\x49', '\u0302']), ('\xcf', &['\x49', '\u0308']), + ('\xd1', &['\x4e', '\u0303']), ('\xd2', &['\x4f', '\u0300']), ('\xd3', &['\x4f', '\u0301']), + ('\xd4', &['\x4f', '\u0302']), ('\xd5', &['\x4f', '\u0303']), ('\xd6', &['\x4f', '\u0308']), + ('\xd9', &['\x55', '\u0300']), ('\xda', &['\x55', '\u0301']), ('\xdb', &['\x55', '\u0302']), + ('\xdc', &['\x55', '\u0308']), ('\xdd', &['\x59', '\u0301']), ('\xe0', &['\x61', '\u0300']), + ('\xe1', &['\x61', '\u0301']), ('\xe2', &['\x61', '\u0302']), ('\xe3', &['\x61', '\u0303']), + ('\xe4', &['\x61', '\u0308']), ('\xe5', &['\x61', '\u030a']), ('\xe7', &['\x63', '\u0327']), + ('\xe8', &['\x65', '\u0300']), ('\xe9', &['\x65', '\u0301']), ('\xea', &['\x65', '\u0302']), + ('\xeb', &['\x65', '\u0308']), ('\xec', &['\x69', '\u0300']), ('\xed', &['\x69', '\u0301']), + ('\xee', &['\x69', '\u0302']), ('\xef', &['\x69', '\u0308']), ('\xf1', &['\x6e', '\u0303']), + ('\xf2', &['\x6f', '\u0300']), ('\xf3', &['\x6f', '\u0301']), ('\xf4', &['\x6f', '\u0302']), + ('\xf5', &['\x6f', '\u0303']), ('\xf6', &['\x6f', '\u0308']), ('\xf9', &['\x75', '\u0300']), + ('\xfa', &['\x75', '\u0301']), ('\xfb', &['\x75', '\u0302']), ('\xfc', &['\x75', '\u0308']), + ('\xfd', &['\x79', '\u0301']), ('\xff', &['\x79', '\u0308']), ('\u0100', &['\x41', + '\u0304']), ('\u0101', &['\x61', '\u0304']), ('\u0102', &['\x41', '\u0306']), ('\u0103', + &['\x61', '\u0306']), ('\u0104', &['\x41', '\u0328']), ('\u0105', &['\x61', '\u0328']), + ('\u0106', &['\x43', '\u0301']), ('\u0107', &['\x63', '\u0301']), ('\u0108', &['\x43', + '\u0302']), ('\u0109', &['\x63', '\u0302']), ('\u010a', &['\x43', '\u0307']), ('\u010b', + &['\x63', '\u0307']), ('\u010c', &['\x43', '\u030c']), ('\u010d', &['\x63', '\u030c']), + ('\u010e', &['\x44', '\u030c']), ('\u010f', &['\x64', '\u030c']), ('\u0112', &['\x45', + '\u0304']), ('\u0113', &['\x65', '\u0304']), ('\u0114', &['\x45', '\u0306']), ('\u0115', + &['\x65', '\u0306']), ('\u0116', &['\x45', '\u0307']), ('\u0117', &['\x65', '\u0307']), + ('\u0118', &['\x45', '\u0328']), ('\u0119', &['\x65', '\u0328']), ('\u011a', &['\x45', + '\u030c']), ('\u011b', &['\x65', '\u030c']), ('\u011c', &['\x47', '\u0302']), ('\u011d', + &['\x67', '\u0302']), ('\u011e', &['\x47', '\u0306']), ('\u011f', &['\x67', '\u0306']), + ('\u0120', &['\x47', '\u0307']), ('\u0121', &['\x67', '\u0307']), ('\u0122', &['\x47', + '\u0327']), ('\u0123', &['\x67', '\u0327']), ('\u0124', &['\x48', '\u0302']), ('\u0125', + &['\x68', '\u0302']), ('\u0128', &['\x49', '\u0303']), ('\u0129', &['\x69', '\u0303']), + ('\u012a', &['\x49', '\u0304']), ('\u012b', &['\x69', '\u0304']), ('\u012c', &['\x49', + '\u0306']), ('\u012d', &['\x69', '\u0306']), ('\u012e', &['\x49', '\u0328']), ('\u012f', + &['\x69', '\u0328']), ('\u0130', &['\x49', '\u0307']), ('\u0134', &['\x4a', '\u0302']), + ('\u0135', &['\x6a', '\u0302']), ('\u0136', &['\x4b', '\u0327']), ('\u0137', &['\x6b', + '\u0327']), ('\u0139', &['\x4c', '\u0301']), ('\u013a', &['\x6c', '\u0301']), ('\u013b', + &['\x4c', '\u0327']), ('\u013c', &['\x6c', '\u0327']), ('\u013d', &['\x4c', '\u030c']), + ('\u013e', &['\x6c', '\u030c']), ('\u0143', &['\x4e', '\u0301']), ('\u0144', &['\x6e', + '\u0301']), ('\u0145', &['\x4e', '\u0327']), ('\u0146', &['\x6e', '\u0327']), ('\u0147', + &['\x4e', '\u030c']), ('\u0148', &['\x6e', '\u030c']), ('\u014c', &['\x4f', '\u0304']), + ('\u014d', &['\x6f', '\u0304']), ('\u014e', &['\x4f', '\u0306']), ('\u014f', &['\x6f', + '\u0306']), ('\u0150', &['\x4f', '\u030b']), ('\u0151', &['\x6f', '\u030b']), ('\u0154', + &['\x52', '\u0301']), ('\u0155', &['\x72', '\u0301']), ('\u0156', &['\x52', '\u0327']), + ('\u0157', &['\x72', '\u0327']), ('\u0158', &['\x52', '\u030c']), ('\u0159', &['\x72', + '\u030c']), ('\u015a', &['\x53', '\u0301']), ('\u015b', &['\x73', '\u0301']), ('\u015c', + &['\x53', '\u0302']), ('\u015d', &['\x73', '\u0302']), ('\u015e', &['\x53', '\u0327']), + ('\u015f', &['\x73', '\u0327']), ('\u0160', &['\x53', '\u030c']), ('\u0161', &['\x73', + '\u030c']), ('\u0162', &['\x54', '\u0327']), ('\u0163', &['\x74', '\u0327']), ('\u0164', + &['\x54', '\u030c']), ('\u0165', &['\x74', '\u030c']), ('\u0168', &['\x55', '\u0303']), + ('\u0169', &['\x75', '\u0303']), ('\u016a', &['\x55', '\u0304']), ('\u016b', &['\x75', + '\u0304']), ('\u016c', &['\x55', '\u0306']), ('\u016d', &['\x75', '\u0306']), ('\u016e', + &['\x55', '\u030a']), ('\u016f', &['\x75', '\u030a']), ('\u0170', &['\x55', '\u030b']), + ('\u0171', &['\x75', '\u030b']), ('\u0172', &['\x55', '\u0328']), ('\u0173', &['\x75', + '\u0328']), ('\u0174', &['\x57', '\u0302']), ('\u0175', &['\x77', '\u0302']), ('\u0176', + &['\x59', '\u0302']), ('\u0177', &['\x79', '\u0302']), ('\u0178', &['\x59', '\u0308']), + ('\u0179', &['\x5a', '\u0301']), ('\u017a', &['\x7a', '\u0301']), ('\u017b', &['\x5a', + '\u0307']), ('\u017c', &['\x7a', '\u0307']), ('\u017d', &['\x5a', '\u030c']), ('\u017e', + &['\x7a', '\u030c']), ('\u01a0', &['\x4f', '\u031b']), ('\u01a1', &['\x6f', '\u031b']), + ('\u01af', &['\x55', '\u031b']), ('\u01b0', &['\x75', '\u031b']), ('\u01cd', &['\x41', + '\u030c']), ('\u01ce', &['\x61', '\u030c']), ('\u01cf', &['\x49', '\u030c']), ('\u01d0', + &['\x69', '\u030c']), ('\u01d1', &['\x4f', '\u030c']), ('\u01d2', &['\x6f', '\u030c']), + ('\u01d3', &['\x55', '\u030c']), ('\u01d4', &['\x75', '\u030c']), ('\u01d5', &['\xdc', + '\u0304']), ('\u01d6', &['\xfc', '\u0304']), ('\u01d7', &['\xdc', '\u0301']), ('\u01d8', + &['\xfc', '\u0301']), ('\u01d9', &['\xdc', '\u030c']), ('\u01da', &['\xfc', '\u030c']), + ('\u01db', &['\xdc', '\u0300']), ('\u01dc', &['\xfc', '\u0300']), ('\u01de', &['\xc4', + '\u0304']), ('\u01df', &['\xe4', '\u0304']), ('\u01e0', &['\u0226', '\u0304']), ('\u01e1', + &['\u0227', '\u0304']), ('\u01e2', &['\xc6', '\u0304']), ('\u01e3', &['\xe6', '\u0304']), + ('\u01e6', &['\x47', '\u030c']), ('\u01e7', &['\x67', '\u030c']), ('\u01e8', &['\x4b', + '\u030c']), ('\u01e9', &['\x6b', '\u030c']), ('\u01ea', &['\x4f', '\u0328']), ('\u01eb', + &['\x6f', '\u0328']), ('\u01ec', &['\u01ea', '\u0304']), ('\u01ed', &['\u01eb', '\u0304']), + ('\u01ee', &['\u01b7', '\u030c']), ('\u01ef', &['\u0292', '\u030c']), ('\u01f0', &['\x6a', + '\u030c']), ('\u01f4', &['\x47', '\u0301']), ('\u01f5', &['\x67', '\u0301']), ('\u01f8', + &['\x4e', '\u0300']), ('\u01f9', &['\x6e', '\u0300']), ('\u01fa', &['\xc5', '\u0301']), + ('\u01fb', &['\xe5', '\u0301']), ('\u01fc', &['\xc6', '\u0301']), ('\u01fd', &['\xe6', + '\u0301']), ('\u01fe', &['\xd8', '\u0301']), ('\u01ff', &['\xf8', '\u0301']), ('\u0200', + &['\x41', '\u030f']), ('\u0201', &['\x61', '\u030f']), ('\u0202', &['\x41', '\u0311']), + ('\u0203', &['\x61', '\u0311']), ('\u0204', &['\x45', '\u030f']), ('\u0205', &['\x65', + '\u030f']), ('\u0206', &['\x45', '\u0311']), ('\u0207', &['\x65', '\u0311']), ('\u0208', + &['\x49', '\u030f']), ('\u0209', &['\x69', '\u030f']), ('\u020a', &['\x49', '\u0311']), + ('\u020b', &['\x69', '\u0311']), ('\u020c', &['\x4f', '\u030f']), ('\u020d', &['\x6f', + '\u030f']), ('\u020e', &['\x4f', '\u0311']), ('\u020f', &['\x6f', '\u0311']), ('\u0210', + &['\x52', '\u030f']), ('\u0211', &['\x72', '\u030f']), ('\u0212', &['\x52', '\u0311']), + ('\u0213', &['\x72', '\u0311']), ('\u0214', &['\x55', '\u030f']), ('\u0215', &['\x75', + '\u030f']), ('\u0216', &['\x55', '\u0311']), ('\u0217', &['\x75', '\u0311']), ('\u0218', + &['\x53', '\u0326']), ('\u0219', &['\x73', '\u0326']), ('\u021a', &['\x54', '\u0326']), + ('\u021b', &['\x74', '\u0326']), ('\u021e', &['\x48', '\u030c']), ('\u021f', &['\x68', + '\u030c']), ('\u0226', &['\x41', '\u0307']), ('\u0227', &['\x61', '\u0307']), ('\u0228', + &['\x45', '\u0327']), ('\u0229', &['\x65', '\u0327']), ('\u022a', &['\xd6', '\u0304']), + ('\u022b', &['\xf6', '\u0304']), ('\u022c', &['\xd5', '\u0304']), ('\u022d', &['\xf5', + '\u0304']), ('\u022e', &['\x4f', '\u0307']), ('\u022f', &['\x6f', '\u0307']), ('\u0230', + &['\u022e', '\u0304']), ('\u0231', &['\u022f', '\u0304']), ('\u0232', &['\x59', '\u0304']), + ('\u0233', &['\x79', '\u0304']), ('\u0340', &['\u0300']), ('\u0341', &['\u0301']), + ('\u0343', &['\u0313']), ('\u0344', &['\u0308', '\u0301']), ('\u0374', &['\u02b9']), + ('\u037e', &['\x3b']), ('\u0385', &['\xa8', '\u0301']), ('\u0386', &['\u0391', '\u0301']), + ('\u0387', &['\xb7']), ('\u0388', &['\u0395', '\u0301']), ('\u0389', &['\u0397', '\u0301']), + ('\u038a', &['\u0399', '\u0301']), ('\u038c', &['\u039f', '\u0301']), ('\u038e', &['\u03a5', + '\u0301']), ('\u038f', &['\u03a9', '\u0301']), ('\u0390', &['\u03ca', '\u0301']), ('\u03aa', + &['\u0399', '\u0308']), ('\u03ab', &['\u03a5', '\u0308']), ('\u03ac', &['\u03b1', + '\u0301']), ('\u03ad', &['\u03b5', '\u0301']), ('\u03ae', &['\u03b7', '\u0301']), ('\u03af', + &['\u03b9', '\u0301']), ('\u03b0', &['\u03cb', '\u0301']), ('\u03ca', &['\u03b9', + '\u0308']), ('\u03cb', &['\u03c5', '\u0308']), ('\u03cc', &['\u03bf', '\u0301']), ('\u03cd', + &['\u03c5', '\u0301']), ('\u03ce', &['\u03c9', '\u0301']), ('\u03d3', &['\u03d2', + '\u0301']), ('\u03d4', &['\u03d2', '\u0308']), ('\u0400', &['\u0415', '\u0300']), ('\u0401', + &['\u0415', '\u0308']), ('\u0403', &['\u0413', '\u0301']), ('\u0407', &['\u0406', + '\u0308']), ('\u040c', &['\u041a', '\u0301']), ('\u040d', &['\u0418', '\u0300']), ('\u040e', + &['\u0423', '\u0306']), ('\u0419', &['\u0418', '\u0306']), ('\u0439', &['\u0438', + '\u0306']), ('\u0450', &['\u0435', '\u0300']), ('\u0451', &['\u0435', '\u0308']), ('\u0453', + &['\u0433', '\u0301']), ('\u0457', &['\u0456', '\u0308']), ('\u045c', &['\u043a', + '\u0301']), ('\u045d', &['\u0438', '\u0300']), ('\u045e', &['\u0443', '\u0306']), ('\u0476', + &['\u0474', '\u030f']), ('\u0477', &['\u0475', '\u030f']), ('\u04c1', &['\u0416', + '\u0306']), ('\u04c2', &['\u0436', '\u0306']), ('\u04d0', &['\u0410', '\u0306']), ('\u04d1', + &['\u0430', '\u0306']), ('\u04d2', &['\u0410', '\u0308']), ('\u04d3', &['\u0430', + '\u0308']), ('\u04d6', &['\u0415', '\u0306']), ('\u04d7', &['\u0435', '\u0306']), ('\u04da', + &['\u04d8', '\u0308']), ('\u04db', &['\u04d9', '\u0308']), ('\u04dc', &['\u0416', + '\u0308']), ('\u04dd', &['\u0436', '\u0308']), ('\u04de', &['\u0417', '\u0308']), ('\u04df', + &['\u0437', '\u0308']), ('\u04e2', &['\u0418', '\u0304']), ('\u04e3', &['\u0438', + '\u0304']), ('\u04e4', &['\u0418', '\u0308']), ('\u04e5', &['\u0438', '\u0308']), ('\u04e6', + &['\u041e', '\u0308']), ('\u04e7', &['\u043e', '\u0308']), ('\u04ea', &['\u04e8', + '\u0308']), ('\u04eb', &['\u04e9', '\u0308']), ('\u04ec', &['\u042d', '\u0308']), ('\u04ed', + &['\u044d', '\u0308']), ('\u04ee', &['\u0423', '\u0304']), ('\u04ef', &['\u0443', + '\u0304']), ('\u04f0', &['\u0423', '\u0308']), ('\u04f1', &['\u0443', '\u0308']), ('\u04f2', + &['\u0423', '\u030b']), ('\u04f3', &['\u0443', '\u030b']), ('\u04f4', &['\u0427', + '\u0308']), ('\u04f5', &['\u0447', '\u0308']), ('\u04f8', &['\u042b', '\u0308']), ('\u04f9', + &['\u044b', '\u0308']), ('\u0622', &['\u0627', '\u0653']), ('\u0623', &['\u0627', + '\u0654']), ('\u0624', &['\u0648', '\u0654']), ('\u0625', &['\u0627', '\u0655']), ('\u0626', + &['\u064a', '\u0654']), ('\u06c0', &['\u06d5', '\u0654']), ('\u06c2', &['\u06c1', + '\u0654']), ('\u06d3', &['\u06d2', '\u0654']), ('\u0929', &['\u0928', '\u093c']), ('\u0931', + &['\u0930', '\u093c']), ('\u0934', &['\u0933', '\u093c']), ('\u0958', &['\u0915', + '\u093c']), ('\u0959', &['\u0916', '\u093c']), ('\u095a', &['\u0917', '\u093c']), ('\u095b', + &['\u091c', '\u093c']), ('\u095c', &['\u0921', '\u093c']), ('\u095d', &['\u0922', + '\u093c']), ('\u095e', &['\u092b', '\u093c']), ('\u095f', &['\u092f', '\u093c']), ('\u09cb', + &['\u09c7', '\u09be']), ('\u09cc', &['\u09c7', '\u09d7']), ('\u09dc', &['\u09a1', + '\u09bc']), ('\u09dd', &['\u09a2', '\u09bc']), ('\u09df', &['\u09af', '\u09bc']), ('\u0a33', + &['\u0a32', '\u0a3c']), ('\u0a36', &['\u0a38', '\u0a3c']), ('\u0a59', &['\u0a16', + '\u0a3c']), ('\u0a5a', &['\u0a17', '\u0a3c']), ('\u0a5b', &['\u0a1c', '\u0a3c']), ('\u0a5e', + &['\u0a2b', '\u0a3c']), ('\u0b48', &['\u0b47', '\u0b56']), ('\u0b4b', &['\u0b47', + '\u0b3e']), ('\u0b4c', &['\u0b47', '\u0b57']), ('\u0b5c', &['\u0b21', '\u0b3c']), ('\u0b5d', + &['\u0b22', '\u0b3c']), ('\u0b94', &['\u0b92', '\u0bd7']), ('\u0bca', &['\u0bc6', + '\u0bbe']), ('\u0bcb', &['\u0bc7', '\u0bbe']), ('\u0bcc', &['\u0bc6', '\u0bd7']), ('\u0c48', + &['\u0c46', '\u0c56']), ('\u0cc0', &['\u0cbf', '\u0cd5']), ('\u0cc7', &['\u0cc6', + '\u0cd5']), ('\u0cc8', &['\u0cc6', '\u0cd6']), ('\u0cca', &['\u0cc6', '\u0cc2']), ('\u0ccb', + &['\u0cca', '\u0cd5']), ('\u0d4a', &['\u0d46', '\u0d3e']), ('\u0d4b', &['\u0d47', + '\u0d3e']), ('\u0d4c', &['\u0d46', '\u0d57']), ('\u0dda', &['\u0dd9', '\u0dca']), ('\u0ddc', + &['\u0dd9', '\u0dcf']), ('\u0ddd', &['\u0ddc', '\u0dca']), ('\u0dde', &['\u0dd9', + '\u0ddf']), ('\u0f43', &['\u0f42', '\u0fb7']), ('\u0f4d', &['\u0f4c', '\u0fb7']), ('\u0f52', + &['\u0f51', '\u0fb7']), ('\u0f57', &['\u0f56', '\u0fb7']), ('\u0f5c', &['\u0f5b', + '\u0fb7']), ('\u0f69', &['\u0f40', '\u0fb5']), ('\u0f73', &['\u0f71', '\u0f72']), ('\u0f75', + &['\u0f71', '\u0f74']), ('\u0f76', &['\u0fb2', '\u0f80']), ('\u0f78', &['\u0fb3', + '\u0f80']), ('\u0f81', &['\u0f71', '\u0f80']), ('\u0f93', &['\u0f92', '\u0fb7']), ('\u0f9d', + &['\u0f9c', '\u0fb7']), ('\u0fa2', &['\u0fa1', '\u0fb7']), ('\u0fa7', &['\u0fa6', + '\u0fb7']), ('\u0fac', &['\u0fab', '\u0fb7']), ('\u0fb9', &['\u0f90', '\u0fb5']), ('\u1026', + &['\u1025', '\u102e']), ('\u1b06', &['\u1b05', '\u1b35']), ('\u1b08', &['\u1b07', + '\u1b35']), ('\u1b0a', &['\u1b09', '\u1b35']), ('\u1b0c', &['\u1b0b', '\u1b35']), ('\u1b0e', + &['\u1b0d', '\u1b35']), ('\u1b12', &['\u1b11', '\u1b35']), ('\u1b3b', &['\u1b3a', + '\u1b35']), ('\u1b3d', &['\u1b3c', '\u1b35']), ('\u1b40', &['\u1b3e', '\u1b35']), ('\u1b41', + &['\u1b3f', '\u1b35']), ('\u1b43', &['\u1b42', '\u1b35']), ('\u1e00', &['\x41', '\u0325']), + ('\u1e01', &['\x61', '\u0325']), ('\u1e02', &['\x42', '\u0307']), ('\u1e03', &['\x62', + '\u0307']), ('\u1e04', &['\x42', '\u0323']), ('\u1e05', &['\x62', '\u0323']), ('\u1e06', + &['\x42', '\u0331']), ('\u1e07', &['\x62', '\u0331']), ('\u1e08', &['\xc7', '\u0301']), + ('\u1e09', &['\xe7', '\u0301']), ('\u1e0a', &['\x44', '\u0307']), ('\u1e0b', &['\x64', + '\u0307']), ('\u1e0c', &['\x44', '\u0323']), ('\u1e0d', &['\x64', '\u0323']), ('\u1e0e', + &['\x44', '\u0331']), ('\u1e0f', &['\x64', '\u0331']), ('\u1e10', &['\x44', '\u0327']), + ('\u1e11', &['\x64', '\u0327']), ('\u1e12', &['\x44', '\u032d']), ('\u1e13', &['\x64', + '\u032d']), ('\u1e14', &['\u0112', '\u0300']), ('\u1e15', &['\u0113', '\u0300']), ('\u1e16', + &['\u0112', '\u0301']), ('\u1e17', &['\u0113', '\u0301']), ('\u1e18', &['\x45', '\u032d']), + ('\u1e19', &['\x65', '\u032d']), ('\u1e1a', &['\x45', '\u0330']), ('\u1e1b', &['\x65', + '\u0330']), ('\u1e1c', &['\u0228', '\u0306']), ('\u1e1d', &['\u0229', '\u0306']), ('\u1e1e', + &['\x46', '\u0307']), ('\u1e1f', &['\x66', '\u0307']), ('\u1e20', &['\x47', '\u0304']), + ('\u1e21', &['\x67', '\u0304']), ('\u1e22', &['\x48', '\u0307']), ('\u1e23', &['\x68', + '\u0307']), ('\u1e24', &['\x48', '\u0323']), ('\u1e25', &['\x68', '\u0323']), ('\u1e26', + &['\x48', '\u0308']), ('\u1e27', &['\x68', '\u0308']), ('\u1e28', &['\x48', '\u0327']), + ('\u1e29', &['\x68', '\u0327']), ('\u1e2a', &['\x48', '\u032e']), ('\u1e2b', &['\x68', + '\u032e']), ('\u1e2c', &['\x49', '\u0330']), ('\u1e2d', &['\x69', '\u0330']), ('\u1e2e', + &['\xcf', '\u0301']), ('\u1e2f', &['\xef', '\u0301']), ('\u1e30', &['\x4b', '\u0301']), + ('\u1e31', &['\x6b', '\u0301']), ('\u1e32', &['\x4b', '\u0323']), ('\u1e33', &['\x6b', + '\u0323']), ('\u1e34', &['\x4b', '\u0331']), ('\u1e35', &['\x6b', '\u0331']), ('\u1e36', + &['\x4c', '\u0323']), ('\u1e37', &['\x6c', '\u0323']), ('\u1e38', &['\u1e36', '\u0304']), + ('\u1e39', &['\u1e37', '\u0304']), ('\u1e3a', &['\x4c', '\u0331']), ('\u1e3b', &['\x6c', + '\u0331']), ('\u1e3c', &['\x4c', '\u032d']), ('\u1e3d', &['\x6c', '\u032d']), ('\u1e3e', + &['\x4d', '\u0301']), ('\u1e3f', &['\x6d', '\u0301']), ('\u1e40', &['\x4d', '\u0307']), + ('\u1e41', &['\x6d', '\u0307']), ('\u1e42', &['\x4d', '\u0323']), ('\u1e43', &['\x6d', + '\u0323']), ('\u1e44', &['\x4e', '\u0307']), ('\u1e45', &['\x6e', '\u0307']), ('\u1e46', + &['\x4e', '\u0323']), ('\u1e47', &['\x6e', '\u0323']), ('\u1e48', &['\x4e', '\u0331']), + ('\u1e49', &['\x6e', '\u0331']), ('\u1e4a', &['\x4e', '\u032d']), ('\u1e4b', &['\x6e', + '\u032d']), ('\u1e4c', &['\xd5', '\u0301']), ('\u1e4d', &['\xf5', '\u0301']), ('\u1e4e', + &['\xd5', '\u0308']), ('\u1e4f', &['\xf5', '\u0308']), ('\u1e50', &['\u014c', '\u0300']), + ('\u1e51', &['\u014d', '\u0300']), ('\u1e52', &['\u014c', '\u0301']), ('\u1e53', &['\u014d', + '\u0301']), ('\u1e54', &['\x50', '\u0301']), ('\u1e55', &['\x70', '\u0301']), ('\u1e56', + &['\x50', '\u0307']), ('\u1e57', &['\x70', '\u0307']), ('\u1e58', &['\x52', '\u0307']), + ('\u1e59', &['\x72', '\u0307']), ('\u1e5a', &['\x52', '\u0323']), ('\u1e5b', &['\x72', + '\u0323']), ('\u1e5c', &['\u1e5a', '\u0304']), ('\u1e5d', &['\u1e5b', '\u0304']), ('\u1e5e', + &['\x52', '\u0331']), ('\u1e5f', &['\x72', '\u0331']), ('\u1e60', &['\x53', '\u0307']), + ('\u1e61', &['\x73', '\u0307']), ('\u1e62', &['\x53', '\u0323']), ('\u1e63', &['\x73', + '\u0323']), ('\u1e64', &['\u015a', '\u0307']), ('\u1e65', &['\u015b', '\u0307']), ('\u1e66', + &['\u0160', '\u0307']), ('\u1e67', &['\u0161', '\u0307']), ('\u1e68', &['\u1e62', + '\u0307']), ('\u1e69', &['\u1e63', '\u0307']), ('\u1e6a', &['\x54', '\u0307']), ('\u1e6b', + &['\x74', '\u0307']), ('\u1e6c', &['\x54', '\u0323']), ('\u1e6d', &['\x74', '\u0323']), + ('\u1e6e', &['\x54', '\u0331']), ('\u1e6f', &['\x74', '\u0331']), ('\u1e70', &['\x54', + '\u032d']), ('\u1e71', &['\x74', '\u032d']), ('\u1e72', &['\x55', '\u0324']), ('\u1e73', + &['\x75', '\u0324']), ('\u1e74', &['\x55', '\u0330']), ('\u1e75', &['\x75', '\u0330']), + ('\u1e76', &['\x55', '\u032d']), ('\u1e77', &['\x75', '\u032d']), ('\u1e78', &['\u0168', + '\u0301']), ('\u1e79', &['\u0169', '\u0301']), ('\u1e7a', &['\u016a', '\u0308']), ('\u1e7b', + &['\u016b', '\u0308']), ('\u1e7c', &['\x56', '\u0303']), ('\u1e7d', &['\x76', '\u0303']), + ('\u1e7e', &['\x56', '\u0323']), ('\u1e7f', &['\x76', '\u0323']), ('\u1e80', &['\x57', + '\u0300']), ('\u1e81', &['\x77', '\u0300']), ('\u1e82', &['\x57', '\u0301']), ('\u1e83', + &['\x77', '\u0301']), ('\u1e84', &['\x57', '\u0308']), ('\u1e85', &['\x77', '\u0308']), + ('\u1e86', &['\x57', '\u0307']), ('\u1e87', &['\x77', '\u0307']), ('\u1e88', &['\x57', + '\u0323']), ('\u1e89', &['\x77', '\u0323']), ('\u1e8a', &['\x58', '\u0307']), ('\u1e8b', + &['\x78', '\u0307']), ('\u1e8c', &['\x58', '\u0308']), ('\u1e8d', &['\x78', '\u0308']), + ('\u1e8e', &['\x59', '\u0307']), ('\u1e8f', &['\x79', '\u0307']), ('\u1e90', &['\x5a', + '\u0302']), ('\u1e91', &['\x7a', '\u0302']), ('\u1e92', &['\x5a', '\u0323']), ('\u1e93', + &['\x7a', '\u0323']), ('\u1e94', &['\x5a', '\u0331']), ('\u1e95', &['\x7a', '\u0331']), + ('\u1e96', &['\x68', '\u0331']), ('\u1e97', &['\x74', '\u0308']), ('\u1e98', &['\x77', + '\u030a']), ('\u1e99', &['\x79', '\u030a']), ('\u1e9b', &['\u017f', '\u0307']), ('\u1ea0', + &['\x41', '\u0323']), ('\u1ea1', &['\x61', '\u0323']), ('\u1ea2', &['\x41', '\u0309']), + ('\u1ea3', &['\x61', '\u0309']), ('\u1ea4', &['\xc2', '\u0301']), ('\u1ea5', &['\xe2', + '\u0301']), ('\u1ea6', &['\xc2', '\u0300']), ('\u1ea7', &['\xe2', '\u0300']), ('\u1ea8', + &['\xc2', '\u0309']), ('\u1ea9', &['\xe2', '\u0309']), ('\u1eaa', &['\xc2', '\u0303']), + ('\u1eab', &['\xe2', '\u0303']), ('\u1eac', &['\u1ea0', '\u0302']), ('\u1ead', &['\u1ea1', + '\u0302']), ('\u1eae', &['\u0102', '\u0301']), ('\u1eaf', &['\u0103', '\u0301']), ('\u1eb0', + &['\u0102', '\u0300']), ('\u1eb1', &['\u0103', '\u0300']), ('\u1eb2', &['\u0102', + '\u0309']), ('\u1eb3', &['\u0103', '\u0309']), ('\u1eb4', &['\u0102', '\u0303']), ('\u1eb5', + &['\u0103', '\u0303']), ('\u1eb6', &['\u1ea0', '\u0306']), ('\u1eb7', &['\u1ea1', + '\u0306']), ('\u1eb8', &['\x45', '\u0323']), ('\u1eb9', &['\x65', '\u0323']), ('\u1eba', + &['\x45', '\u0309']), ('\u1ebb', &['\x65', '\u0309']), ('\u1ebc', &['\x45', '\u0303']), + ('\u1ebd', &['\x65', '\u0303']), ('\u1ebe', &['\xca', '\u0301']), ('\u1ebf', &['\xea', + '\u0301']), ('\u1ec0', &['\xca', '\u0300']), ('\u1ec1', &['\xea', '\u0300']), ('\u1ec2', + &['\xca', '\u0309']), ('\u1ec3', &['\xea', '\u0309']), ('\u1ec4', &['\xca', '\u0303']), + ('\u1ec5', &['\xea', '\u0303']), ('\u1ec6', &['\u1eb8', '\u0302']), ('\u1ec7', &['\u1eb9', + '\u0302']), ('\u1ec8', &['\x49', '\u0309']), ('\u1ec9', &['\x69', '\u0309']), ('\u1eca', + &['\x49', '\u0323']), ('\u1ecb', &['\x69', '\u0323']), ('\u1ecc', &['\x4f', '\u0323']), + ('\u1ecd', &['\x6f', '\u0323']), ('\u1ece', &['\x4f', '\u0309']), ('\u1ecf', &['\x6f', + '\u0309']), ('\u1ed0', &['\xd4', '\u0301']), ('\u1ed1', &['\xf4', '\u0301']), ('\u1ed2', + &['\xd4', '\u0300']), ('\u1ed3', &['\xf4', '\u0300']), ('\u1ed4', &['\xd4', '\u0309']), + ('\u1ed5', &['\xf4', '\u0309']), ('\u1ed6', &['\xd4', '\u0303']), ('\u1ed7', &['\xf4', + '\u0303']), ('\u1ed8', &['\u1ecc', '\u0302']), ('\u1ed9', &['\u1ecd', '\u0302']), ('\u1eda', + &['\u01a0', '\u0301']), ('\u1edb', &['\u01a1', '\u0301']), ('\u1edc', &['\u01a0', + '\u0300']), ('\u1edd', &['\u01a1', '\u0300']), ('\u1ede', &['\u01a0', '\u0309']), ('\u1edf', + &['\u01a1', '\u0309']), ('\u1ee0', &['\u01a0', '\u0303']), ('\u1ee1', &['\u01a1', + '\u0303']), ('\u1ee2', &['\u01a0', '\u0323']), ('\u1ee3', &['\u01a1', '\u0323']), ('\u1ee4', + &['\x55', '\u0323']), ('\u1ee5', &['\x75', '\u0323']), ('\u1ee6', &['\x55', '\u0309']), + ('\u1ee7', &['\x75', '\u0309']), ('\u1ee8', &['\u01af', '\u0301']), ('\u1ee9', &['\u01b0', + '\u0301']), ('\u1eea', &['\u01af', '\u0300']), ('\u1eeb', &['\u01b0', '\u0300']), ('\u1eec', + &['\u01af', '\u0309']), ('\u1eed', &['\u01b0', '\u0309']), ('\u1eee', &['\u01af', + '\u0303']), ('\u1eef', &['\u01b0', '\u0303']), ('\u1ef0', &['\u01af', '\u0323']), ('\u1ef1', + &['\u01b0', '\u0323']), ('\u1ef2', &['\x59', '\u0300']), ('\u1ef3', &['\x79', '\u0300']), + ('\u1ef4', &['\x59', '\u0323']), ('\u1ef5', &['\x79', '\u0323']), ('\u1ef6', &['\x59', + '\u0309']), ('\u1ef7', &['\x79', '\u0309']), ('\u1ef8', &['\x59', '\u0303']), ('\u1ef9', + &['\x79', '\u0303']), ('\u1f00', &['\u03b1', '\u0313']), ('\u1f01', &['\u03b1', '\u0314']), + ('\u1f02', &['\u1f00', '\u0300']), ('\u1f03', &['\u1f01', '\u0300']), ('\u1f04', &['\u1f00', + '\u0301']), ('\u1f05', &['\u1f01', '\u0301']), ('\u1f06', &['\u1f00', '\u0342']), ('\u1f07', + &['\u1f01', '\u0342']), ('\u1f08', &['\u0391', '\u0313']), ('\u1f09', &['\u0391', + '\u0314']), ('\u1f0a', &['\u1f08', '\u0300']), ('\u1f0b', &['\u1f09', '\u0300']), ('\u1f0c', + &['\u1f08', '\u0301']), ('\u1f0d', &['\u1f09', '\u0301']), ('\u1f0e', &['\u1f08', + '\u0342']), ('\u1f0f', &['\u1f09', '\u0342']), ('\u1f10', &['\u03b5', '\u0313']), ('\u1f11', + &['\u03b5', '\u0314']), ('\u1f12', &['\u1f10', '\u0300']), ('\u1f13', &['\u1f11', + '\u0300']), ('\u1f14', &['\u1f10', '\u0301']), ('\u1f15', &['\u1f11', '\u0301']), ('\u1f18', + &['\u0395', '\u0313']), ('\u1f19', &['\u0395', '\u0314']), ('\u1f1a', &['\u1f18', + '\u0300']), ('\u1f1b', &['\u1f19', '\u0300']), ('\u1f1c', &['\u1f18', '\u0301']), ('\u1f1d', + &['\u1f19', '\u0301']), ('\u1f20', &['\u03b7', '\u0313']), ('\u1f21', &['\u03b7', + '\u0314']), ('\u1f22', &['\u1f20', '\u0300']), ('\u1f23', &['\u1f21', '\u0300']), ('\u1f24', + &['\u1f20', '\u0301']), ('\u1f25', &['\u1f21', '\u0301']), ('\u1f26', &['\u1f20', + '\u0342']), ('\u1f27', &['\u1f21', '\u0342']), ('\u1f28', &['\u0397', '\u0313']), ('\u1f29', + &['\u0397', '\u0314']), ('\u1f2a', &['\u1f28', '\u0300']), ('\u1f2b', &['\u1f29', + '\u0300']), ('\u1f2c', &['\u1f28', '\u0301']), ('\u1f2d', &['\u1f29', '\u0301']), ('\u1f2e', + &['\u1f28', '\u0342']), ('\u1f2f', &['\u1f29', '\u0342']), ('\u1f30', &['\u03b9', + '\u0313']), ('\u1f31', &['\u03b9', '\u0314']), ('\u1f32', &['\u1f30', '\u0300']), ('\u1f33', + &['\u1f31', '\u0300']), ('\u1f34', &['\u1f30', '\u0301']), ('\u1f35', &['\u1f31', + '\u0301']), ('\u1f36', &['\u1f30', '\u0342']), ('\u1f37', &['\u1f31', '\u0342']), ('\u1f38', + &['\u0399', '\u0313']), ('\u1f39', &['\u0399', '\u0314']), ('\u1f3a', &['\u1f38', + '\u0300']), ('\u1f3b', &['\u1f39', '\u0300']), ('\u1f3c', &['\u1f38', '\u0301']), ('\u1f3d', + &['\u1f39', '\u0301']), ('\u1f3e', &['\u1f38', '\u0342']), ('\u1f3f', &['\u1f39', + '\u0342']), ('\u1f40', &['\u03bf', '\u0313']), ('\u1f41', &['\u03bf', '\u0314']), ('\u1f42', + &['\u1f40', '\u0300']), ('\u1f43', &['\u1f41', '\u0300']), ('\u1f44', &['\u1f40', + '\u0301']), ('\u1f45', &['\u1f41', '\u0301']), ('\u1f48', &['\u039f', '\u0313']), ('\u1f49', + &['\u039f', '\u0314']), ('\u1f4a', &['\u1f48', '\u0300']), ('\u1f4b', &['\u1f49', + '\u0300']), ('\u1f4c', &['\u1f48', '\u0301']), ('\u1f4d', &['\u1f49', '\u0301']), ('\u1f50', + &['\u03c5', '\u0313']), ('\u1f51', &['\u03c5', '\u0314']), ('\u1f52', &['\u1f50', + '\u0300']), ('\u1f53', &['\u1f51', '\u0300']), ('\u1f54', &['\u1f50', '\u0301']), ('\u1f55', + &['\u1f51', '\u0301']), ('\u1f56', &['\u1f50', '\u0342']), ('\u1f57', &['\u1f51', + '\u0342']), ('\u1f59', &['\u03a5', '\u0314']), ('\u1f5b', &['\u1f59', '\u0300']), ('\u1f5d', + &['\u1f59', '\u0301']), ('\u1f5f', &['\u1f59', '\u0342']), ('\u1f60', &['\u03c9', + '\u0313']), ('\u1f61', &['\u03c9', '\u0314']), ('\u1f62', &['\u1f60', '\u0300']), ('\u1f63', + &['\u1f61', '\u0300']), ('\u1f64', &['\u1f60', '\u0301']), ('\u1f65', &['\u1f61', + '\u0301']), ('\u1f66', &['\u1f60', '\u0342']), ('\u1f67', &['\u1f61', '\u0342']), ('\u1f68', + &['\u03a9', '\u0313']), ('\u1f69', &['\u03a9', '\u0314']), ('\u1f6a', &['\u1f68', + '\u0300']), ('\u1f6b', &['\u1f69', '\u0300']), ('\u1f6c', &['\u1f68', '\u0301']), ('\u1f6d', + &['\u1f69', '\u0301']), ('\u1f6e', &['\u1f68', '\u0342']), ('\u1f6f', &['\u1f69', + '\u0342']), ('\u1f70', &['\u03b1', '\u0300']), ('\u1f71', &['\u03ac']), ('\u1f72', + &['\u03b5', '\u0300']), ('\u1f73', &['\u03ad']), ('\u1f74', &['\u03b7', '\u0300']), + ('\u1f75', &['\u03ae']), ('\u1f76', &['\u03b9', '\u0300']), ('\u1f77', &['\u03af']), + ('\u1f78', &['\u03bf', '\u0300']), ('\u1f79', &['\u03cc']), ('\u1f7a', &['\u03c5', + '\u0300']), ('\u1f7b', &['\u03cd']), ('\u1f7c', &['\u03c9', '\u0300']), ('\u1f7d', + &['\u03ce']), ('\u1f80', &['\u1f00', '\u0345']), ('\u1f81', &['\u1f01', '\u0345']), + ('\u1f82', &['\u1f02', '\u0345']), ('\u1f83', &['\u1f03', '\u0345']), ('\u1f84', &['\u1f04', + '\u0345']), ('\u1f85', &['\u1f05', '\u0345']), ('\u1f86', &['\u1f06', '\u0345']), ('\u1f87', + &['\u1f07', '\u0345']), ('\u1f88', &['\u1f08', '\u0345']), ('\u1f89', &['\u1f09', + '\u0345']), ('\u1f8a', &['\u1f0a', '\u0345']), ('\u1f8b', &['\u1f0b', '\u0345']), ('\u1f8c', + &['\u1f0c', '\u0345']), ('\u1f8d', &['\u1f0d', '\u0345']), ('\u1f8e', &['\u1f0e', + '\u0345']), ('\u1f8f', &['\u1f0f', '\u0345']), ('\u1f90', &['\u1f20', '\u0345']), ('\u1f91', + &['\u1f21', '\u0345']), ('\u1f92', &['\u1f22', '\u0345']), ('\u1f93', &['\u1f23', + '\u0345']), ('\u1f94', &['\u1f24', '\u0345']), ('\u1f95', &['\u1f25', '\u0345']), ('\u1f96', + &['\u1f26', '\u0345']), ('\u1f97', &['\u1f27', '\u0345']), ('\u1f98', &['\u1f28', + '\u0345']), ('\u1f99', &['\u1f29', '\u0345']), ('\u1f9a', &['\u1f2a', '\u0345']), ('\u1f9b', + &['\u1f2b', '\u0345']), ('\u1f9c', &['\u1f2c', '\u0345']), ('\u1f9d', &['\u1f2d', + '\u0345']), ('\u1f9e', &['\u1f2e', '\u0345']), ('\u1f9f', &['\u1f2f', '\u0345']), ('\u1fa0', + &['\u1f60', '\u0345']), ('\u1fa1', &['\u1f61', '\u0345']), ('\u1fa2', &['\u1f62', + '\u0345']), ('\u1fa3', &['\u1f63', '\u0345']), ('\u1fa4', &['\u1f64', '\u0345']), ('\u1fa5', + &['\u1f65', '\u0345']), ('\u1fa6', &['\u1f66', '\u0345']), ('\u1fa7', &['\u1f67', + '\u0345']), ('\u1fa8', &['\u1f68', '\u0345']), ('\u1fa9', &['\u1f69', '\u0345']), ('\u1faa', + &['\u1f6a', '\u0345']), ('\u1fab', &['\u1f6b', '\u0345']), ('\u1fac', &['\u1f6c', + '\u0345']), ('\u1fad', &['\u1f6d', '\u0345']), ('\u1fae', &['\u1f6e', '\u0345']), ('\u1faf', + &['\u1f6f', '\u0345']), ('\u1fb0', &['\u03b1', '\u0306']), ('\u1fb1', &['\u03b1', + '\u0304']), ('\u1fb2', &['\u1f70', '\u0345']), ('\u1fb3', &['\u03b1', '\u0345']), ('\u1fb4', + &['\u03ac', '\u0345']), ('\u1fb6', &['\u03b1', '\u0342']), ('\u1fb7', &['\u1fb6', + '\u0345']), ('\u1fb8', &['\u0391', '\u0306']), ('\u1fb9', &['\u0391', '\u0304']), ('\u1fba', + &['\u0391', '\u0300']), ('\u1fbb', &['\u0386']), ('\u1fbc', &['\u0391', '\u0345']), + ('\u1fbe', &['\u03b9']), ('\u1fc1', &['\xa8', '\u0342']), ('\u1fc2', &['\u1f74', '\u0345']), + ('\u1fc3', &['\u03b7', '\u0345']), ('\u1fc4', &['\u03ae', '\u0345']), ('\u1fc6', &['\u03b7', + '\u0342']), ('\u1fc7', &['\u1fc6', '\u0345']), ('\u1fc8', &['\u0395', '\u0300']), ('\u1fc9', + &['\u0388']), ('\u1fca', &['\u0397', '\u0300']), ('\u1fcb', &['\u0389']), ('\u1fcc', + &['\u0397', '\u0345']), ('\u1fcd', &['\u1fbf', '\u0300']), ('\u1fce', &['\u1fbf', + '\u0301']), ('\u1fcf', &['\u1fbf', '\u0342']), ('\u1fd0', &['\u03b9', '\u0306']), ('\u1fd1', + &['\u03b9', '\u0304']), ('\u1fd2', &['\u03ca', '\u0300']), ('\u1fd3', &['\u0390']), + ('\u1fd6', &['\u03b9', '\u0342']), ('\u1fd7', &['\u03ca', '\u0342']), ('\u1fd8', &['\u0399', + '\u0306']), ('\u1fd9', &['\u0399', '\u0304']), ('\u1fda', &['\u0399', '\u0300']), ('\u1fdb', + &['\u038a']), ('\u1fdd', &['\u1ffe', '\u0300']), ('\u1fde', &['\u1ffe', '\u0301']), + ('\u1fdf', &['\u1ffe', '\u0342']), ('\u1fe0', &['\u03c5', '\u0306']), ('\u1fe1', &['\u03c5', + '\u0304']), ('\u1fe2', &['\u03cb', '\u0300']), ('\u1fe3', &['\u03b0']), ('\u1fe4', + &['\u03c1', '\u0313']), ('\u1fe5', &['\u03c1', '\u0314']), ('\u1fe6', &['\u03c5', + '\u0342']), ('\u1fe7', &['\u03cb', '\u0342']), ('\u1fe8', &['\u03a5', '\u0306']), ('\u1fe9', + &['\u03a5', '\u0304']), ('\u1fea', &['\u03a5', '\u0300']), ('\u1feb', &['\u038e']), + ('\u1fec', &['\u03a1', '\u0314']), ('\u1fed', &['\xa8', '\u0300']), ('\u1fee', &['\u0385']), + ('\u1fef', &['\x60']), ('\u1ff2', &['\u1f7c', '\u0345']), ('\u1ff3', &['\u03c9', '\u0345']), + ('\u1ff4', &['\u03ce', '\u0345']), ('\u1ff6', &['\u03c9', '\u0342']), ('\u1ff7', &['\u1ff6', + '\u0345']), ('\u1ff8', &['\u039f', '\u0300']), ('\u1ff9', &['\u038c']), ('\u1ffa', + &['\u03a9', '\u0300']), ('\u1ffb', &['\u038f']), ('\u1ffc', &['\u03a9', '\u0345']), + ('\u1ffd', &['\xb4']), ('\u2000', &['\u2002']), ('\u2001', &['\u2003']), ('\u2126', + &['\u03a9']), ('\u212a', &['\x4b']), ('\u212b', &['\xc5']), ('\u219a', &['\u2190', + '\u0338']), ('\u219b', &['\u2192', '\u0338']), ('\u21ae', &['\u2194', '\u0338']), ('\u21cd', + &['\u21d0', '\u0338']), ('\u21ce', &['\u21d4', '\u0338']), ('\u21cf', &['\u21d2', + '\u0338']), ('\u2204', &['\u2203', '\u0338']), ('\u2209', &['\u2208', '\u0338']), ('\u220c', + &['\u220b', '\u0338']), ('\u2224', &['\u2223', '\u0338']), ('\u2226', &['\u2225', + '\u0338']), ('\u2241', &['\u223c', '\u0338']), ('\u2244', &['\u2243', '\u0338']), ('\u2247', + &['\u2245', '\u0338']), ('\u2249', &['\u2248', '\u0338']), ('\u2260', &['\x3d', '\u0338']), + ('\u2262', &['\u2261', '\u0338']), ('\u226d', &['\u224d', '\u0338']), ('\u226e', &['\x3c', + '\u0338']), ('\u226f', &['\x3e', '\u0338']), ('\u2270', &['\u2264', '\u0338']), ('\u2271', + &['\u2265', '\u0338']), ('\u2274', &['\u2272', '\u0338']), ('\u2275', &['\u2273', + '\u0338']), ('\u2278', &['\u2276', '\u0338']), ('\u2279', &['\u2277', '\u0338']), ('\u2280', + &['\u227a', '\u0338']), ('\u2281', &['\u227b', '\u0338']), ('\u2284', &['\u2282', + '\u0338']), ('\u2285', &['\u2283', '\u0338']), ('\u2288', &['\u2286', '\u0338']), ('\u2289', + &['\u2287', '\u0338']), ('\u22ac', &['\u22a2', '\u0338']), ('\u22ad', &['\u22a8', + '\u0338']), ('\u22ae', &['\u22a9', '\u0338']), ('\u22af', &['\u22ab', '\u0338']), ('\u22e0', + &['\u227c', '\u0338']), ('\u22e1', &['\u227d', '\u0338']), ('\u22e2', &['\u2291', + '\u0338']), ('\u22e3', &['\u2292', '\u0338']), ('\u22ea', &['\u22b2', '\u0338']), ('\u22eb', + &['\u22b3', '\u0338']), ('\u22ec', &['\u22b4', '\u0338']), ('\u22ed', &['\u22b5', + '\u0338']), ('\u2329', &['\u3008']), ('\u232a', &['\u3009']), ('\u2adc', &['\u2add', + '\u0338']), ('\u304c', &['\u304b', '\u3099']), ('\u304e', &['\u304d', '\u3099']), ('\u3050', + &['\u304f', '\u3099']), ('\u3052', &['\u3051', '\u3099']), ('\u3054', &['\u3053', + '\u3099']), ('\u3056', &['\u3055', '\u3099']), ('\u3058', &['\u3057', '\u3099']), ('\u305a', + &['\u3059', '\u3099']), ('\u305c', &['\u305b', '\u3099']), ('\u305e', &['\u305d', + '\u3099']), ('\u3060', &['\u305f', '\u3099']), ('\u3062', &['\u3061', '\u3099']), ('\u3065', + &['\u3064', '\u3099']), ('\u3067', &['\u3066', '\u3099']), ('\u3069', &['\u3068', + '\u3099']), ('\u3070', &['\u306f', '\u3099']), ('\u3071', &['\u306f', '\u309a']), ('\u3073', + &['\u3072', '\u3099']), ('\u3074', &['\u3072', '\u309a']), ('\u3076', &['\u3075', + '\u3099']), ('\u3077', &['\u3075', '\u309a']), ('\u3079', &['\u3078', '\u3099']), ('\u307a', + &['\u3078', '\u309a']), ('\u307c', &['\u307b', '\u3099']), ('\u307d', &['\u307b', + '\u309a']), ('\u3094', &['\u3046', '\u3099']), ('\u309e', &['\u309d', '\u3099']), ('\u30ac', + &['\u30ab', '\u3099']), ('\u30ae', &['\u30ad', '\u3099']), ('\u30b0', &['\u30af', + '\u3099']), ('\u30b2', &['\u30b1', '\u3099']), ('\u30b4', &['\u30b3', '\u3099']), ('\u30b6', + &['\u30b5', '\u3099']), ('\u30b8', &['\u30b7', '\u3099']), ('\u30ba', &['\u30b9', + '\u3099']), ('\u30bc', &['\u30bb', '\u3099']), ('\u30be', &['\u30bd', '\u3099']), ('\u30c0', + &['\u30bf', '\u3099']), ('\u30c2', &['\u30c1', '\u3099']), ('\u30c5', &['\u30c4', + '\u3099']), ('\u30c7', &['\u30c6', '\u3099']), ('\u30c9', &['\u30c8', '\u3099']), ('\u30d0', + &['\u30cf', '\u3099']), ('\u30d1', &['\u30cf', '\u309a']), ('\u30d3', &['\u30d2', + '\u3099']), ('\u30d4', &['\u30d2', '\u309a']), ('\u30d6', &['\u30d5', '\u3099']), ('\u30d7', + &['\u30d5', '\u309a']), ('\u30d9', &['\u30d8', '\u3099']), ('\u30da', &['\u30d8', + '\u309a']), ('\u30dc', &['\u30db', '\u3099']), ('\u30dd', &['\u30db', '\u309a']), ('\u30f4', + &['\u30a6', '\u3099']), ('\u30f7', &['\u30ef', '\u3099']), ('\u30f8', &['\u30f0', + '\u3099']), ('\u30f9', &['\u30f1', '\u3099']), ('\u30fa', &['\u30f2', '\u3099']), ('\u30fe', + &['\u30fd', '\u3099']), ('\uf900', &['\u8c48']), ('\uf901', &['\u66f4']), ('\uf902', + &['\u8eca']), ('\uf903', &['\u8cc8']), ('\uf904', &['\u6ed1']), ('\uf905', &['\u4e32']), + ('\uf906', &['\u53e5']), ('\uf907', &['\u9f9c']), ('\uf908', &['\u9f9c']), ('\uf909', + &['\u5951']), ('\uf90a', &['\u91d1']), ('\uf90b', &['\u5587']), ('\uf90c', &['\u5948']), + ('\uf90d', &['\u61f6']), ('\uf90e', &['\u7669']), ('\uf90f', &['\u7f85']), ('\uf910', + &['\u863f']), ('\uf911', &['\u87ba']), ('\uf912', &['\u88f8']), ('\uf913', &['\u908f']), + ('\uf914', &['\u6a02']), ('\uf915', &['\u6d1b']), ('\uf916', &['\u70d9']), ('\uf917', + &['\u73de']), ('\uf918', &['\u843d']), ('\uf919', &['\u916a']), ('\uf91a', &['\u99f1']), + ('\uf91b', &['\u4e82']), ('\uf91c', &['\u5375']), ('\uf91d', &['\u6b04']), ('\uf91e', + &['\u721b']), ('\uf91f', &['\u862d']), ('\uf920', &['\u9e1e']), ('\uf921', &['\u5d50']), + ('\uf922', &['\u6feb']), ('\uf923', &['\u85cd']), ('\uf924', &['\u8964']), ('\uf925', + &['\u62c9']), ('\uf926', &['\u81d8']), ('\uf927', &['\u881f']), ('\uf928', &['\u5eca']), + ('\uf929', &['\u6717']), ('\uf92a', &['\u6d6a']), ('\uf92b', &['\u72fc']), ('\uf92c', + &['\u90ce']), ('\uf92d', &['\u4f86']), ('\uf92e', &['\u51b7']), ('\uf92f', &['\u52de']), + ('\uf930', &['\u64c4']), ('\uf931', &['\u6ad3']), ('\uf932', &['\u7210']), ('\uf933', + &['\u76e7']), ('\uf934', &['\u8001']), ('\uf935', &['\u8606']), ('\uf936', &['\u865c']), + ('\uf937', &['\u8def']), ('\uf938', &['\u9732']), ('\uf939', &['\u9b6f']), ('\uf93a', + &['\u9dfa']), ('\uf93b', &['\u788c']), ('\uf93c', &['\u797f']), ('\uf93d', &['\u7da0']), + ('\uf93e', &['\u83c9']), ('\uf93f', &['\u9304']), ('\uf940', &['\u9e7f']), ('\uf941', + &['\u8ad6']), ('\uf942', &['\u58df']), ('\uf943', &['\u5f04']), ('\uf944', &['\u7c60']), + ('\uf945', &['\u807e']), ('\uf946', &['\u7262']), ('\uf947', &['\u78ca']), ('\uf948', + &['\u8cc2']), ('\uf949', &['\u96f7']), ('\uf94a', &['\u58d8']), ('\uf94b', &['\u5c62']), + ('\uf94c', &['\u6a13']), ('\uf94d', &['\u6dda']), ('\uf94e', &['\u6f0f']), ('\uf94f', + &['\u7d2f']), ('\uf950', &['\u7e37']), ('\uf951', &['\u964b']), ('\uf952', &['\u52d2']), + ('\uf953', &['\u808b']), ('\uf954', &['\u51dc']), ('\uf955', &['\u51cc']), ('\uf956', + &['\u7a1c']), ('\uf957', &['\u7dbe']), ('\uf958', &['\u83f1']), ('\uf959', &['\u9675']), + ('\uf95a', &['\u8b80']), ('\uf95b', &['\u62cf']), ('\uf95c', &['\u6a02']), ('\uf95d', + &['\u8afe']), ('\uf95e', &['\u4e39']), ('\uf95f', &['\u5be7']), ('\uf960', &['\u6012']), + ('\uf961', &['\u7387']), ('\uf962', &['\u7570']), ('\uf963', &['\u5317']), ('\uf964', + &['\u78fb']), ('\uf965', &['\u4fbf']), ('\uf966', &['\u5fa9']), ('\uf967', &['\u4e0d']), + ('\uf968', &['\u6ccc']), ('\uf969', &['\u6578']), ('\uf96a', &['\u7d22']), ('\uf96b', + &['\u53c3']), ('\uf96c', &['\u585e']), ('\uf96d', &['\u7701']), ('\uf96e', &['\u8449']), + ('\uf96f', &['\u8aaa']), ('\uf970', &['\u6bba']), ('\uf971', &['\u8fb0']), ('\uf972', + &['\u6c88']), ('\uf973', &['\u62fe']), ('\uf974', &['\u82e5']), ('\uf975', &['\u63a0']), + ('\uf976', &['\u7565']), ('\uf977', &['\u4eae']), ('\uf978', &['\u5169']), ('\uf979', + &['\u51c9']), ('\uf97a', &['\u6881']), ('\uf97b', &['\u7ce7']), ('\uf97c', &['\u826f']), + ('\uf97d', &['\u8ad2']), ('\uf97e', &['\u91cf']), ('\uf97f', &['\u52f5']), ('\uf980', + &['\u5442']), ('\uf981', &['\u5973']), ('\uf982', &['\u5eec']), ('\uf983', &['\u65c5']), + ('\uf984', &['\u6ffe']), ('\uf985', &['\u792a']), ('\uf986', &['\u95ad']), ('\uf987', + &['\u9a6a']), ('\uf988', &['\u9e97']), ('\uf989', &['\u9ece']), ('\uf98a', &['\u529b']), + ('\uf98b', &['\u66c6']), ('\uf98c', &['\u6b77']), ('\uf98d', &['\u8f62']), ('\uf98e', + &['\u5e74']), ('\uf98f', &['\u6190']), ('\uf990', &['\u6200']), ('\uf991', &['\u649a']), + ('\uf992', &['\u6f23']), ('\uf993', &['\u7149']), ('\uf994', &['\u7489']), ('\uf995', + &['\u79ca']), ('\uf996', &['\u7df4']), ('\uf997', &['\u806f']), ('\uf998', &['\u8f26']), + ('\uf999', &['\u84ee']), ('\uf99a', &['\u9023']), ('\uf99b', &['\u934a']), ('\uf99c', + &['\u5217']), ('\uf99d', &['\u52a3']), ('\uf99e', &['\u54bd']), ('\uf99f', &['\u70c8']), + ('\uf9a0', &['\u88c2']), ('\uf9a1', &['\u8aaa']), ('\uf9a2', &['\u5ec9']), ('\uf9a3', + &['\u5ff5']), ('\uf9a4', &['\u637b']), ('\uf9a5', &['\u6bae']), ('\uf9a6', &['\u7c3e']), + ('\uf9a7', &['\u7375']), ('\uf9a8', &['\u4ee4']), ('\uf9a9', &['\u56f9']), ('\uf9aa', + &['\u5be7']), ('\uf9ab', &['\u5dba']), ('\uf9ac', &['\u601c']), ('\uf9ad', &['\u73b2']), + ('\uf9ae', &['\u7469']), ('\uf9af', &['\u7f9a']), ('\uf9b0', &['\u8046']), ('\uf9b1', + &['\u9234']), ('\uf9b2', &['\u96f6']), ('\uf9b3', &['\u9748']), ('\uf9b4', &['\u9818']), + ('\uf9b5', &['\u4f8b']), ('\uf9b6', &['\u79ae']), ('\uf9b7', &['\u91b4']), ('\uf9b8', + &['\u96b8']), ('\uf9b9', &['\u60e1']), ('\uf9ba', &['\u4e86']), ('\uf9bb', &['\u50da']), + ('\uf9bc', &['\u5bee']), ('\uf9bd', &['\u5c3f']), ('\uf9be', &['\u6599']), ('\uf9bf', + &['\u6a02']), ('\uf9c0', &['\u71ce']), ('\uf9c1', &['\u7642']), ('\uf9c2', &['\u84fc']), + ('\uf9c3', &['\u907c']), ('\uf9c4', &['\u9f8d']), ('\uf9c5', &['\u6688']), ('\uf9c6', + &['\u962e']), ('\uf9c7', &['\u5289']), ('\uf9c8', &['\u677b']), ('\uf9c9', &['\u67f3']), + ('\uf9ca', &['\u6d41']), ('\uf9cb', &['\u6e9c']), ('\uf9cc', &['\u7409']), ('\uf9cd', + &['\u7559']), ('\uf9ce', &['\u786b']), ('\uf9cf', &['\u7d10']), ('\uf9d0', &['\u985e']), + ('\uf9d1', &['\u516d']), ('\uf9d2', &['\u622e']), ('\uf9d3', &['\u9678']), ('\uf9d4', + &['\u502b']), ('\uf9d5', &['\u5d19']), ('\uf9d6', &['\u6dea']), ('\uf9d7', &['\u8f2a']), + ('\uf9d8', &['\u5f8b']), ('\uf9d9', &['\u6144']), ('\uf9da', &['\u6817']), ('\uf9db', + &['\u7387']), ('\uf9dc', &['\u9686']), ('\uf9dd', &['\u5229']), ('\uf9de', &['\u540f']), + ('\uf9df', &['\u5c65']), ('\uf9e0', &['\u6613']), ('\uf9e1', &['\u674e']), ('\uf9e2', + &['\u68a8']), ('\uf9e3', &['\u6ce5']), ('\uf9e4', &['\u7406']), ('\uf9e5', &['\u75e2']), + ('\uf9e6', &['\u7f79']), ('\uf9e7', &['\u88cf']), ('\uf9e8', &['\u88e1']), ('\uf9e9', + &['\u91cc']), ('\uf9ea', &['\u96e2']), ('\uf9eb', &['\u533f']), ('\uf9ec', &['\u6eba']), + ('\uf9ed', &['\u541d']), ('\uf9ee', &['\u71d0']), ('\uf9ef', &['\u7498']), ('\uf9f0', + &['\u85fa']), ('\uf9f1', &['\u96a3']), ('\uf9f2', &['\u9c57']), ('\uf9f3', &['\u9e9f']), + ('\uf9f4', &['\u6797']), ('\uf9f5', &['\u6dcb']), ('\uf9f6', &['\u81e8']), ('\uf9f7', + &['\u7acb']), ('\uf9f8', &['\u7b20']), ('\uf9f9', &['\u7c92']), ('\uf9fa', &['\u72c0']), + ('\uf9fb', &['\u7099']), ('\uf9fc', &['\u8b58']), ('\uf9fd', &['\u4ec0']), ('\uf9fe', + &['\u8336']), ('\uf9ff', &['\u523a']), ('\ufa00', &['\u5207']), ('\ufa01', &['\u5ea6']), + ('\ufa02', &['\u62d3']), ('\ufa03', &['\u7cd6']), ('\ufa04', &['\u5b85']), ('\ufa05', + &['\u6d1e']), ('\ufa06', &['\u66b4']), ('\ufa07', &['\u8f3b']), ('\ufa08', &['\u884c']), + ('\ufa09', &['\u964d']), ('\ufa0a', &['\u898b']), ('\ufa0b', &['\u5ed3']), ('\ufa0c', + &['\u5140']), ('\ufa0d', &['\u55c0']), ('\ufa10', &['\u585a']), ('\ufa12', &['\u6674']), + ('\ufa15', &['\u51de']), ('\ufa16', &['\u732a']), ('\ufa17', &['\u76ca']), ('\ufa18', + &['\u793c']), ('\ufa19', &['\u795e']), ('\ufa1a', &['\u7965']), ('\ufa1b', &['\u798f']), + ('\ufa1c', &['\u9756']), ('\ufa1d', &['\u7cbe']), ('\ufa1e', &['\u7fbd']), ('\ufa20', + &['\u8612']), ('\ufa22', &['\u8af8']), ('\ufa25', &['\u9038']), ('\ufa26', &['\u90fd']), + ('\ufa2a', &['\u98ef']), ('\ufa2b', &['\u98fc']), ('\ufa2c', &['\u9928']), ('\ufa2d', + &['\u9db4']), ('\ufa2e', &['\u90de']), ('\ufa2f', &['\u96b7']), ('\ufa30', &['\u4fae']), + ('\ufa31', &['\u50e7']), ('\ufa32', &['\u514d']), ('\ufa33', &['\u52c9']), ('\ufa34', + &['\u52e4']), ('\ufa35', &['\u5351']), ('\ufa36', &['\u559d']), ('\ufa37', &['\u5606']), + ('\ufa38', &['\u5668']), ('\ufa39', &['\u5840']), ('\ufa3a', &['\u58a8']), ('\ufa3b', + &['\u5c64']), ('\ufa3c', &['\u5c6e']), ('\ufa3d', &['\u6094']), ('\ufa3e', &['\u6168']), + ('\ufa3f', &['\u618e']), ('\ufa40', &['\u61f2']), ('\ufa41', &['\u654f']), ('\ufa42', + &['\u65e2']), ('\ufa43', &['\u6691']), ('\ufa44', &['\u6885']), ('\ufa45', &['\u6d77']), + ('\ufa46', &['\u6e1a']), ('\ufa47', &['\u6f22']), ('\ufa48', &['\u716e']), ('\ufa49', + &['\u722b']), ('\ufa4a', &['\u7422']), ('\ufa4b', &['\u7891']), ('\ufa4c', &['\u793e']), + ('\ufa4d', &['\u7949']), ('\ufa4e', &['\u7948']), ('\ufa4f', &['\u7950']), ('\ufa50', + &['\u7956']), ('\ufa51', &['\u795d']), ('\ufa52', &['\u798d']), ('\ufa53', &['\u798e']), + ('\ufa54', &['\u7a40']), ('\ufa55', &['\u7a81']), ('\ufa56', &['\u7bc0']), ('\ufa57', + &['\u7df4']), ('\ufa58', &['\u7e09']), ('\ufa59', &['\u7e41']), ('\ufa5a', &['\u7f72']), + ('\ufa5b', &['\u8005']), ('\ufa5c', &['\u81ed']), ('\ufa5d', &['\u8279']), ('\ufa5e', + &['\u8279']), ('\ufa5f', &['\u8457']), ('\ufa60', &['\u8910']), ('\ufa61', &['\u8996']), + ('\ufa62', &['\u8b01']), ('\ufa63', &['\u8b39']), ('\ufa64', &['\u8cd3']), ('\ufa65', + &['\u8d08']), ('\ufa66', &['\u8fb6']), ('\ufa67', &['\u9038']), ('\ufa68', &['\u96e3']), + ('\ufa69', &['\u97ff']), ('\ufa6a', &['\u983b']), ('\ufa6b', &['\u6075']), ('\ufa6c', + &['\U000242ee']), ('\ufa6d', &['\u8218']), ('\ufa70', &['\u4e26']), ('\ufa71', &['\u51b5']), + ('\ufa72', &['\u5168']), ('\ufa73', &['\u4f80']), ('\ufa74', &['\u5145']), ('\ufa75', + &['\u5180']), ('\ufa76', &['\u52c7']), ('\ufa77', &['\u52fa']), ('\ufa78', &['\u559d']), + ('\ufa79', &['\u5555']), ('\ufa7a', &['\u5599']), ('\ufa7b', &['\u55e2']), ('\ufa7c', + &['\u585a']), ('\ufa7d', &['\u58b3']), ('\ufa7e', &['\u5944']), ('\ufa7f', &['\u5954']), + ('\ufa80', &['\u5a62']), ('\ufa81', &['\u5b28']), ('\ufa82', &['\u5ed2']), ('\ufa83', + &['\u5ed9']), ('\ufa84', &['\u5f69']), ('\ufa85', &['\u5fad']), ('\ufa86', &['\u60d8']), + ('\ufa87', &['\u614e']), ('\ufa88', &['\u6108']), ('\ufa89', &['\u618e']), ('\ufa8a', + &['\u6160']), ('\ufa8b', &['\u61f2']), ('\ufa8c', &['\u6234']), ('\ufa8d', &['\u63c4']), + ('\ufa8e', &['\u641c']), ('\ufa8f', &['\u6452']), ('\ufa90', &['\u6556']), ('\ufa91', + &['\u6674']), ('\ufa92', &['\u6717']), ('\ufa93', &['\u671b']), ('\ufa94', &['\u6756']), + ('\ufa95', &['\u6b79']), ('\ufa96', &['\u6bba']), ('\ufa97', &['\u6d41']), ('\ufa98', + &['\u6edb']), ('\ufa99', &['\u6ecb']), ('\ufa9a', &['\u6f22']), ('\ufa9b', &['\u701e']), + ('\ufa9c', &['\u716e']), ('\ufa9d', &['\u77a7']), ('\ufa9e', &['\u7235']), ('\ufa9f', + &['\u72af']), ('\ufaa0', &['\u732a']), ('\ufaa1', &['\u7471']), ('\ufaa2', &['\u7506']), + ('\ufaa3', &['\u753b']), ('\ufaa4', &['\u761d']), ('\ufaa5', &['\u761f']), ('\ufaa6', + &['\u76ca']), ('\ufaa7', &['\u76db']), ('\ufaa8', &['\u76f4']), ('\ufaa9', &['\u774a']), + ('\ufaaa', &['\u7740']), ('\ufaab', &['\u78cc']), ('\ufaac', &['\u7ab1']), ('\ufaad', + &['\u7bc0']), ('\ufaae', &['\u7c7b']), ('\ufaaf', &['\u7d5b']), ('\ufab0', &['\u7df4']), + ('\ufab1', &['\u7f3e']), ('\ufab2', &['\u8005']), ('\ufab3', &['\u8352']), ('\ufab4', + &['\u83ef']), ('\ufab5', &['\u8779']), ('\ufab6', &['\u8941']), ('\ufab7', &['\u8986']), + ('\ufab8', &['\u8996']), ('\ufab9', &['\u8abf']), ('\ufaba', &['\u8af8']), ('\ufabb', + &['\u8acb']), ('\ufabc', &['\u8b01']), ('\ufabd', &['\u8afe']), ('\ufabe', &['\u8aed']), + ('\ufabf', &['\u8b39']), ('\ufac0', &['\u8b8a']), ('\ufac1', &['\u8d08']), ('\ufac2', + &['\u8f38']), ('\ufac3', &['\u9072']), ('\ufac4', &['\u9199']), ('\ufac5', &['\u9276']), + ('\ufac6', &['\u967c']), ('\ufac7', &['\u96e3']), ('\ufac8', &['\u9756']), ('\ufac9', + &['\u97db']), ('\ufaca', &['\u97ff']), ('\ufacb', &['\u980b']), ('\ufacc', &['\u983b']), + ('\ufacd', &['\u9b12']), ('\uface', &['\u9f9c']), ('\ufacf', &['\U0002284a']), ('\ufad0', + &['\U00022844']), ('\ufad1', &['\U000233d5']), ('\ufad2', &['\u3b9d']), ('\ufad3', + &['\u4018']), ('\ufad4', &['\u4039']), ('\ufad5', &['\U00025249']), ('\ufad6', + &['\U00025cd0']), ('\ufad7', &['\U00027ed3']), ('\ufad8', &['\u9f43']), ('\ufad9', + &['\u9f8e']), ('\ufb1d', &['\u05d9', '\u05b4']), ('\ufb1f', &['\u05f2', '\u05b7']), + ('\ufb2a', &['\u05e9', '\u05c1']), ('\ufb2b', &['\u05e9', '\u05c2']), ('\ufb2c', &['\ufb49', + '\u05c1']), ('\ufb2d', &['\ufb49', '\u05c2']), ('\ufb2e', &['\u05d0', '\u05b7']), ('\ufb2f', + &['\u05d0', '\u05b8']), ('\ufb30', &['\u05d0', '\u05bc']), ('\ufb31', &['\u05d1', + '\u05bc']), ('\ufb32', &['\u05d2', '\u05bc']), ('\ufb33', &['\u05d3', '\u05bc']), ('\ufb34', + &['\u05d4', '\u05bc']), ('\ufb35', &['\u05d5', '\u05bc']), ('\ufb36', &['\u05d6', + '\u05bc']), ('\ufb38', &['\u05d8', '\u05bc']), ('\ufb39', &['\u05d9', '\u05bc']), ('\ufb3a', + &['\u05da', '\u05bc']), ('\ufb3b', &['\u05db', '\u05bc']), ('\ufb3c', &['\u05dc', + '\u05bc']), ('\ufb3e', &['\u05de', '\u05bc']), ('\ufb40', &['\u05e0', '\u05bc']), ('\ufb41', + &['\u05e1', '\u05bc']), ('\ufb43', &['\u05e3', '\u05bc']), ('\ufb44', &['\u05e4', + '\u05bc']), ('\ufb46', &['\u05e6', '\u05bc']), ('\ufb47', &['\u05e7', '\u05bc']), ('\ufb48', + &['\u05e8', '\u05bc']), ('\ufb49', &['\u05e9', '\u05bc']), ('\ufb4a', &['\u05ea', + '\u05bc']), ('\ufb4b', &['\u05d5', '\u05b9']), ('\ufb4c', &['\u05d1', '\u05bf']), ('\ufb4d', + &['\u05db', '\u05bf']), ('\ufb4e', &['\u05e4', '\u05bf']), ('\U0001109a', &['\U00011099', + '\U000110ba']), ('\U0001109c', &['\U0001109b', '\U000110ba']), ('\U000110ab', + &['\U000110a5', '\U000110ba']), ('\U0001112e', &['\U00011131', '\U00011127']), + ('\U0001112f', &['\U00011132', '\U00011127']), ('\U0001d15e', &['\U0001d157', + '\U0001d165']), ('\U0001d15f', &['\U0001d158', '\U0001d165']), ('\U0001d160', + &['\U0001d15f', '\U0001d16e']), ('\U0001d161', &['\U0001d15f', '\U0001d16f']), + ('\U0001d162', &['\U0001d15f', '\U0001d170']), ('\U0001d163', &['\U0001d15f', + '\U0001d171']), ('\U0001d164', &['\U0001d15f', '\U0001d172']), ('\U0001d1bb', + &['\U0001d1b9', '\U0001d165']), ('\U0001d1bc', &['\U0001d1ba', '\U0001d165']), + ('\U0001d1bd', &['\U0001d1bb', '\U0001d16e']), ('\U0001d1be', &['\U0001d1bc', + '\U0001d16e']), ('\U0001d1bf', &['\U0001d1bb', '\U0001d16f']), ('\U0001d1c0', + &['\U0001d1bc', '\U0001d16f']), ('\U0002f800', &['\u4e3d']), ('\U0002f801', &['\u4e38']), + ('\U0002f802', &['\u4e41']), ('\U0002f803', &['\U00020122']), ('\U0002f804', &['\u4f60']), + ('\U0002f805', &['\u4fae']), ('\U0002f806', &['\u4fbb']), ('\U0002f807', &['\u5002']), + ('\U0002f808', &['\u507a']), ('\U0002f809', &['\u5099']), ('\U0002f80a', &['\u50e7']), + ('\U0002f80b', &['\u50cf']), ('\U0002f80c', &['\u349e']), ('\U0002f80d', &['\U0002063a']), + ('\U0002f80e', &['\u514d']), ('\U0002f80f', &['\u5154']), ('\U0002f810', &['\u5164']), + ('\U0002f811', &['\u5177']), ('\U0002f812', &['\U0002051c']), ('\U0002f813', &['\u34b9']), + ('\U0002f814', &['\u5167']), ('\U0002f815', &['\u518d']), ('\U0002f816', &['\U0002054b']), + ('\U0002f817', &['\u5197']), ('\U0002f818', &['\u51a4']), ('\U0002f819', &['\u4ecc']), + ('\U0002f81a', &['\u51ac']), ('\U0002f81b', &['\u51b5']), ('\U0002f81c', &['\U000291df']), + ('\U0002f81d', &['\u51f5']), ('\U0002f81e', &['\u5203']), ('\U0002f81f', &['\u34df']), + ('\U0002f820', &['\u523b']), ('\U0002f821', &['\u5246']), ('\U0002f822', &['\u5272']), + ('\U0002f823', &['\u5277']), ('\U0002f824', &['\u3515']), ('\U0002f825', &['\u52c7']), + ('\U0002f826', &['\u52c9']), ('\U0002f827', &['\u52e4']), ('\U0002f828', &['\u52fa']), + ('\U0002f829', &['\u5305']), ('\U0002f82a', &['\u5306']), ('\U0002f82b', &['\u5317']), + ('\U0002f82c', &['\u5349']), ('\U0002f82d', &['\u5351']), ('\U0002f82e', &['\u535a']), + ('\U0002f82f', &['\u5373']), ('\U0002f830', &['\u537d']), ('\U0002f831', &['\u537f']), + ('\U0002f832', &['\u537f']), ('\U0002f833', &['\u537f']), ('\U0002f834', &['\U00020a2c']), + ('\U0002f835', &['\u7070']), ('\U0002f836', &['\u53ca']), ('\U0002f837', &['\u53df']), + ('\U0002f838', &['\U00020b63']), ('\U0002f839', &['\u53eb']), ('\U0002f83a', &['\u53f1']), + ('\U0002f83b', &['\u5406']), ('\U0002f83c', &['\u549e']), ('\U0002f83d', &['\u5438']), + ('\U0002f83e', &['\u5448']), ('\U0002f83f', &['\u5468']), ('\U0002f840', &['\u54a2']), + ('\U0002f841', &['\u54f6']), ('\U0002f842', &['\u5510']), ('\U0002f843', &['\u5553']), + ('\U0002f844', &['\u5563']), ('\U0002f845', &['\u5584']), ('\U0002f846', &['\u5584']), + ('\U0002f847', &['\u5599']), ('\U0002f848', &['\u55ab']), ('\U0002f849', &['\u55b3']), + ('\U0002f84a', &['\u55c2']), ('\U0002f84b', &['\u5716']), ('\U0002f84c', &['\u5606']), + ('\U0002f84d', &['\u5717']), ('\U0002f84e', &['\u5651']), ('\U0002f84f', &['\u5674']), + ('\U0002f850', &['\u5207']), ('\U0002f851', &['\u58ee']), ('\U0002f852', &['\u57ce']), + ('\U0002f853', &['\u57f4']), ('\U0002f854', &['\u580d']), ('\U0002f855', &['\u578b']), + ('\U0002f856', &['\u5832']), ('\U0002f857', &['\u5831']), ('\U0002f858', &['\u58ac']), + ('\U0002f859', &['\U000214e4']), ('\U0002f85a', &['\u58f2']), ('\U0002f85b', &['\u58f7']), + ('\U0002f85c', &['\u5906']), ('\U0002f85d', &['\u591a']), ('\U0002f85e', &['\u5922']), + ('\U0002f85f', &['\u5962']), ('\U0002f860', &['\U000216a8']), ('\U0002f861', + &['\U000216ea']), ('\U0002f862', &['\u59ec']), ('\U0002f863', &['\u5a1b']), ('\U0002f864', + &['\u5a27']), ('\U0002f865', &['\u59d8']), ('\U0002f866', &['\u5a66']), ('\U0002f867', + &['\u36ee']), ('\U0002f868', &['\u36fc']), ('\U0002f869', &['\u5b08']), ('\U0002f86a', + &['\u5b3e']), ('\U0002f86b', &['\u5b3e']), ('\U0002f86c', &['\U000219c8']), ('\U0002f86d', + &['\u5bc3']), ('\U0002f86e', &['\u5bd8']), ('\U0002f86f', &['\u5be7']), ('\U0002f870', + &['\u5bf3']), ('\U0002f871', &['\U00021b18']), ('\U0002f872', &['\u5bff']), ('\U0002f873', + &['\u5c06']), ('\U0002f874', &['\u5f53']), ('\U0002f875', &['\u5c22']), ('\U0002f876', + &['\u3781']), ('\U0002f877', &['\u5c60']), ('\U0002f878', &['\u5c6e']), ('\U0002f879', + &['\u5cc0']), ('\U0002f87a', &['\u5c8d']), ('\U0002f87b', &['\U00021de4']), ('\U0002f87c', + &['\u5d43']), ('\U0002f87d', &['\U00021de6']), ('\U0002f87e', &['\u5d6e']), ('\U0002f87f', + &['\u5d6b']), ('\U0002f880', &['\u5d7c']), ('\U0002f881', &['\u5de1']), ('\U0002f882', + &['\u5de2']), ('\U0002f883', &['\u382f']), ('\U0002f884', &['\u5dfd']), ('\U0002f885', + &['\u5e28']), ('\U0002f886', &['\u5e3d']), ('\U0002f887', &['\u5e69']), ('\U0002f888', + &['\u3862']), ('\U0002f889', &['\U00022183']), ('\U0002f88a', &['\u387c']), ('\U0002f88b', + &['\u5eb0']), ('\U0002f88c', &['\u5eb3']), ('\U0002f88d', &['\u5eb6']), ('\U0002f88e', + &['\u5eca']), ('\U0002f88f', &['\U0002a392']), ('\U0002f890', &['\u5efe']), ('\U0002f891', + &['\U00022331']), ('\U0002f892', &['\U00022331']), ('\U0002f893', &['\u8201']), + ('\U0002f894', &['\u5f22']), ('\U0002f895', &['\u5f22']), ('\U0002f896', &['\u38c7']), + ('\U0002f897', &['\U000232b8']), ('\U0002f898', &['\U000261da']), ('\U0002f899', + &['\u5f62']), ('\U0002f89a', &['\u5f6b']), ('\U0002f89b', &['\u38e3']), ('\U0002f89c', + &['\u5f9a']), ('\U0002f89d', &['\u5fcd']), ('\U0002f89e', &['\u5fd7']), ('\U0002f89f', + &['\u5ff9']), ('\U0002f8a0', &['\u6081']), ('\U0002f8a1', &['\u393a']), ('\U0002f8a2', + &['\u391c']), ('\U0002f8a3', &['\u6094']), ('\U0002f8a4', &['\U000226d4']), ('\U0002f8a5', + &['\u60c7']), ('\U0002f8a6', &['\u6148']), ('\U0002f8a7', &['\u614c']), ('\U0002f8a8', + &['\u614e']), ('\U0002f8a9', &['\u614c']), ('\U0002f8aa', &['\u617a']), ('\U0002f8ab', + &['\u618e']), ('\U0002f8ac', &['\u61b2']), ('\U0002f8ad', &['\u61a4']), ('\U0002f8ae', + &['\u61af']), ('\U0002f8af', &['\u61de']), ('\U0002f8b0', &['\u61f2']), ('\U0002f8b1', + &['\u61f6']), ('\U0002f8b2', &['\u6210']), ('\U0002f8b3', &['\u621b']), ('\U0002f8b4', + &['\u625d']), ('\U0002f8b5', &['\u62b1']), ('\U0002f8b6', &['\u62d4']), ('\U0002f8b7', + &['\u6350']), ('\U0002f8b8', &['\U00022b0c']), ('\U0002f8b9', &['\u633d']), ('\U0002f8ba', + &['\u62fc']), ('\U0002f8bb', &['\u6368']), ('\U0002f8bc', &['\u6383']), ('\U0002f8bd', + &['\u63e4']), ('\U0002f8be', &['\U00022bf1']), ('\U0002f8bf', &['\u6422']), ('\U0002f8c0', + &['\u63c5']), ('\U0002f8c1', &['\u63a9']), ('\U0002f8c2', &['\u3a2e']), ('\U0002f8c3', + &['\u6469']), ('\U0002f8c4', &['\u647e']), ('\U0002f8c5', &['\u649d']), ('\U0002f8c6', + &['\u6477']), ('\U0002f8c7', &['\u3a6c']), ('\U0002f8c8', &['\u654f']), ('\U0002f8c9', + &['\u656c']), ('\U0002f8ca', &['\U0002300a']), ('\U0002f8cb', &['\u65e3']), ('\U0002f8cc', + &['\u66f8']), ('\U0002f8cd', &['\u6649']), ('\U0002f8ce', &['\u3b19']), ('\U0002f8cf', + &['\u6691']), ('\U0002f8d0', &['\u3b08']), ('\U0002f8d1', &['\u3ae4']), ('\U0002f8d2', + &['\u5192']), ('\U0002f8d3', &['\u5195']), ('\U0002f8d4', &['\u6700']), ('\U0002f8d5', + &['\u669c']), ('\U0002f8d6', &['\u80ad']), ('\U0002f8d7', &['\u43d9']), ('\U0002f8d8', + &['\u6717']), ('\U0002f8d9', &['\u671b']), ('\U0002f8da', &['\u6721']), ('\U0002f8db', + &['\u675e']), ('\U0002f8dc', &['\u6753']), ('\U0002f8dd', &['\U000233c3']), ('\U0002f8de', + &['\u3b49']), ('\U0002f8df', &['\u67fa']), ('\U0002f8e0', &['\u6785']), ('\U0002f8e1', + &['\u6852']), ('\U0002f8e2', &['\u6885']), ('\U0002f8e3', &['\U0002346d']), ('\U0002f8e4', + &['\u688e']), ('\U0002f8e5', &['\u681f']), ('\U0002f8e6', &['\u6914']), ('\U0002f8e7', + &['\u3b9d']), ('\U0002f8e8', &['\u6942']), ('\U0002f8e9', &['\u69a3']), ('\U0002f8ea', + &['\u69ea']), ('\U0002f8eb', &['\u6aa8']), ('\U0002f8ec', &['\U000236a3']), ('\U0002f8ed', + &['\u6adb']), ('\U0002f8ee', &['\u3c18']), ('\U0002f8ef', &['\u6b21']), ('\U0002f8f0', + &['\U000238a7']), ('\U0002f8f1', &['\u6b54']), ('\U0002f8f2', &['\u3c4e']), ('\U0002f8f3', + &['\u6b72']), ('\U0002f8f4', &['\u6b9f']), ('\U0002f8f5', &['\u6bba']), ('\U0002f8f6', + &['\u6bbb']), ('\U0002f8f7', &['\U00023a8d']), ('\U0002f8f8', &['\U00021d0b']), + ('\U0002f8f9', &['\U00023afa']), ('\U0002f8fa', &['\u6c4e']), ('\U0002f8fb', + &['\U00023cbc']), ('\U0002f8fc', &['\u6cbf']), ('\U0002f8fd', &['\u6ccd']), ('\U0002f8fe', + &['\u6c67']), ('\U0002f8ff', &['\u6d16']), ('\U0002f900', &['\u6d3e']), ('\U0002f901', + &['\u6d77']), ('\U0002f902', &['\u6d41']), ('\U0002f903', &['\u6d69']), ('\U0002f904', + &['\u6d78']), ('\U0002f905', &['\u6d85']), ('\U0002f906', &['\U00023d1e']), ('\U0002f907', + &['\u6d34']), ('\U0002f908', &['\u6e2f']), ('\U0002f909', &['\u6e6e']), ('\U0002f90a', + &['\u3d33']), ('\U0002f90b', &['\u6ecb']), ('\U0002f90c', &['\u6ec7']), ('\U0002f90d', + &['\U00023ed1']), ('\U0002f90e', &['\u6df9']), ('\U0002f90f', &['\u6f6e']), ('\U0002f910', + &['\U00023f5e']), ('\U0002f911', &['\U00023f8e']), ('\U0002f912', &['\u6fc6']), + ('\U0002f913', &['\u7039']), ('\U0002f914', &['\u701e']), ('\U0002f915', &['\u701b']), + ('\U0002f916', &['\u3d96']), ('\U0002f917', &['\u704a']), ('\U0002f918', &['\u707d']), + ('\U0002f919', &['\u7077']), ('\U0002f91a', &['\u70ad']), ('\U0002f91b', &['\U00020525']), + ('\U0002f91c', &['\u7145']), ('\U0002f91d', &['\U00024263']), ('\U0002f91e', &['\u719c']), + ('\U0002f91f', &['\U000243ab']), ('\U0002f920', &['\u7228']), ('\U0002f921', &['\u7235']), + ('\U0002f922', &['\u7250']), ('\U0002f923', &['\U00024608']), ('\U0002f924', &['\u7280']), + ('\U0002f925', &['\u7295']), ('\U0002f926', &['\U00024735']), ('\U0002f927', + &['\U00024814']), ('\U0002f928', &['\u737a']), ('\U0002f929', &['\u738b']), ('\U0002f92a', + &['\u3eac']), ('\U0002f92b', &['\u73a5']), ('\U0002f92c', &['\u3eb8']), ('\U0002f92d', + &['\u3eb8']), ('\U0002f92e', &['\u7447']), ('\U0002f92f', &['\u745c']), ('\U0002f930', + &['\u7471']), ('\U0002f931', &['\u7485']), ('\U0002f932', &['\u74ca']), ('\U0002f933', + &['\u3f1b']), ('\U0002f934', &['\u7524']), ('\U0002f935', &['\U00024c36']), ('\U0002f936', + &['\u753e']), ('\U0002f937', &['\U00024c92']), ('\U0002f938', &['\u7570']), ('\U0002f939', + &['\U0002219f']), ('\U0002f93a', &['\u7610']), ('\U0002f93b', &['\U00024fa1']), + ('\U0002f93c', &['\U00024fb8']), ('\U0002f93d', &['\U00025044']), ('\U0002f93e', + &['\u3ffc']), ('\U0002f93f', &['\u4008']), ('\U0002f940', &['\u76f4']), ('\U0002f941', + &['\U000250f3']), ('\U0002f942', &['\U000250f2']), ('\U0002f943', &['\U00025119']), + ('\U0002f944', &['\U00025133']), ('\U0002f945', &['\u771e']), ('\U0002f946', &['\u771f']), + ('\U0002f947', &['\u771f']), ('\U0002f948', &['\u774a']), ('\U0002f949', &['\u4039']), + ('\U0002f94a', &['\u778b']), ('\U0002f94b', &['\u4046']), ('\U0002f94c', &['\u4096']), + ('\U0002f94d', &['\U0002541d']), ('\U0002f94e', &['\u784e']), ('\U0002f94f', &['\u788c']), + ('\U0002f950', &['\u78cc']), ('\U0002f951', &['\u40e3']), ('\U0002f952', &['\U00025626']), + ('\U0002f953', &['\u7956']), ('\U0002f954', &['\U0002569a']), ('\U0002f955', + &['\U000256c5']), ('\U0002f956', &['\u798f']), ('\U0002f957', &['\u79eb']), ('\U0002f958', + &['\u412f']), ('\U0002f959', &['\u7a40']), ('\U0002f95a', &['\u7a4a']), ('\U0002f95b', + &['\u7a4f']), ('\U0002f95c', &['\U0002597c']), ('\U0002f95d', &['\U00025aa7']), + ('\U0002f95e', &['\U00025aa7']), ('\U0002f95f', &['\u7aee']), ('\U0002f960', &['\u4202']), + ('\U0002f961', &['\U00025bab']), ('\U0002f962', &['\u7bc6']), ('\U0002f963', &['\u7bc9']), + ('\U0002f964', &['\u4227']), ('\U0002f965', &['\U00025c80']), ('\U0002f966', &['\u7cd2']), + ('\U0002f967', &['\u42a0']), ('\U0002f968', &['\u7ce8']), ('\U0002f969', &['\u7ce3']), + ('\U0002f96a', &['\u7d00']), ('\U0002f96b', &['\U00025f86']), ('\U0002f96c', &['\u7d63']), + ('\U0002f96d', &['\u4301']), ('\U0002f96e', &['\u7dc7']), ('\U0002f96f', &['\u7e02']), + ('\U0002f970', &['\u7e45']), ('\U0002f971', &['\u4334']), ('\U0002f972', &['\U00026228']), + ('\U0002f973', &['\U00026247']), ('\U0002f974', &['\u4359']), ('\U0002f975', + &['\U000262d9']), ('\U0002f976', &['\u7f7a']), ('\U0002f977', &['\U0002633e']), + ('\U0002f978', &['\u7f95']), ('\U0002f979', &['\u7ffa']), ('\U0002f97a', &['\u8005']), + ('\U0002f97b', &['\U000264da']), ('\U0002f97c', &['\U00026523']), ('\U0002f97d', + &['\u8060']), ('\U0002f97e', &['\U000265a8']), ('\U0002f97f', &['\u8070']), ('\U0002f980', + &['\U0002335f']), ('\U0002f981', &['\u43d5']), ('\U0002f982', &['\u80b2']), ('\U0002f983', + &['\u8103']), ('\U0002f984', &['\u440b']), ('\U0002f985', &['\u813e']), ('\U0002f986', + &['\u5ab5']), ('\U0002f987', &['\U000267a7']), ('\U0002f988', &['\U000267b5']), + ('\U0002f989', &['\U00023393']), ('\U0002f98a', &['\U0002339c']), ('\U0002f98b', + &['\u8201']), ('\U0002f98c', &['\u8204']), ('\U0002f98d', &['\u8f9e']), ('\U0002f98e', + &['\u446b']), ('\U0002f98f', &['\u8291']), ('\U0002f990', &['\u828b']), ('\U0002f991', + &['\u829d']), ('\U0002f992', &['\u52b3']), ('\U0002f993', &['\u82b1']), ('\U0002f994', + &['\u82b3']), ('\U0002f995', &['\u82bd']), ('\U0002f996', &['\u82e6']), ('\U0002f997', + &['\U00026b3c']), ('\U0002f998', &['\u82e5']), ('\U0002f999', &['\u831d']), ('\U0002f99a', + &['\u8363']), ('\U0002f99b', &['\u83ad']), ('\U0002f99c', &['\u8323']), ('\U0002f99d', + &['\u83bd']), ('\U0002f99e', &['\u83e7']), ('\U0002f99f', &['\u8457']), ('\U0002f9a0', + &['\u8353']), ('\U0002f9a1', &['\u83ca']), ('\U0002f9a2', &['\u83cc']), ('\U0002f9a3', + &['\u83dc']), ('\U0002f9a4', &['\U00026c36']), ('\U0002f9a5', &['\U00026d6b']), + ('\U0002f9a6', &['\U00026cd5']), ('\U0002f9a7', &['\u452b']), ('\U0002f9a8', &['\u84f1']), + ('\U0002f9a9', &['\u84f3']), ('\U0002f9aa', &['\u8516']), ('\U0002f9ab', &['\U000273ca']), + ('\U0002f9ac', &['\u8564']), ('\U0002f9ad', &['\U00026f2c']), ('\U0002f9ae', &['\u455d']), + ('\U0002f9af', &['\u4561']), ('\U0002f9b0', &['\U00026fb1']), ('\U0002f9b1', + &['\U000270d2']), ('\U0002f9b2', &['\u456b']), ('\U0002f9b3', &['\u8650']), ('\U0002f9b4', + &['\u865c']), ('\U0002f9b5', &['\u8667']), ('\U0002f9b6', &['\u8669']), ('\U0002f9b7', + &['\u86a9']), ('\U0002f9b8', &['\u8688']), ('\U0002f9b9', &['\u870e']), ('\U0002f9ba', + &['\u86e2']), ('\U0002f9bb', &['\u8779']), ('\U0002f9bc', &['\u8728']), ('\U0002f9bd', + &['\u876b']), ('\U0002f9be', &['\u8786']), ('\U0002f9bf', &['\u45d7']), ('\U0002f9c0', + &['\u87e1']), ('\U0002f9c1', &['\u8801']), ('\U0002f9c2', &['\u45f9']), ('\U0002f9c3', + &['\u8860']), ('\U0002f9c4', &['\u8863']), ('\U0002f9c5', &['\U00027667']), ('\U0002f9c6', + &['\u88d7']), ('\U0002f9c7', &['\u88de']), ('\U0002f9c8', &['\u4635']), ('\U0002f9c9', + &['\u88fa']), ('\U0002f9ca', &['\u34bb']), ('\U0002f9cb', &['\U000278ae']), ('\U0002f9cc', + &['\U00027966']), ('\U0002f9cd', &['\u46be']), ('\U0002f9ce', &['\u46c7']), ('\U0002f9cf', + &['\u8aa0']), ('\U0002f9d0', &['\u8aed']), ('\U0002f9d1', &['\u8b8a']), ('\U0002f9d2', + &['\u8c55']), ('\U0002f9d3', &['\U00027ca8']), ('\U0002f9d4', &['\u8cab']), ('\U0002f9d5', + &['\u8cc1']), ('\U0002f9d6', &['\u8d1b']), ('\U0002f9d7', &['\u8d77']), ('\U0002f9d8', + &['\U00027f2f']), ('\U0002f9d9', &['\U00020804']), ('\U0002f9da', &['\u8dcb']), + ('\U0002f9db', &['\u8dbc']), ('\U0002f9dc', &['\u8df0']), ('\U0002f9dd', &['\U000208de']), + ('\U0002f9de', &['\u8ed4']), ('\U0002f9df', &['\u8f38']), ('\U0002f9e0', &['\U000285d2']), + ('\U0002f9e1', &['\U000285ed']), ('\U0002f9e2', &['\u9094']), ('\U0002f9e3', &['\u90f1']), + ('\U0002f9e4', &['\u9111']), ('\U0002f9e5', &['\U0002872e']), ('\U0002f9e6', &['\u911b']), + ('\U0002f9e7', &['\u9238']), ('\U0002f9e8', &['\u92d7']), ('\U0002f9e9', &['\u92d8']), + ('\U0002f9ea', &['\u927c']), ('\U0002f9eb', &['\u93f9']), ('\U0002f9ec', &['\u9415']), + ('\U0002f9ed', &['\U00028bfa']), ('\U0002f9ee', &['\u958b']), ('\U0002f9ef', &['\u4995']), + ('\U0002f9f0', &['\u95b7']), ('\U0002f9f1', &['\U00028d77']), ('\U0002f9f2', &['\u49e6']), + ('\U0002f9f3', &['\u96c3']), ('\U0002f9f4', &['\u5db2']), ('\U0002f9f5', &['\u9723']), + ('\U0002f9f6', &['\U00029145']), ('\U0002f9f7', &['\U0002921a']), ('\U0002f9f8', + &['\u4a6e']), ('\U0002f9f9', &['\u4a76']), ('\U0002f9fa', &['\u97e0']), ('\U0002f9fb', + &['\U0002940a']), ('\U0002f9fc', &['\u4ab2']), ('\U0002f9fd', &['\U00029496']), + ('\U0002f9fe', &['\u980b']), ('\U0002f9ff', &['\u980b']), ('\U0002fa00', &['\u9829']), + ('\U0002fa01', &['\U000295b6']), ('\U0002fa02', &['\u98e2']), ('\U0002fa03', &['\u4b33']), + ('\U0002fa04', &['\u9929']), ('\U0002fa05', &['\u99a7']), ('\U0002fa06', &['\u99c2']), + ('\U0002fa07', &['\u99fe']), ('\U0002fa08', &['\u4bce']), ('\U0002fa09', &['\U00029b30']), + ('\U0002fa0a', &['\u9b12']), ('\U0002fa0b', &['\u9c40']), ('\U0002fa0c', &['\u9cfd']), + ('\U0002fa0d', &['\u4cce']), ('\U0002fa0e', &['\u4ced']), ('\U0002fa0f', &['\u9d67']), + ('\U0002fa10', &['\U0002a0ce']), ('\U0002fa11', &['\u4cf8']), ('\U0002fa12', + &['\U0002a105']), ('\U0002fa13', &['\U0002a20e']), ('\U0002fa14', &['\U0002a291']), + ('\U0002fa15', &['\u9ebb']), ('\U0002fa16', &['\u4d56']), ('\U0002fa17', &['\u9ef9']), + ('\U0002fa18', &['\u9efe']), ('\U0002fa19', &['\u9f05']), ('\U0002fa1a', &['\u9f0f']), + ('\U0002fa1b', &['\u9f16']), ('\U0002fa1c', &['\u9f3b']), ('\U0002fa1d', &['\U0002a600']) + ]; + + // Compatibility decompositions + static compatibility_table : &'static [(char, &'static [char])] = &[ + ('\xa0', &['\x20']), ('\xa8', &['\x20', '\u0308']), ('\xaa', &['\x61']), ('\xaf', &['\x20', + '\u0304']), ('\xb2', &['\x32']), ('\xb3', &['\x33']), ('\xb4', &['\x20', '\u0301']), + ('\xb5', &['\u03bc']), ('\xb8', &['\x20', '\u0327']), ('\xb9', &['\x31']), ('\xba', + &['\x6f']), ('\xbc', &['\x31', '\u2044', '\x34']), ('\xbd', &['\x31', '\u2044', '\x32']), + ('\xbe', &['\x33', '\u2044', '\x34']), ('\u0132', &['\x49', '\x4a']), ('\u0133', &['\x69', + '\x6a']), ('\u013f', &['\x4c', '\xb7']), ('\u0140', &['\x6c', '\xb7']), ('\u0149', + &['\u02bc', '\x6e']), ('\u017f', &['\x73']), ('\u01c4', &['\x44', '\u017d']), ('\u01c5', + &['\x44', '\u017e']), ('\u01c6', &['\x64', '\u017e']), ('\u01c7', &['\x4c', '\x4a']), + ('\u01c8', &['\x4c', '\x6a']), ('\u01c9', &['\x6c', '\x6a']), ('\u01ca', &['\x4e', '\x4a']), + ('\u01cb', &['\x4e', '\x6a']), ('\u01cc', &['\x6e', '\x6a']), ('\u01f1', &['\x44', '\x5a']), + ('\u01f2', &['\x44', '\x7a']), ('\u01f3', &['\x64', '\x7a']), ('\u02b0', &['\x68']), + ('\u02b1', &['\u0266']), ('\u02b2', &['\x6a']), ('\u02b3', &['\x72']), ('\u02b4', + &['\u0279']), ('\u02b5', &['\u027b']), ('\u02b6', &['\u0281']), ('\u02b7', &['\x77']), + ('\u02b8', &['\x79']), ('\u02d8', &['\x20', '\u0306']), ('\u02d9', &['\x20', '\u0307']), + ('\u02da', &['\x20', '\u030a']), ('\u02db', &['\x20', '\u0328']), ('\u02dc', &['\x20', + '\u0303']), ('\u02dd', &['\x20', '\u030b']), ('\u02e0', &['\u0263']), ('\u02e1', &['\x6c']), + ('\u02e2', &['\x73']), ('\u02e3', &['\x78']), ('\u02e4', &['\u0295']), ('\u037a', &['\x20', + '\u0345']), ('\u0384', &['\x20', '\u0301']), ('\u03d0', &['\u03b2']), ('\u03d1', + &['\u03b8']), ('\u03d2', &['\u03a5']), ('\u03d5', &['\u03c6']), ('\u03d6', &['\u03c0']), + ('\u03f0', &['\u03ba']), ('\u03f1', &['\u03c1']), ('\u03f2', &['\u03c2']), ('\u03f4', + &['\u0398']), ('\u03f5', &['\u03b5']), ('\u03f9', &['\u03a3']), ('\u0587', &['\u0565', + '\u0582']), ('\u0675', &['\u0627', '\u0674']), ('\u0676', &['\u0648', '\u0674']), ('\u0677', + &['\u06c7', '\u0674']), ('\u0678', &['\u064a', '\u0674']), ('\u0e33', &['\u0e4d', + '\u0e32']), ('\u0eb3', &['\u0ecd', '\u0eb2']), ('\u0edc', &['\u0eab', '\u0e99']), ('\u0edd', + &['\u0eab', '\u0ea1']), ('\u0f0c', &['\u0f0b']), ('\u0f77', &['\u0fb2', '\u0f81']), + ('\u0f79', &['\u0fb3', '\u0f81']), ('\u10fc', &['\u10dc']), ('\u1d2c', &['\x41']), + ('\u1d2d', &['\xc6']), ('\u1d2e', &['\x42']), ('\u1d30', &['\x44']), ('\u1d31', &['\x45']), + ('\u1d32', &['\u018e']), ('\u1d33', &['\x47']), ('\u1d34', &['\x48']), ('\u1d35', + &['\x49']), ('\u1d36', &['\x4a']), ('\u1d37', &['\x4b']), ('\u1d38', &['\x4c']), ('\u1d39', + &['\x4d']), ('\u1d3a', &['\x4e']), ('\u1d3c', &['\x4f']), ('\u1d3d', &['\u0222']), + ('\u1d3e', &['\x50']), ('\u1d3f', &['\x52']), ('\u1d40', &['\x54']), ('\u1d41', &['\x55']), + ('\u1d42', &['\x57']), ('\u1d43', &['\x61']), ('\u1d44', &['\u0250']), ('\u1d45', + &['\u0251']), ('\u1d46', &['\u1d02']), ('\u1d47', &['\x62']), ('\u1d48', &['\x64']), + ('\u1d49', &['\x65']), ('\u1d4a', &['\u0259']), ('\u1d4b', &['\u025b']), ('\u1d4c', + &['\u025c']), ('\u1d4d', &['\x67']), ('\u1d4f', &['\x6b']), ('\u1d50', &['\x6d']), + ('\u1d51', &['\u014b']), ('\u1d52', &['\x6f']), ('\u1d53', &['\u0254']), ('\u1d54', + &['\u1d16']), ('\u1d55', &['\u1d17']), ('\u1d56', &['\x70']), ('\u1d57', &['\x74']), + ('\u1d58', &['\x75']), ('\u1d59', &['\u1d1d']), ('\u1d5a', &['\u026f']), ('\u1d5b', + &['\x76']), ('\u1d5c', &['\u1d25']), ('\u1d5d', &['\u03b2']), ('\u1d5e', &['\u03b3']), + ('\u1d5f', &['\u03b4']), ('\u1d60', &['\u03c6']), ('\u1d61', &['\u03c7']), ('\u1d62', + &['\x69']), ('\u1d63', &['\x72']), ('\u1d64', &['\x75']), ('\u1d65', &['\x76']), ('\u1d66', + &['\u03b2']), ('\u1d67', &['\u03b3']), ('\u1d68', &['\u03c1']), ('\u1d69', &['\u03c6']), + ('\u1d6a', &['\u03c7']), ('\u1d78', &['\u043d']), ('\u1d9b', &['\u0252']), ('\u1d9c', + &['\x63']), ('\u1d9d', &['\u0255']), ('\u1d9e', &['\xf0']), ('\u1d9f', &['\u025c']), + ('\u1da0', &['\x66']), ('\u1da1', &['\u025f']), ('\u1da2', &['\u0261']), ('\u1da3', + &['\u0265']), ('\u1da4', &['\u0268']), ('\u1da5', &['\u0269']), ('\u1da6', &['\u026a']), + ('\u1da7', &['\u1d7b']), ('\u1da8', &['\u029d']), ('\u1da9', &['\u026d']), ('\u1daa', + &['\u1d85']), ('\u1dab', &['\u029f']), ('\u1dac', &['\u0271']), ('\u1dad', &['\u0270']), + ('\u1dae', &['\u0272']), ('\u1daf', &['\u0273']), ('\u1db0', &['\u0274']), ('\u1db1', + &['\u0275']), ('\u1db2', &['\u0278']), ('\u1db3', &['\u0282']), ('\u1db4', &['\u0283']), + ('\u1db5', &['\u01ab']), ('\u1db6', &['\u0289']), ('\u1db7', &['\u028a']), ('\u1db8', + &['\u1d1c']), ('\u1db9', &['\u028b']), ('\u1dba', &['\u028c']), ('\u1dbb', &['\x7a']), + ('\u1dbc', &['\u0290']), ('\u1dbd', &['\u0291']), ('\u1dbe', &['\u0292']), ('\u1dbf', + &['\u03b8']), ('\u1e9a', &['\x61', '\u02be']), ('\u1fbd', &['\x20', '\u0313']), ('\u1fbf', + &['\x20', '\u0313']), ('\u1fc0', &['\x20', '\u0342']), ('\u1ffe', &['\x20', '\u0314']), + ('\u2002', &['\x20']), ('\u2003', &['\x20']), ('\u2004', &['\x20']), ('\u2005', &['\x20']), + ('\u2006', &['\x20']), ('\u2007', &['\x20']), ('\u2008', &['\x20']), ('\u2009', &['\x20']), + ('\u200a', &['\x20']), ('\u2011', &['\u2010']), ('\u2017', &['\x20', '\u0333']), ('\u2024', + &['\x2e']), ('\u2025', &['\x2e', '\x2e']), ('\u2026', &['\x2e', '\x2e', '\x2e']), ('\u202f', + &['\x20']), ('\u2033', &['\u2032', '\u2032']), ('\u2034', &['\u2032', '\u2032', '\u2032']), + ('\u2036', &['\u2035', '\u2035']), ('\u2037', &['\u2035', '\u2035', '\u2035']), ('\u203c', + &['\x21', '\x21']), ('\u203e', &['\x20', '\u0305']), ('\u2047', &['\x3f', '\x3f']), + ('\u2048', &['\x3f', '\x21']), ('\u2049', &['\x21', '\x3f']), ('\u2057', &['\u2032', + '\u2032', '\u2032', '\u2032']), ('\u205f', &['\x20']), ('\u2070', &['\x30']), ('\u2071', + &['\x69']), ('\u2074', &['\x34']), ('\u2075', &['\x35']), ('\u2076', &['\x36']), ('\u2077', + &['\x37']), ('\u2078', &['\x38']), ('\u2079', &['\x39']), ('\u207a', &['\x2b']), ('\u207b', + &['\u2212']), ('\u207c', &['\x3d']), ('\u207d', &['\x28']), ('\u207e', &['\x29']), + ('\u207f', &['\x6e']), ('\u2080', &['\x30']), ('\u2081', &['\x31']), ('\u2082', &['\x32']), + ('\u2083', &['\x33']), ('\u2084', &['\x34']), ('\u2085', &['\x35']), ('\u2086', &['\x36']), + ('\u2087', &['\x37']), ('\u2088', &['\x38']), ('\u2089', &['\x39']), ('\u208a', &['\x2b']), + ('\u208b', &['\u2212']), ('\u208c', &['\x3d']), ('\u208d', &['\x28']), ('\u208e', + &['\x29']), ('\u2090', &['\x61']), ('\u2091', &['\x65']), ('\u2092', &['\x6f']), ('\u2093', + &['\x78']), ('\u2094', &['\u0259']), ('\u2095', &['\x68']), ('\u2096', &['\x6b']), + ('\u2097', &['\x6c']), ('\u2098', &['\x6d']), ('\u2099', &['\x6e']), ('\u209a', &['\x70']), + ('\u209b', &['\x73']), ('\u209c', &['\x74']), ('\u20a8', &['\x52', '\x73']), ('\u2100', + &['\x61', '\x2f', '\x63']), ('\u2101', &['\x61', '\x2f', '\x73']), ('\u2102', &['\x43']), + ('\u2103', &['\xb0', '\x43']), ('\u2105', &['\x63', '\x2f', '\x6f']), ('\u2106', &['\x63', + '\x2f', '\x75']), ('\u2107', &['\u0190']), ('\u2109', &['\xb0', '\x46']), ('\u210a', + &['\x67']), ('\u210b', &['\x48']), ('\u210c', &['\x48']), ('\u210d', &['\x48']), ('\u210e', + &['\x68']), ('\u210f', &['\u0127']), ('\u2110', &['\x49']), ('\u2111', &['\x49']), + ('\u2112', &['\x4c']), ('\u2113', &['\x6c']), ('\u2115', &['\x4e']), ('\u2116', &['\x4e', + '\x6f']), ('\u2119', &['\x50']), ('\u211a', &['\x51']), ('\u211b', &['\x52']), ('\u211c', + &['\x52']), ('\u211d', &['\x52']), ('\u2120', &['\x53', '\x4d']), ('\u2121', &['\x54', + '\x45', '\x4c']), ('\u2122', &['\x54', '\x4d']), ('\u2124', &['\x5a']), ('\u2128', + &['\x5a']), ('\u212c', &['\x42']), ('\u212d', &['\x43']), ('\u212f', &['\x65']), ('\u2130', + &['\x45']), ('\u2131', &['\x46']), ('\u2133', &['\x4d']), ('\u2134', &['\x6f']), ('\u2135', + &['\u05d0']), ('\u2136', &['\u05d1']), ('\u2137', &['\u05d2']), ('\u2138', &['\u05d3']), + ('\u2139', &['\x69']), ('\u213b', &['\x46', '\x41', '\x58']), ('\u213c', &['\u03c0']), + ('\u213d', &['\u03b3']), ('\u213e', &['\u0393']), ('\u213f', &['\u03a0']), ('\u2140', + &['\u2211']), ('\u2145', &['\x44']), ('\u2146', &['\x64']), ('\u2147', &['\x65']), + ('\u2148', &['\x69']), ('\u2149', &['\x6a']), ('\u2150', &['\x31', '\u2044', '\x37']), + ('\u2151', &['\x31', '\u2044', '\x39']), ('\u2152', &['\x31', '\u2044', '\x31', '\x30']), + ('\u2153', &['\x31', '\u2044', '\x33']), ('\u2154', &['\x32', '\u2044', '\x33']), ('\u2155', + &['\x31', '\u2044', '\x35']), ('\u2156', &['\x32', '\u2044', '\x35']), ('\u2157', &['\x33', + '\u2044', '\x35']), ('\u2158', &['\x34', '\u2044', '\x35']), ('\u2159', &['\x31', '\u2044', + '\x36']), ('\u215a', &['\x35', '\u2044', '\x36']), ('\u215b', &['\x31', '\u2044', '\x38']), + ('\u215c', &['\x33', '\u2044', '\x38']), ('\u215d', &['\x35', '\u2044', '\x38']), ('\u215e', + &['\x37', '\u2044', '\x38']), ('\u215f', &['\x31', '\u2044']), ('\u2160', &['\x49']), + ('\u2161', &['\x49', '\x49']), ('\u2162', &['\x49', '\x49', '\x49']), ('\u2163', &['\x49', + '\x56']), ('\u2164', &['\x56']), ('\u2165', &['\x56', '\x49']), ('\u2166', &['\x56', '\x49', + '\x49']), ('\u2167', &['\x56', '\x49', '\x49', '\x49']), ('\u2168', &['\x49', '\x58']), + ('\u2169', &['\x58']), ('\u216a', &['\x58', '\x49']), ('\u216b', &['\x58', '\x49', '\x49']), + ('\u216c', &['\x4c']), ('\u216d', &['\x43']), ('\u216e', &['\x44']), ('\u216f', &['\x4d']), + ('\u2170', &['\x69']), ('\u2171', &['\x69', '\x69']), ('\u2172', &['\x69', '\x69', '\x69']), + ('\u2173', &['\x69', '\x76']), ('\u2174', &['\x76']), ('\u2175', &['\x76', '\x69']), + ('\u2176', &['\x76', '\x69', '\x69']), ('\u2177', &['\x76', '\x69', '\x69', '\x69']), + ('\u2178', &['\x69', '\x78']), ('\u2179', &['\x78']), ('\u217a', &['\x78', '\x69']), + ('\u217b', &['\x78', '\x69', '\x69']), ('\u217c', &['\x6c']), ('\u217d', &['\x63']), + ('\u217e', &['\x64']), ('\u217f', &['\x6d']), ('\u2189', &['\x30', '\u2044', '\x33']), + ('\u222c', &['\u222b', '\u222b']), ('\u222d', &['\u222b', '\u222b', '\u222b']), ('\u222f', + &['\u222e', '\u222e']), ('\u2230', &['\u222e', '\u222e', '\u222e']), ('\u2460', &['\x31']), + ('\u2461', &['\x32']), ('\u2462', &['\x33']), ('\u2463', &['\x34']), ('\u2464', &['\x35']), + ('\u2465', &['\x36']), ('\u2466', &['\x37']), ('\u2467', &['\x38']), ('\u2468', &['\x39']), + ('\u2469', &['\x31', '\x30']), ('\u246a', &['\x31', '\x31']), ('\u246b', &['\x31', '\x32']), + ('\u246c', &['\x31', '\x33']), ('\u246d', &['\x31', '\x34']), ('\u246e', &['\x31', '\x35']), + ('\u246f', &['\x31', '\x36']), ('\u2470', &['\x31', '\x37']), ('\u2471', &['\x31', '\x38']), + ('\u2472', &['\x31', '\x39']), ('\u2473', &['\x32', '\x30']), ('\u2474', &['\x28', '\x31', + '\x29']), ('\u2475', &['\x28', '\x32', '\x29']), ('\u2476', &['\x28', '\x33', '\x29']), + ('\u2477', &['\x28', '\x34', '\x29']), ('\u2478', &['\x28', '\x35', '\x29']), ('\u2479', + &['\x28', '\x36', '\x29']), ('\u247a', &['\x28', '\x37', '\x29']), ('\u247b', &['\x28', + '\x38', '\x29']), ('\u247c', &['\x28', '\x39', '\x29']), ('\u247d', &['\x28', '\x31', + '\x30', '\x29']), ('\u247e', &['\x28', '\x31', '\x31', '\x29']), ('\u247f', &['\x28', + '\x31', '\x32', '\x29']), ('\u2480', &['\x28', '\x31', '\x33', '\x29']), ('\u2481', + &['\x28', '\x31', '\x34', '\x29']), ('\u2482', &['\x28', '\x31', '\x35', '\x29']), + ('\u2483', &['\x28', '\x31', '\x36', '\x29']), ('\u2484', &['\x28', '\x31', '\x37', + '\x29']), ('\u2485', &['\x28', '\x31', '\x38', '\x29']), ('\u2486', &['\x28', '\x31', + '\x39', '\x29']), ('\u2487', &['\x28', '\x32', '\x30', '\x29']), ('\u2488', &['\x31', + '\x2e']), ('\u2489', &['\x32', '\x2e']), ('\u248a', &['\x33', '\x2e']), ('\u248b', &['\x34', + '\x2e']), ('\u248c', &['\x35', '\x2e']), ('\u248d', &['\x36', '\x2e']), ('\u248e', &['\x37', + '\x2e']), ('\u248f', &['\x38', '\x2e']), ('\u2490', &['\x39', '\x2e']), ('\u2491', &['\x31', + '\x30', '\x2e']), ('\u2492', &['\x31', '\x31', '\x2e']), ('\u2493', &['\x31', '\x32', + '\x2e']), ('\u2494', &['\x31', '\x33', '\x2e']), ('\u2495', &['\x31', '\x34', '\x2e']), + ('\u2496', &['\x31', '\x35', '\x2e']), ('\u2497', &['\x31', '\x36', '\x2e']), ('\u2498', + &['\x31', '\x37', '\x2e']), ('\u2499', &['\x31', '\x38', '\x2e']), ('\u249a', &['\x31', + '\x39', '\x2e']), ('\u249b', &['\x32', '\x30', '\x2e']), ('\u249c', &['\x28', '\x61', + '\x29']), ('\u249d', &['\x28', '\x62', '\x29']), ('\u249e', &['\x28', '\x63', '\x29']), + ('\u249f', &['\x28', '\x64', '\x29']), ('\u24a0', &['\x28', '\x65', '\x29']), ('\u24a1', + &['\x28', '\x66', '\x29']), ('\u24a2', &['\x28', '\x67', '\x29']), ('\u24a3', &['\x28', + '\x68', '\x29']), ('\u24a4', &['\x28', '\x69', '\x29']), ('\u24a5', &['\x28', '\x6a', + '\x29']), ('\u24a6', &['\x28', '\x6b', '\x29']), ('\u24a7', &['\x28', '\x6c', '\x29']), + ('\u24a8', &['\x28', '\x6d', '\x29']), ('\u24a9', &['\x28', '\x6e', '\x29']), ('\u24aa', + &['\x28', '\x6f', '\x29']), ('\u24ab', &['\x28', '\x70', '\x29']), ('\u24ac', &['\x28', + '\x71', '\x29']), ('\u24ad', &['\x28', '\x72', '\x29']), ('\u24ae', &['\x28', '\x73', + '\x29']), ('\u24af', &['\x28', '\x74', '\x29']), ('\u24b0', &['\x28', '\x75', '\x29']), + ('\u24b1', &['\x28', '\x76', '\x29']), ('\u24b2', &['\x28', '\x77', '\x29']), ('\u24b3', + &['\x28', '\x78', '\x29']), ('\u24b4', &['\x28', '\x79', '\x29']), ('\u24b5', &['\x28', + '\x7a', '\x29']), ('\u24b6', &['\x41']), ('\u24b7', &['\x42']), ('\u24b8', &['\x43']), + ('\u24b9', &['\x44']), ('\u24ba', &['\x45']), ('\u24bb', &['\x46']), ('\u24bc', &['\x47']), + ('\u24bd', &['\x48']), ('\u24be', &['\x49']), ('\u24bf', &['\x4a']), ('\u24c0', &['\x4b']), + ('\u24c1', &['\x4c']), ('\u24c2', &['\x4d']), ('\u24c3', &['\x4e']), ('\u24c4', &['\x4f']), + ('\u24c5', &['\x50']), ('\u24c6', &['\x51']), ('\u24c7', &['\x52']), ('\u24c8', &['\x53']), + ('\u24c9', &['\x54']), ('\u24ca', &['\x55']), ('\u24cb', &['\x56']), ('\u24cc', &['\x57']), + ('\u24cd', &['\x58']), ('\u24ce', &['\x59']), ('\u24cf', &['\x5a']), ('\u24d0', &['\x61']), + ('\u24d1', &['\x62']), ('\u24d2', &['\x63']), ('\u24d3', &['\x64']), ('\u24d4', &['\x65']), + ('\u24d5', &['\x66']), ('\u24d6', &['\x67']), ('\u24d7', &['\x68']), ('\u24d8', &['\x69']), + ('\u24d9', &['\x6a']), ('\u24da', &['\x6b']), ('\u24db', &['\x6c']), ('\u24dc', &['\x6d']), + ('\u24dd', &['\x6e']), ('\u24de', &['\x6f']), ('\u24df', &['\x70']), ('\u24e0', &['\x71']), + ('\u24e1', &['\x72']), ('\u24e2', &['\x73']), ('\u24e3', &['\x74']), ('\u24e4', &['\x75']), + ('\u24e5', &['\x76']), ('\u24e6', &['\x77']), ('\u24e7', &['\x78']), ('\u24e8', &['\x79']), + ('\u24e9', &['\x7a']), ('\u24ea', &['\x30']), ('\u2a0c', &['\u222b', '\u222b', '\u222b', + '\u222b']), ('\u2a74', &['\x3a', '\x3a', '\x3d']), ('\u2a75', &['\x3d', '\x3d']), ('\u2a76', + &['\x3d', '\x3d', '\x3d']), ('\u2c7c', &['\x6a']), ('\u2c7d', &['\x56']), ('\u2d6f', + &['\u2d61']), ('\u2e9f', &['\u6bcd']), ('\u2ef3', &['\u9f9f']), ('\u2f00', &['\u4e00']), + ('\u2f01', &['\u4e28']), ('\u2f02', &['\u4e36']), ('\u2f03', &['\u4e3f']), ('\u2f04', + &['\u4e59']), ('\u2f05', &['\u4e85']), ('\u2f06', &['\u4e8c']), ('\u2f07', &['\u4ea0']), + ('\u2f08', &['\u4eba']), ('\u2f09', &['\u513f']), ('\u2f0a', &['\u5165']), ('\u2f0b', + &['\u516b']), ('\u2f0c', &['\u5182']), ('\u2f0d', &['\u5196']), ('\u2f0e', &['\u51ab']), + ('\u2f0f', &['\u51e0']), ('\u2f10', &['\u51f5']), ('\u2f11', &['\u5200']), ('\u2f12', + &['\u529b']), ('\u2f13', &['\u52f9']), ('\u2f14', &['\u5315']), ('\u2f15', &['\u531a']), + ('\u2f16', &['\u5338']), ('\u2f17', &['\u5341']), ('\u2f18', &['\u535c']), ('\u2f19', + &['\u5369']), ('\u2f1a', &['\u5382']), ('\u2f1b', &['\u53b6']), ('\u2f1c', &['\u53c8']), + ('\u2f1d', &['\u53e3']), ('\u2f1e', &['\u56d7']), ('\u2f1f', &['\u571f']), ('\u2f20', + &['\u58eb']), ('\u2f21', &['\u5902']), ('\u2f22', &['\u590a']), ('\u2f23', &['\u5915']), + ('\u2f24', &['\u5927']), ('\u2f25', &['\u5973']), ('\u2f26', &['\u5b50']), ('\u2f27', + &['\u5b80']), ('\u2f28', &['\u5bf8']), ('\u2f29', &['\u5c0f']), ('\u2f2a', &['\u5c22']), + ('\u2f2b', &['\u5c38']), ('\u2f2c', &['\u5c6e']), ('\u2f2d', &['\u5c71']), ('\u2f2e', + &['\u5ddb']), ('\u2f2f', &['\u5de5']), ('\u2f30', &['\u5df1']), ('\u2f31', &['\u5dfe']), + ('\u2f32', &['\u5e72']), ('\u2f33', &['\u5e7a']), ('\u2f34', &['\u5e7f']), ('\u2f35', + &['\u5ef4']), ('\u2f36', &['\u5efe']), ('\u2f37', &['\u5f0b']), ('\u2f38', &['\u5f13']), + ('\u2f39', &['\u5f50']), ('\u2f3a', &['\u5f61']), ('\u2f3b', &['\u5f73']), ('\u2f3c', + &['\u5fc3']), ('\u2f3d', &['\u6208']), ('\u2f3e', &['\u6236']), ('\u2f3f', &['\u624b']), + ('\u2f40', &['\u652f']), ('\u2f41', &['\u6534']), ('\u2f42', &['\u6587']), ('\u2f43', + &['\u6597']), ('\u2f44', &['\u65a4']), ('\u2f45', &['\u65b9']), ('\u2f46', &['\u65e0']), + ('\u2f47', &['\u65e5']), ('\u2f48', &['\u66f0']), ('\u2f49', &['\u6708']), ('\u2f4a', + &['\u6728']), ('\u2f4b', &['\u6b20']), ('\u2f4c', &['\u6b62']), ('\u2f4d', &['\u6b79']), + ('\u2f4e', &['\u6bb3']), ('\u2f4f', &['\u6bcb']), ('\u2f50', &['\u6bd4']), ('\u2f51', + &['\u6bdb']), ('\u2f52', &['\u6c0f']), ('\u2f53', &['\u6c14']), ('\u2f54', &['\u6c34']), + ('\u2f55', &['\u706b']), ('\u2f56', &['\u722a']), ('\u2f57', &['\u7236']), ('\u2f58', + &['\u723b']), ('\u2f59', &['\u723f']), ('\u2f5a', &['\u7247']), ('\u2f5b', &['\u7259']), + ('\u2f5c', &['\u725b']), ('\u2f5d', &['\u72ac']), ('\u2f5e', &['\u7384']), ('\u2f5f', + &['\u7389']), ('\u2f60', &['\u74dc']), ('\u2f61', &['\u74e6']), ('\u2f62', &['\u7518']), + ('\u2f63', &['\u751f']), ('\u2f64', &['\u7528']), ('\u2f65', &['\u7530']), ('\u2f66', + &['\u758b']), ('\u2f67', &['\u7592']), ('\u2f68', &['\u7676']), ('\u2f69', &['\u767d']), + ('\u2f6a', &['\u76ae']), ('\u2f6b', &['\u76bf']), ('\u2f6c', &['\u76ee']), ('\u2f6d', + &['\u77db']), ('\u2f6e', &['\u77e2']), ('\u2f6f', &['\u77f3']), ('\u2f70', &['\u793a']), + ('\u2f71', &['\u79b8']), ('\u2f72', &['\u79be']), ('\u2f73', &['\u7a74']), ('\u2f74', + &['\u7acb']), ('\u2f75', &['\u7af9']), ('\u2f76', &['\u7c73']), ('\u2f77', &['\u7cf8']), + ('\u2f78', &['\u7f36']), ('\u2f79', &['\u7f51']), ('\u2f7a', &['\u7f8a']), ('\u2f7b', + &['\u7fbd']), ('\u2f7c', &['\u8001']), ('\u2f7d', &['\u800c']), ('\u2f7e', &['\u8012']), + ('\u2f7f', &['\u8033']), ('\u2f80', &['\u807f']), ('\u2f81', &['\u8089']), ('\u2f82', + &['\u81e3']), ('\u2f83', &['\u81ea']), ('\u2f84', &['\u81f3']), ('\u2f85', &['\u81fc']), + ('\u2f86', &['\u820c']), ('\u2f87', &['\u821b']), ('\u2f88', &['\u821f']), ('\u2f89', + &['\u826e']), ('\u2f8a', &['\u8272']), ('\u2f8b', &['\u8278']), ('\u2f8c', &['\u864d']), + ('\u2f8d', &['\u866b']), ('\u2f8e', &['\u8840']), ('\u2f8f', &['\u884c']), ('\u2f90', + &['\u8863']), ('\u2f91', &['\u897e']), ('\u2f92', &['\u898b']), ('\u2f93', &['\u89d2']), + ('\u2f94', &['\u8a00']), ('\u2f95', &['\u8c37']), ('\u2f96', &['\u8c46']), ('\u2f97', + &['\u8c55']), ('\u2f98', &['\u8c78']), ('\u2f99', &['\u8c9d']), ('\u2f9a', &['\u8d64']), + ('\u2f9b', &['\u8d70']), ('\u2f9c', &['\u8db3']), ('\u2f9d', &['\u8eab']), ('\u2f9e', + &['\u8eca']), ('\u2f9f', &['\u8f9b']), ('\u2fa0', &['\u8fb0']), ('\u2fa1', &['\u8fb5']), + ('\u2fa2', &['\u9091']), ('\u2fa3', &['\u9149']), ('\u2fa4', &['\u91c6']), ('\u2fa5', + &['\u91cc']), ('\u2fa6', &['\u91d1']), ('\u2fa7', &['\u9577']), ('\u2fa8', &['\u9580']), + ('\u2fa9', &['\u961c']), ('\u2faa', &['\u96b6']), ('\u2fab', &['\u96b9']), ('\u2fac', + &['\u96e8']), ('\u2fad', &['\u9751']), ('\u2fae', &['\u975e']), ('\u2faf', &['\u9762']), + ('\u2fb0', &['\u9769']), ('\u2fb1', &['\u97cb']), ('\u2fb2', &['\u97ed']), ('\u2fb3', + &['\u97f3']), ('\u2fb4', &['\u9801']), ('\u2fb5', &['\u98a8']), ('\u2fb6', &['\u98db']), + ('\u2fb7', &['\u98df']), ('\u2fb8', &['\u9996']), ('\u2fb9', &['\u9999']), ('\u2fba', + &['\u99ac']), ('\u2fbb', &['\u9aa8']), ('\u2fbc', &['\u9ad8']), ('\u2fbd', &['\u9adf']), + ('\u2fbe', &['\u9b25']), ('\u2fbf', &['\u9b2f']), ('\u2fc0', &['\u9b32']), ('\u2fc1', + &['\u9b3c']), ('\u2fc2', &['\u9b5a']), ('\u2fc3', &['\u9ce5']), ('\u2fc4', &['\u9e75']), + ('\u2fc5', &['\u9e7f']), ('\u2fc6', &['\u9ea5']), ('\u2fc7', &['\u9ebb']), ('\u2fc8', + &['\u9ec3']), ('\u2fc9', &['\u9ecd']), ('\u2fca', &['\u9ed1']), ('\u2fcb', &['\u9ef9']), + ('\u2fcc', &['\u9efd']), ('\u2fcd', &['\u9f0e']), ('\u2fce', &['\u9f13']), ('\u2fcf', + &['\u9f20']), ('\u2fd0', &['\u9f3b']), ('\u2fd1', &['\u9f4a']), ('\u2fd2', &['\u9f52']), + ('\u2fd3', &['\u9f8d']), ('\u2fd4', &['\u9f9c']), ('\u2fd5', &['\u9fa0']), ('\u3000', + &['\x20']), ('\u3036', &['\u3012']), ('\u3038', &['\u5341']), ('\u3039', &['\u5344']), + ('\u303a', &['\u5345']), ('\u309b', &['\x20', '\u3099']), ('\u309c', &['\x20', '\u309a']), + ('\u309f', &['\u3088', '\u308a']), ('\u30ff', &['\u30b3', '\u30c8']), ('\u3131', + &['\u1100']), ('\u3132', &['\u1101']), ('\u3133', &['\u11aa']), ('\u3134', &['\u1102']), + ('\u3135', &['\u11ac']), ('\u3136', &['\u11ad']), ('\u3137', &['\u1103']), ('\u3138', + &['\u1104']), ('\u3139', &['\u1105']), ('\u313a', &['\u11b0']), ('\u313b', &['\u11b1']), + ('\u313c', &['\u11b2']), ('\u313d', &['\u11b3']), ('\u313e', &['\u11b4']), ('\u313f', + &['\u11b5']), ('\u3140', &['\u111a']), ('\u3141', &['\u1106']), ('\u3142', &['\u1107']), + ('\u3143', &['\u1108']), ('\u3144', &['\u1121']), ('\u3145', &['\u1109']), ('\u3146', + &['\u110a']), ('\u3147', &['\u110b']), ('\u3148', &['\u110c']), ('\u3149', &['\u110d']), + ('\u314a', &['\u110e']), ('\u314b', &['\u110f']), ('\u314c', &['\u1110']), ('\u314d', + &['\u1111']), ('\u314e', &['\u1112']), ('\u314f', &['\u1161']), ('\u3150', &['\u1162']), + ('\u3151', &['\u1163']), ('\u3152', &['\u1164']), ('\u3153', &['\u1165']), ('\u3154', + &['\u1166']), ('\u3155', &['\u1167']), ('\u3156', &['\u1168']), ('\u3157', &['\u1169']), + ('\u3158', &['\u116a']), ('\u3159', &['\u116b']), ('\u315a', &['\u116c']), ('\u315b', + &['\u116d']), ('\u315c', &['\u116e']), ('\u315d', &['\u116f']), ('\u315e', &['\u1170']), + ('\u315f', &['\u1171']), ('\u3160', &['\u1172']), ('\u3161', &['\u1173']), ('\u3162', + &['\u1174']), ('\u3163', &['\u1175']), ('\u3164', &['\u1160']), ('\u3165', &['\u1114']), + ('\u3166', &['\u1115']), ('\u3167', &['\u11c7']), ('\u3168', &['\u11c8']), ('\u3169', + &['\u11cc']), ('\u316a', &['\u11ce']), ('\u316b', &['\u11d3']), ('\u316c', &['\u11d7']), + ('\u316d', &['\u11d9']), ('\u316e', &['\u111c']), ('\u316f', &['\u11dd']), ('\u3170', + &['\u11df']), ('\u3171', &['\u111d']), ('\u3172', &['\u111e']), ('\u3173', &['\u1120']), + ('\u3174', &['\u1122']), ('\u3175', &['\u1123']), ('\u3176', &['\u1127']), ('\u3177', + &['\u1129']), ('\u3178', &['\u112b']), ('\u3179', &['\u112c']), ('\u317a', &['\u112d']), + ('\u317b', &['\u112e']), ('\u317c', &['\u112f']), ('\u317d', &['\u1132']), ('\u317e', + &['\u1136']), ('\u317f', &['\u1140']), ('\u3180', &['\u1147']), ('\u3181', &['\u114c']), + ('\u3182', &['\u11f1']), ('\u3183', &['\u11f2']), ('\u3184', &['\u1157']), ('\u3185', + &['\u1158']), ('\u3186', &['\u1159']), ('\u3187', &['\u1184']), ('\u3188', &['\u1185']), + ('\u3189', &['\u1188']), ('\u318a', &['\u1191']), ('\u318b', &['\u1192']), ('\u318c', + &['\u1194']), ('\u318d', &['\u119e']), ('\u318e', &['\u11a1']), ('\u3192', &['\u4e00']), + ('\u3193', &['\u4e8c']), ('\u3194', &['\u4e09']), ('\u3195', &['\u56db']), ('\u3196', + &['\u4e0a']), ('\u3197', &['\u4e2d']), ('\u3198', &['\u4e0b']), ('\u3199', &['\u7532']), + ('\u319a', &['\u4e59']), ('\u319b', &['\u4e19']), ('\u319c', &['\u4e01']), ('\u319d', + &['\u5929']), ('\u319e', &['\u5730']), ('\u319f', &['\u4eba']), ('\u3200', &['\x28', + '\u1100', '\x29']), ('\u3201', &['\x28', '\u1102', '\x29']), ('\u3202', &['\x28', '\u1103', + '\x29']), ('\u3203', &['\x28', '\u1105', '\x29']), ('\u3204', &['\x28', '\u1106', '\x29']), + ('\u3205', &['\x28', '\u1107', '\x29']), ('\u3206', &['\x28', '\u1109', '\x29']), ('\u3207', + &['\x28', '\u110b', '\x29']), ('\u3208', &['\x28', '\u110c', '\x29']), ('\u3209', &['\x28', + '\u110e', '\x29']), ('\u320a', &['\x28', '\u110f', '\x29']), ('\u320b', &['\x28', '\u1110', + '\x29']), ('\u320c', &['\x28', '\u1111', '\x29']), ('\u320d', &['\x28', '\u1112', '\x29']), + ('\u320e', &['\x28', '\u1100', '\u1161', '\x29']), ('\u320f', &['\x28', '\u1102', '\u1161', + '\x29']), ('\u3210', &['\x28', '\u1103', '\u1161', '\x29']), ('\u3211', &['\x28', '\u1105', + '\u1161', '\x29']), ('\u3212', &['\x28', '\u1106', '\u1161', '\x29']), ('\u3213', &['\x28', + '\u1107', '\u1161', '\x29']), ('\u3214', &['\x28', '\u1109', '\u1161', '\x29']), ('\u3215', + &['\x28', '\u110b', '\u1161', '\x29']), ('\u3216', &['\x28', '\u110c', '\u1161', '\x29']), + ('\u3217', &['\x28', '\u110e', '\u1161', '\x29']), ('\u3218', &['\x28', '\u110f', '\u1161', + '\x29']), ('\u3219', &['\x28', '\u1110', '\u1161', '\x29']), ('\u321a', &['\x28', '\u1111', + '\u1161', '\x29']), ('\u321b', &['\x28', '\u1112', '\u1161', '\x29']), ('\u321c', &['\x28', + '\u110c', '\u116e', '\x29']), ('\u321d', &['\x28', '\u110b', '\u1169', '\u110c', '\u1165', + '\u11ab', '\x29']), ('\u321e', &['\x28', '\u110b', '\u1169', '\u1112', '\u116e', '\x29']), + ('\u3220', &['\x28', '\u4e00', '\x29']), ('\u3221', &['\x28', '\u4e8c', '\x29']), ('\u3222', + &['\x28', '\u4e09', '\x29']), ('\u3223', &['\x28', '\u56db', '\x29']), ('\u3224', &['\x28', + '\u4e94', '\x29']), ('\u3225', &['\x28', '\u516d', '\x29']), ('\u3226', &['\x28', '\u4e03', + '\x29']), ('\u3227', &['\x28', '\u516b', '\x29']), ('\u3228', &['\x28', '\u4e5d', '\x29']), + ('\u3229', &['\x28', '\u5341', '\x29']), ('\u322a', &['\x28', '\u6708', '\x29']), ('\u322b', + &['\x28', '\u706b', '\x29']), ('\u322c', &['\x28', '\u6c34', '\x29']), ('\u322d', &['\x28', + '\u6728', '\x29']), ('\u322e', &['\x28', '\u91d1', '\x29']), ('\u322f', &['\x28', '\u571f', + '\x29']), ('\u3230', &['\x28', '\u65e5', '\x29']), ('\u3231', &['\x28', '\u682a', '\x29']), + ('\u3232', &['\x28', '\u6709', '\x29']), ('\u3233', &['\x28', '\u793e', '\x29']), ('\u3234', + &['\x28', '\u540d', '\x29']), ('\u3235', &['\x28', '\u7279', '\x29']), ('\u3236', &['\x28', + '\u8ca1', '\x29']), ('\u3237', &['\x28', '\u795d', '\x29']), ('\u3238', &['\x28', '\u52b4', + '\x29']), ('\u3239', &['\x28', '\u4ee3', '\x29']), ('\u323a', &['\x28', '\u547c', '\x29']), + ('\u323b', &['\x28', '\u5b66', '\x29']), ('\u323c', &['\x28', '\u76e3', '\x29']), ('\u323d', + &['\x28', '\u4f01', '\x29']), ('\u323e', &['\x28', '\u8cc7', '\x29']), ('\u323f', &['\x28', + '\u5354', '\x29']), ('\u3240', &['\x28', '\u796d', '\x29']), ('\u3241', &['\x28', '\u4f11', + '\x29']), ('\u3242', &['\x28', '\u81ea', '\x29']), ('\u3243', &['\x28', '\u81f3', '\x29']), + ('\u3244', &['\u554f']), ('\u3245', &['\u5e7c']), ('\u3246', &['\u6587']), ('\u3247', + &['\u7b8f']), ('\u3250', &['\x50', '\x54', '\x45']), ('\u3251', &['\x32', '\x31']), + ('\u3252', &['\x32', '\x32']), ('\u3253', &['\x32', '\x33']), ('\u3254', &['\x32', '\x34']), + ('\u3255', &['\x32', '\x35']), ('\u3256', &['\x32', '\x36']), ('\u3257', &['\x32', '\x37']), + ('\u3258', &['\x32', '\x38']), ('\u3259', &['\x32', '\x39']), ('\u325a', &['\x33', '\x30']), + ('\u325b', &['\x33', '\x31']), ('\u325c', &['\x33', '\x32']), ('\u325d', &['\x33', '\x33']), + ('\u325e', &['\x33', '\x34']), ('\u325f', &['\x33', '\x35']), ('\u3260', &['\u1100']), + ('\u3261', &['\u1102']), ('\u3262', &['\u1103']), ('\u3263', &['\u1105']), ('\u3264', + &['\u1106']), ('\u3265', &['\u1107']), ('\u3266', &['\u1109']), ('\u3267', &['\u110b']), + ('\u3268', &['\u110c']), ('\u3269', &['\u110e']), ('\u326a', &['\u110f']), ('\u326b', + &['\u1110']), ('\u326c', &['\u1111']), ('\u326d', &['\u1112']), ('\u326e', &['\u1100', + '\u1161']), ('\u326f', &['\u1102', '\u1161']), ('\u3270', &['\u1103', '\u1161']), ('\u3271', + &['\u1105', '\u1161']), ('\u3272', &['\u1106', '\u1161']), ('\u3273', &['\u1107', + '\u1161']), ('\u3274', &['\u1109', '\u1161']), ('\u3275', &['\u110b', '\u1161']), ('\u3276', + &['\u110c', '\u1161']), ('\u3277', &['\u110e', '\u1161']), ('\u3278', &['\u110f', + '\u1161']), ('\u3279', &['\u1110', '\u1161']), ('\u327a', &['\u1111', '\u1161']), ('\u327b', + &['\u1112', '\u1161']), ('\u327c', &['\u110e', '\u1161', '\u11b7', '\u1100', '\u1169']), + ('\u327d', &['\u110c', '\u116e', '\u110b', '\u1174']), ('\u327e', &['\u110b', '\u116e']), + ('\u3280', &['\u4e00']), ('\u3281', &['\u4e8c']), ('\u3282', &['\u4e09']), ('\u3283', + &['\u56db']), ('\u3284', &['\u4e94']), ('\u3285', &['\u516d']), ('\u3286', &['\u4e03']), + ('\u3287', &['\u516b']), ('\u3288', &['\u4e5d']), ('\u3289', &['\u5341']), ('\u328a', + &['\u6708']), ('\u328b', &['\u706b']), ('\u328c', &['\u6c34']), ('\u328d', &['\u6728']), + ('\u328e', &['\u91d1']), ('\u328f', &['\u571f']), ('\u3290', &['\u65e5']), ('\u3291', + &['\u682a']), ('\u3292', &['\u6709']), ('\u3293', &['\u793e']), ('\u3294', &['\u540d']), + ('\u3295', &['\u7279']), ('\u3296', &['\u8ca1']), ('\u3297', &['\u795d']), ('\u3298', + &['\u52b4']), ('\u3299', &['\u79d8']), ('\u329a', &['\u7537']), ('\u329b', &['\u5973']), + ('\u329c', &['\u9069']), ('\u329d', &['\u512a']), ('\u329e', &['\u5370']), ('\u329f', + &['\u6ce8']), ('\u32a0', &['\u9805']), ('\u32a1', &['\u4f11']), ('\u32a2', &['\u5199']), + ('\u32a3', &['\u6b63']), ('\u32a4', &['\u4e0a']), ('\u32a5', &['\u4e2d']), ('\u32a6', + &['\u4e0b']), ('\u32a7', &['\u5de6']), ('\u32a8', &['\u53f3']), ('\u32a9', &['\u533b']), + ('\u32aa', &['\u5b97']), ('\u32ab', &['\u5b66']), ('\u32ac', &['\u76e3']), ('\u32ad', + &['\u4f01']), ('\u32ae', &['\u8cc7']), ('\u32af', &['\u5354']), ('\u32b0', &['\u591c']), + ('\u32b1', &['\x33', '\x36']), ('\u32b2', &['\x33', '\x37']), ('\u32b3', &['\x33', '\x38']), + ('\u32b4', &['\x33', '\x39']), ('\u32b5', &['\x34', '\x30']), ('\u32b6', &['\x34', '\x31']), + ('\u32b7', &['\x34', '\x32']), ('\u32b8', &['\x34', '\x33']), ('\u32b9', &['\x34', '\x34']), + ('\u32ba', &['\x34', '\x35']), ('\u32bb', &['\x34', '\x36']), ('\u32bc', &['\x34', '\x37']), + ('\u32bd', &['\x34', '\x38']), ('\u32be', &['\x34', '\x39']), ('\u32bf', &['\x35', '\x30']), + ('\u32c0', &['\x31', '\u6708']), ('\u32c1', &['\x32', '\u6708']), ('\u32c2', &['\x33', + '\u6708']), ('\u32c3', &['\x34', '\u6708']), ('\u32c4', &['\x35', '\u6708']), ('\u32c5', + &['\x36', '\u6708']), ('\u32c6', &['\x37', '\u6708']), ('\u32c7', &['\x38', '\u6708']), + ('\u32c8', &['\x39', '\u6708']), ('\u32c9', &['\x31', '\x30', '\u6708']), ('\u32ca', + &['\x31', '\x31', '\u6708']), ('\u32cb', &['\x31', '\x32', '\u6708']), ('\u32cc', &['\x48', + '\x67']), ('\u32cd', &['\x65', '\x72', '\x67']), ('\u32ce', &['\x65', '\x56']), ('\u32cf', + &['\x4c', '\x54', '\x44']), ('\u32d0', &['\u30a2']), ('\u32d1', &['\u30a4']), ('\u32d2', + &['\u30a6']), ('\u32d3', &['\u30a8']), ('\u32d4', &['\u30aa']), ('\u32d5', &['\u30ab']), + ('\u32d6', &['\u30ad']), ('\u32d7', &['\u30af']), ('\u32d8', &['\u30b1']), ('\u32d9', + &['\u30b3']), ('\u32da', &['\u30b5']), ('\u32db', &['\u30b7']), ('\u32dc', &['\u30b9']), + ('\u32dd', &['\u30bb']), ('\u32de', &['\u30bd']), ('\u32df', &['\u30bf']), ('\u32e0', + &['\u30c1']), ('\u32e1', &['\u30c4']), ('\u32e2', &['\u30c6']), ('\u32e3', &['\u30c8']), + ('\u32e4', &['\u30ca']), ('\u32e5', &['\u30cb']), ('\u32e6', &['\u30cc']), ('\u32e7', + &['\u30cd']), ('\u32e8', &['\u30ce']), ('\u32e9', &['\u30cf']), ('\u32ea', &['\u30d2']), + ('\u32eb', &['\u30d5']), ('\u32ec', &['\u30d8']), ('\u32ed', &['\u30db']), ('\u32ee', + &['\u30de']), ('\u32ef', &['\u30df']), ('\u32f0', &['\u30e0']), ('\u32f1', &['\u30e1']), + ('\u32f2', &['\u30e2']), ('\u32f3', &['\u30e4']), ('\u32f4', &['\u30e6']), ('\u32f5', + &['\u30e8']), ('\u32f6', &['\u30e9']), ('\u32f7', &['\u30ea']), ('\u32f8', &['\u30eb']), + ('\u32f9', &['\u30ec']), ('\u32fa', &['\u30ed']), ('\u32fb', &['\u30ef']), ('\u32fc', + &['\u30f0']), ('\u32fd', &['\u30f1']), ('\u32fe', &['\u30f2']), ('\u3300', &['\u30a2', + '\u30d1', '\u30fc', '\u30c8']), ('\u3301', &['\u30a2', '\u30eb', '\u30d5', '\u30a1']), + ('\u3302', &['\u30a2', '\u30f3', '\u30da', '\u30a2']), ('\u3303', &['\u30a2', '\u30fc', + '\u30eb']), ('\u3304', &['\u30a4', '\u30cb', '\u30f3', '\u30b0']), ('\u3305', &['\u30a4', + '\u30f3', '\u30c1']), ('\u3306', &['\u30a6', '\u30a9', '\u30f3']), ('\u3307', &['\u30a8', + '\u30b9', '\u30af', '\u30fc', '\u30c9']), ('\u3308', &['\u30a8', '\u30fc', '\u30ab', + '\u30fc']), ('\u3309', &['\u30aa', '\u30f3', '\u30b9']), ('\u330a', &['\u30aa', '\u30fc', + '\u30e0']), ('\u330b', &['\u30ab', '\u30a4', '\u30ea']), ('\u330c', &['\u30ab', '\u30e9', + '\u30c3', '\u30c8']), ('\u330d', &['\u30ab', '\u30ed', '\u30ea', '\u30fc']), ('\u330e', + &['\u30ac', '\u30ed', '\u30f3']), ('\u330f', &['\u30ac', '\u30f3', '\u30de']), ('\u3310', + &['\u30ae', '\u30ac']), ('\u3311', &['\u30ae', '\u30cb', '\u30fc']), ('\u3312', &['\u30ad', + '\u30e5', '\u30ea', '\u30fc']), ('\u3313', &['\u30ae', '\u30eb', '\u30c0', '\u30fc']), + ('\u3314', &['\u30ad', '\u30ed']), ('\u3315', &['\u30ad', '\u30ed', '\u30b0', '\u30e9', + '\u30e0']), ('\u3316', &['\u30ad', '\u30ed', '\u30e1', '\u30fc', '\u30c8', '\u30eb']), + ('\u3317', &['\u30ad', '\u30ed', '\u30ef', '\u30c3', '\u30c8']), ('\u3318', &['\u30b0', + '\u30e9', '\u30e0']), ('\u3319', &['\u30b0', '\u30e9', '\u30e0', '\u30c8', '\u30f3']), + ('\u331a', &['\u30af', '\u30eb', '\u30bc', '\u30a4', '\u30ed']), ('\u331b', &['\u30af', + '\u30ed', '\u30fc', '\u30cd']), ('\u331c', &['\u30b1', '\u30fc', '\u30b9']), ('\u331d', + &['\u30b3', '\u30eb', '\u30ca']), ('\u331e', &['\u30b3', '\u30fc', '\u30dd']), ('\u331f', + &['\u30b5', '\u30a4', '\u30af', '\u30eb']), ('\u3320', &['\u30b5', '\u30f3', '\u30c1', + '\u30fc', '\u30e0']), ('\u3321', &['\u30b7', '\u30ea', '\u30f3', '\u30b0']), ('\u3322', + &['\u30bb', '\u30f3', '\u30c1']), ('\u3323', &['\u30bb', '\u30f3', '\u30c8']), ('\u3324', + &['\u30c0', '\u30fc', '\u30b9']), ('\u3325', &['\u30c7', '\u30b7']), ('\u3326', &['\u30c9', + '\u30eb']), ('\u3327', &['\u30c8', '\u30f3']), ('\u3328', &['\u30ca', '\u30ce']), ('\u3329', + &['\u30ce', '\u30c3', '\u30c8']), ('\u332a', &['\u30cf', '\u30a4', '\u30c4']), ('\u332b', + &['\u30d1', '\u30fc', '\u30bb', '\u30f3', '\u30c8']), ('\u332c', &['\u30d1', '\u30fc', + '\u30c4']), ('\u332d', &['\u30d0', '\u30fc', '\u30ec', '\u30eb']), ('\u332e', &['\u30d4', + '\u30a2', '\u30b9', '\u30c8', '\u30eb']), ('\u332f', &['\u30d4', '\u30af', '\u30eb']), + ('\u3330', &['\u30d4', '\u30b3']), ('\u3331', &['\u30d3', '\u30eb']), ('\u3332', &['\u30d5', + '\u30a1', '\u30e9', '\u30c3', '\u30c9']), ('\u3333', &['\u30d5', '\u30a3', '\u30fc', + '\u30c8']), ('\u3334', &['\u30d6', '\u30c3', '\u30b7', '\u30a7', '\u30eb']), ('\u3335', + &['\u30d5', '\u30e9', '\u30f3']), ('\u3336', &['\u30d8', '\u30af', '\u30bf', '\u30fc', + '\u30eb']), ('\u3337', &['\u30da', '\u30bd']), ('\u3338', &['\u30da', '\u30cb', '\u30d2']), + ('\u3339', &['\u30d8', '\u30eb', '\u30c4']), ('\u333a', &['\u30da', '\u30f3', '\u30b9']), + ('\u333b', &['\u30da', '\u30fc', '\u30b8']), ('\u333c', &['\u30d9', '\u30fc', '\u30bf']), + ('\u333d', &['\u30dd', '\u30a4', '\u30f3', '\u30c8']), ('\u333e', &['\u30dc', '\u30eb', + '\u30c8']), ('\u333f', &['\u30db', '\u30f3']), ('\u3340', &['\u30dd', '\u30f3', '\u30c9']), + ('\u3341', &['\u30db', '\u30fc', '\u30eb']), ('\u3342', &['\u30db', '\u30fc', '\u30f3']), + ('\u3343', &['\u30de', '\u30a4', '\u30af', '\u30ed']), ('\u3344', &['\u30de', '\u30a4', + '\u30eb']), ('\u3345', &['\u30de', '\u30c3', '\u30cf']), ('\u3346', &['\u30de', '\u30eb', + '\u30af']), ('\u3347', &['\u30de', '\u30f3', '\u30b7', '\u30e7', '\u30f3']), ('\u3348', + &['\u30df', '\u30af', '\u30ed', '\u30f3']), ('\u3349', &['\u30df', '\u30ea']), ('\u334a', + &['\u30df', '\u30ea', '\u30d0', '\u30fc', '\u30eb']), ('\u334b', &['\u30e1', '\u30ac']), + ('\u334c', &['\u30e1', '\u30ac', '\u30c8', '\u30f3']), ('\u334d', &['\u30e1', '\u30fc', + '\u30c8', '\u30eb']), ('\u334e', &['\u30e4', '\u30fc', '\u30c9']), ('\u334f', &['\u30e4', + '\u30fc', '\u30eb']), ('\u3350', &['\u30e6', '\u30a2', '\u30f3']), ('\u3351', &['\u30ea', + '\u30c3', '\u30c8', '\u30eb']), ('\u3352', &['\u30ea', '\u30e9']), ('\u3353', &['\u30eb', + '\u30d4', '\u30fc']), ('\u3354', &['\u30eb', '\u30fc', '\u30d6', '\u30eb']), ('\u3355', + &['\u30ec', '\u30e0']), ('\u3356', &['\u30ec', '\u30f3', '\u30c8', '\u30b2', '\u30f3']), + ('\u3357', &['\u30ef', '\u30c3', '\u30c8']), ('\u3358', &['\x30', '\u70b9']), ('\u3359', + &['\x31', '\u70b9']), ('\u335a', &['\x32', '\u70b9']), ('\u335b', &['\x33', '\u70b9']), + ('\u335c', &['\x34', '\u70b9']), ('\u335d', &['\x35', '\u70b9']), ('\u335e', &['\x36', + '\u70b9']), ('\u335f', &['\x37', '\u70b9']), ('\u3360', &['\x38', '\u70b9']), ('\u3361', + &['\x39', '\u70b9']), ('\u3362', &['\x31', '\x30', '\u70b9']), ('\u3363', &['\x31', '\x31', + '\u70b9']), ('\u3364', &['\x31', '\x32', '\u70b9']), ('\u3365', &['\x31', '\x33', + '\u70b9']), ('\u3366', &['\x31', '\x34', '\u70b9']), ('\u3367', &['\x31', '\x35', + '\u70b9']), ('\u3368', &['\x31', '\x36', '\u70b9']), ('\u3369', &['\x31', '\x37', + '\u70b9']), ('\u336a', &['\x31', '\x38', '\u70b9']), ('\u336b', &['\x31', '\x39', + '\u70b9']), ('\u336c', &['\x32', '\x30', '\u70b9']), ('\u336d', &['\x32', '\x31', + '\u70b9']), ('\u336e', &['\x32', '\x32', '\u70b9']), ('\u336f', &['\x32', '\x33', + '\u70b9']), ('\u3370', &['\x32', '\x34', '\u70b9']), ('\u3371', &['\x68', '\x50', '\x61']), + ('\u3372', &['\x64', '\x61']), ('\u3373', &['\x41', '\x55']), ('\u3374', &['\x62', '\x61', + '\x72']), ('\u3375', &['\x6f', '\x56']), ('\u3376', &['\x70', '\x63']), ('\u3377', &['\x64', + '\x6d']), ('\u3378', &['\x64', '\x6d', '\xb2']), ('\u3379', &['\x64', '\x6d', '\xb3']), + ('\u337a', &['\x49', '\x55']), ('\u337b', &['\u5e73', '\u6210']), ('\u337c', &['\u662d', + '\u548c']), ('\u337d', &['\u5927', '\u6b63']), ('\u337e', &['\u660e', '\u6cbb']), ('\u337f', + &['\u682a', '\u5f0f', '\u4f1a', '\u793e']), ('\u3380', &['\x70', '\x41']), ('\u3381', + &['\x6e', '\x41']), ('\u3382', &['\u03bc', '\x41']), ('\u3383', &['\x6d', '\x41']), + ('\u3384', &['\x6b', '\x41']), ('\u3385', &['\x4b', '\x42']), ('\u3386', &['\x4d', '\x42']), + ('\u3387', &['\x47', '\x42']), ('\u3388', &['\x63', '\x61', '\x6c']), ('\u3389', &['\x6b', + '\x63', '\x61', '\x6c']), ('\u338a', &['\x70', '\x46']), ('\u338b', &['\x6e', '\x46']), + ('\u338c', &['\u03bc', '\x46']), ('\u338d', &['\u03bc', '\x67']), ('\u338e', &['\x6d', + '\x67']), ('\u338f', &['\x6b', '\x67']), ('\u3390', &['\x48', '\x7a']), ('\u3391', &['\x6b', + '\x48', '\x7a']), ('\u3392', &['\x4d', '\x48', '\x7a']), ('\u3393', &['\x47', '\x48', + '\x7a']), ('\u3394', &['\x54', '\x48', '\x7a']), ('\u3395', &['\u03bc', '\u2113']), + ('\u3396', &['\x6d', '\u2113']), ('\u3397', &['\x64', '\u2113']), ('\u3398', &['\x6b', + '\u2113']), ('\u3399', &['\x66', '\x6d']), ('\u339a', &['\x6e', '\x6d']), ('\u339b', + &['\u03bc', '\x6d']), ('\u339c', &['\x6d', '\x6d']), ('\u339d', &['\x63', '\x6d']), + ('\u339e', &['\x6b', '\x6d']), ('\u339f', &['\x6d', '\x6d', '\xb2']), ('\u33a0', &['\x63', + '\x6d', '\xb2']), ('\u33a1', &['\x6d', '\xb2']), ('\u33a2', &['\x6b', '\x6d', '\xb2']), + ('\u33a3', &['\x6d', '\x6d', '\xb3']), ('\u33a4', &['\x63', '\x6d', '\xb3']), ('\u33a5', + &['\x6d', '\xb3']), ('\u33a6', &['\x6b', '\x6d', '\xb3']), ('\u33a7', &['\x6d', '\u2215', + '\x73']), ('\u33a8', &['\x6d', '\u2215', '\x73', '\xb2']), ('\u33a9', &['\x50', '\x61']), + ('\u33aa', &['\x6b', '\x50', '\x61']), ('\u33ab', &['\x4d', '\x50', '\x61']), ('\u33ac', + &['\x47', '\x50', '\x61']), ('\u33ad', &['\x72', '\x61', '\x64']), ('\u33ae', &['\x72', + '\x61', '\x64', '\u2215', '\x73']), ('\u33af', &['\x72', '\x61', '\x64', '\u2215', '\x73', + '\xb2']), ('\u33b0', &['\x70', '\x73']), ('\u33b1', &['\x6e', '\x73']), ('\u33b2', + &['\u03bc', '\x73']), ('\u33b3', &['\x6d', '\x73']), ('\u33b4', &['\x70', '\x56']), + ('\u33b5', &['\x6e', '\x56']), ('\u33b6', &['\u03bc', '\x56']), ('\u33b7', &['\x6d', + '\x56']), ('\u33b8', &['\x6b', '\x56']), ('\u33b9', &['\x4d', '\x56']), ('\u33ba', &['\x70', + '\x57']), ('\u33bb', &['\x6e', '\x57']), ('\u33bc', &['\u03bc', '\x57']), ('\u33bd', + &['\x6d', '\x57']), ('\u33be', &['\x6b', '\x57']), ('\u33bf', &['\x4d', '\x57']), ('\u33c0', + &['\x6b', '\u03a9']), ('\u33c1', &['\x4d', '\u03a9']), ('\u33c2', &['\x61', '\x2e', '\x6d', + '\x2e']), ('\u33c3', &['\x42', '\x71']), ('\u33c4', &['\x63', '\x63']), ('\u33c5', &['\x63', + '\x64']), ('\u33c6', &['\x43', '\u2215', '\x6b', '\x67']), ('\u33c7', &['\x43', '\x6f', + '\x2e']), ('\u33c8', &['\x64', '\x42']), ('\u33c9', &['\x47', '\x79']), ('\u33ca', &['\x68', + '\x61']), ('\u33cb', &['\x48', '\x50']), ('\u33cc', &['\x69', '\x6e']), ('\u33cd', &['\x4b', + '\x4b']), ('\u33ce', &['\x4b', '\x4d']), ('\u33cf', &['\x6b', '\x74']), ('\u33d0', &['\x6c', + '\x6d']), ('\u33d1', &['\x6c', '\x6e']), ('\u33d2', &['\x6c', '\x6f', '\x67']), ('\u33d3', + &['\x6c', '\x78']), ('\u33d4', &['\x6d', '\x62']), ('\u33d5', &['\x6d', '\x69', '\x6c']), + ('\u33d6', &['\x6d', '\x6f', '\x6c']), ('\u33d7', &['\x50', '\x48']), ('\u33d8', &['\x70', + '\x2e', '\x6d', '\x2e']), ('\u33d9', &['\x50', '\x50', '\x4d']), ('\u33da', &['\x50', + '\x52']), ('\u33db', &['\x73', '\x72']), ('\u33dc', &['\x53', '\x76']), ('\u33dd', &['\x57', + '\x62']), ('\u33de', &['\x56', '\u2215', '\x6d']), ('\u33df', &['\x41', '\u2215', '\x6d']), + ('\u33e0', &['\x31', '\u65e5']), ('\u33e1', &['\x32', '\u65e5']), ('\u33e2', &['\x33', + '\u65e5']), ('\u33e3', &['\x34', '\u65e5']), ('\u33e4', &['\x35', '\u65e5']), ('\u33e5', + &['\x36', '\u65e5']), ('\u33e6', &['\x37', '\u65e5']), ('\u33e7', &['\x38', '\u65e5']), + ('\u33e8', &['\x39', '\u65e5']), ('\u33e9', &['\x31', '\x30', '\u65e5']), ('\u33ea', + &['\x31', '\x31', '\u65e5']), ('\u33eb', &['\x31', '\x32', '\u65e5']), ('\u33ec', &['\x31', + '\x33', '\u65e5']), ('\u33ed', &['\x31', '\x34', '\u65e5']), ('\u33ee', &['\x31', '\x35', + '\u65e5']), ('\u33ef', &['\x31', '\x36', '\u65e5']), ('\u33f0', &['\x31', '\x37', + '\u65e5']), ('\u33f1', &['\x31', '\x38', '\u65e5']), ('\u33f2', &['\x31', '\x39', + '\u65e5']), ('\u33f3', &['\x32', '\x30', '\u65e5']), ('\u33f4', &['\x32', '\x31', + '\u65e5']), ('\u33f5', &['\x32', '\x32', '\u65e5']), ('\u33f6', &['\x32', '\x33', + '\u65e5']), ('\u33f7', &['\x32', '\x34', '\u65e5']), ('\u33f8', &['\x32', '\x35', + '\u65e5']), ('\u33f9', &['\x32', '\x36', '\u65e5']), ('\u33fa', &['\x32', '\x37', + '\u65e5']), ('\u33fb', &['\x32', '\x38', '\u65e5']), ('\u33fc', &['\x32', '\x39', + '\u65e5']), ('\u33fd', &['\x33', '\x30', '\u65e5']), ('\u33fe', &['\x33', '\x31', + '\u65e5']), ('\u33ff', &['\x67', '\x61', '\x6c']), ('\ua770', &['\ua76f']), ('\ua7f8', + &['\u0126']), ('\ua7f9', &['\u0153']), ('\ufb00', &['\x66', '\x66']), ('\ufb01', &['\x66', + '\x69']), ('\ufb02', &['\x66', '\x6c']), ('\ufb03', &['\x66', '\x66', '\x69']), ('\ufb04', + &['\x66', '\x66', '\x6c']), ('\ufb05', &['\u017f', '\x74']), ('\ufb06', &['\x73', '\x74']), + ('\ufb13', &['\u0574', '\u0576']), ('\ufb14', &['\u0574', '\u0565']), ('\ufb15', &['\u0574', + '\u056b']), ('\ufb16', &['\u057e', '\u0576']), ('\ufb17', &['\u0574', '\u056d']), ('\ufb20', + &['\u05e2']), ('\ufb21', &['\u05d0']), ('\ufb22', &['\u05d3']), ('\ufb23', &['\u05d4']), + ('\ufb24', &['\u05db']), ('\ufb25', &['\u05dc']), ('\ufb26', &['\u05dd']), ('\ufb27', + &['\u05e8']), ('\ufb28', &['\u05ea']), ('\ufb29', &['\x2b']), ('\ufb4f', &['\u05d0', + '\u05dc']), ('\ufb50', &['\u0671']), ('\ufb51', &['\u0671']), ('\ufb52', &['\u067b']), + ('\ufb53', &['\u067b']), ('\ufb54', &['\u067b']), ('\ufb55', &['\u067b']), ('\ufb56', + &['\u067e']), ('\ufb57', &['\u067e']), ('\ufb58', &['\u067e']), ('\ufb59', &['\u067e']), + ('\ufb5a', &['\u0680']), ('\ufb5b', &['\u0680']), ('\ufb5c', &['\u0680']), ('\ufb5d', + &['\u0680']), ('\ufb5e', &['\u067a']), ('\ufb5f', &['\u067a']), ('\ufb60', &['\u067a']), + ('\ufb61', &['\u067a']), ('\ufb62', &['\u067f']), ('\ufb63', &['\u067f']), ('\ufb64', + &['\u067f']), ('\ufb65', &['\u067f']), ('\ufb66', &['\u0679']), ('\ufb67', &['\u0679']), + ('\ufb68', &['\u0679']), ('\ufb69', &['\u0679']), ('\ufb6a', &['\u06a4']), ('\ufb6b', + &['\u06a4']), ('\ufb6c', &['\u06a4']), ('\ufb6d', &['\u06a4']), ('\ufb6e', &['\u06a6']), + ('\ufb6f', &['\u06a6']), ('\ufb70', &['\u06a6']), ('\ufb71', &['\u06a6']), ('\ufb72', + &['\u0684']), ('\ufb73', &['\u0684']), ('\ufb74', &['\u0684']), ('\ufb75', &['\u0684']), + ('\ufb76', &['\u0683']), ('\ufb77', &['\u0683']), ('\ufb78', &['\u0683']), ('\ufb79', + &['\u0683']), ('\ufb7a', &['\u0686']), ('\ufb7b', &['\u0686']), ('\ufb7c', &['\u0686']), + ('\ufb7d', &['\u0686']), ('\ufb7e', &['\u0687']), ('\ufb7f', &['\u0687']), ('\ufb80', + &['\u0687']), ('\ufb81', &['\u0687']), ('\ufb82', &['\u068d']), ('\ufb83', &['\u068d']), + ('\ufb84', &['\u068c']), ('\ufb85', &['\u068c']), ('\ufb86', &['\u068e']), ('\ufb87', + &['\u068e']), ('\ufb88', &['\u0688']), ('\ufb89', &['\u0688']), ('\ufb8a', &['\u0698']), + ('\ufb8b', &['\u0698']), ('\ufb8c', &['\u0691']), ('\ufb8d', &['\u0691']), ('\ufb8e', + &['\u06a9']), ('\ufb8f', &['\u06a9']), ('\ufb90', &['\u06a9']), ('\ufb91', &['\u06a9']), + ('\ufb92', &['\u06af']), ('\ufb93', &['\u06af']), ('\ufb94', &['\u06af']), ('\ufb95', + &['\u06af']), ('\ufb96', &['\u06b3']), ('\ufb97', &['\u06b3']), ('\ufb98', &['\u06b3']), + ('\ufb99', &['\u06b3']), ('\ufb9a', &['\u06b1']), ('\ufb9b', &['\u06b1']), ('\ufb9c', + &['\u06b1']), ('\ufb9d', &['\u06b1']), ('\ufb9e', &['\u06ba']), ('\ufb9f', &['\u06ba']), + ('\ufba0', &['\u06bb']), ('\ufba1', &['\u06bb']), ('\ufba2', &['\u06bb']), ('\ufba3', + &['\u06bb']), ('\ufba4', &['\u06c0']), ('\ufba5', &['\u06c0']), ('\ufba6', &['\u06c1']), + ('\ufba7', &['\u06c1']), ('\ufba8', &['\u06c1']), ('\ufba9', &['\u06c1']), ('\ufbaa', + &['\u06be']), ('\ufbab', &['\u06be']), ('\ufbac', &['\u06be']), ('\ufbad', &['\u06be']), + ('\ufbae', &['\u06d2']), ('\ufbaf', &['\u06d2']), ('\ufbb0', &['\u06d3']), ('\ufbb1', + &['\u06d3']), ('\ufbd3', &['\u06ad']), ('\ufbd4', &['\u06ad']), ('\ufbd5', &['\u06ad']), + ('\ufbd6', &['\u06ad']), ('\ufbd7', &['\u06c7']), ('\ufbd8', &['\u06c7']), ('\ufbd9', + &['\u06c6']), ('\ufbda', &['\u06c6']), ('\ufbdb', &['\u06c8']), ('\ufbdc', &['\u06c8']), + ('\ufbdd', &['\u0677']), ('\ufbde', &['\u06cb']), ('\ufbdf', &['\u06cb']), ('\ufbe0', + &['\u06c5']), ('\ufbe1', &['\u06c5']), ('\ufbe2', &['\u06c9']), ('\ufbe3', &['\u06c9']), + ('\ufbe4', &['\u06d0']), ('\ufbe5', &['\u06d0']), ('\ufbe6', &['\u06d0']), ('\ufbe7', + &['\u06d0']), ('\ufbe8', &['\u0649']), ('\ufbe9', &['\u0649']), ('\ufbea', &['\u0626', + '\u0627']), ('\ufbeb', &['\u0626', '\u0627']), ('\ufbec', &['\u0626', '\u06d5']), ('\ufbed', + &['\u0626', '\u06d5']), ('\ufbee', &['\u0626', '\u0648']), ('\ufbef', &['\u0626', + '\u0648']), ('\ufbf0', &['\u0626', '\u06c7']), ('\ufbf1', &['\u0626', '\u06c7']), ('\ufbf2', + &['\u0626', '\u06c6']), ('\ufbf3', &['\u0626', '\u06c6']), ('\ufbf4', &['\u0626', + '\u06c8']), ('\ufbf5', &['\u0626', '\u06c8']), ('\ufbf6', &['\u0626', '\u06d0']), ('\ufbf7', + &['\u0626', '\u06d0']), ('\ufbf8', &['\u0626', '\u06d0']), ('\ufbf9', &['\u0626', + '\u0649']), ('\ufbfa', &['\u0626', '\u0649']), ('\ufbfb', &['\u0626', '\u0649']), ('\ufbfc', + &['\u06cc']), ('\ufbfd', &['\u06cc']), ('\ufbfe', &['\u06cc']), ('\ufbff', &['\u06cc']), + ('\ufc00', &['\u0626', '\u062c']), ('\ufc01', &['\u0626', '\u062d']), ('\ufc02', &['\u0626', + '\u0645']), ('\ufc03', &['\u0626', '\u0649']), ('\ufc04', &['\u0626', '\u064a']), ('\ufc05', + &['\u0628', '\u062c']), ('\ufc06', &['\u0628', '\u062d']), ('\ufc07', &['\u0628', + '\u062e']), ('\ufc08', &['\u0628', '\u0645']), ('\ufc09', &['\u0628', '\u0649']), ('\ufc0a', + &['\u0628', '\u064a']), ('\ufc0b', &['\u062a', '\u062c']), ('\ufc0c', &['\u062a', + '\u062d']), ('\ufc0d', &['\u062a', '\u062e']), ('\ufc0e', &['\u062a', '\u0645']), ('\ufc0f', + &['\u062a', '\u0649']), ('\ufc10', &['\u062a', '\u064a']), ('\ufc11', &['\u062b', + '\u062c']), ('\ufc12', &['\u062b', '\u0645']), ('\ufc13', &['\u062b', '\u0649']), ('\ufc14', + &['\u062b', '\u064a']), ('\ufc15', &['\u062c', '\u062d']), ('\ufc16', &['\u062c', + '\u0645']), ('\ufc17', &['\u062d', '\u062c']), ('\ufc18', &['\u062d', '\u0645']), ('\ufc19', + &['\u062e', '\u062c']), ('\ufc1a', &['\u062e', '\u062d']), ('\ufc1b', &['\u062e', + '\u0645']), ('\ufc1c', &['\u0633', '\u062c']), ('\ufc1d', &['\u0633', '\u062d']), ('\ufc1e', + &['\u0633', '\u062e']), ('\ufc1f', &['\u0633', '\u0645']), ('\ufc20', &['\u0635', + '\u062d']), ('\ufc21', &['\u0635', '\u0645']), ('\ufc22', &['\u0636', '\u062c']), ('\ufc23', + &['\u0636', '\u062d']), ('\ufc24', &['\u0636', '\u062e']), ('\ufc25', &['\u0636', + '\u0645']), ('\ufc26', &['\u0637', '\u062d']), ('\ufc27', &['\u0637', '\u0645']), ('\ufc28', + &['\u0638', '\u0645']), ('\ufc29', &['\u0639', '\u062c']), ('\ufc2a', &['\u0639', + '\u0645']), ('\ufc2b', &['\u063a', '\u062c']), ('\ufc2c', &['\u063a', '\u0645']), ('\ufc2d', + &['\u0641', '\u062c']), ('\ufc2e', &['\u0641', '\u062d']), ('\ufc2f', &['\u0641', + '\u062e']), ('\ufc30', &['\u0641', '\u0645']), ('\ufc31', &['\u0641', '\u0649']), ('\ufc32', + &['\u0641', '\u064a']), ('\ufc33', &['\u0642', '\u062d']), ('\ufc34', &['\u0642', + '\u0645']), ('\ufc35', &['\u0642', '\u0649']), ('\ufc36', &['\u0642', '\u064a']), ('\ufc37', + &['\u0643', '\u0627']), ('\ufc38', &['\u0643', '\u062c']), ('\ufc39', &['\u0643', + '\u062d']), ('\ufc3a', &['\u0643', '\u062e']), ('\ufc3b', &['\u0643', '\u0644']), ('\ufc3c', + &['\u0643', '\u0645']), ('\ufc3d', &['\u0643', '\u0649']), ('\ufc3e', &['\u0643', + '\u064a']), ('\ufc3f', &['\u0644', '\u062c']), ('\ufc40', &['\u0644', '\u062d']), ('\ufc41', + &['\u0644', '\u062e']), ('\ufc42', &['\u0644', '\u0645']), ('\ufc43', &['\u0644', + '\u0649']), ('\ufc44', &['\u0644', '\u064a']), ('\ufc45', &['\u0645', '\u062c']), ('\ufc46', + &['\u0645', '\u062d']), ('\ufc47', &['\u0645', '\u062e']), ('\ufc48', &['\u0645', + '\u0645']), ('\ufc49', &['\u0645', '\u0649']), ('\ufc4a', &['\u0645', '\u064a']), ('\ufc4b', + &['\u0646', '\u062c']), ('\ufc4c', &['\u0646', '\u062d']), ('\ufc4d', &['\u0646', + '\u062e']), ('\ufc4e', &['\u0646', '\u0645']), ('\ufc4f', &['\u0646', '\u0649']), ('\ufc50', + &['\u0646', '\u064a']), ('\ufc51', &['\u0647', '\u062c']), ('\ufc52', &['\u0647', + '\u0645']), ('\ufc53', &['\u0647', '\u0649']), ('\ufc54', &['\u0647', '\u064a']), ('\ufc55', + &['\u064a', '\u062c']), ('\ufc56', &['\u064a', '\u062d']), ('\ufc57', &['\u064a', + '\u062e']), ('\ufc58', &['\u064a', '\u0645']), ('\ufc59', &['\u064a', '\u0649']), ('\ufc5a', + &['\u064a', '\u064a']), ('\ufc5b', &['\u0630', '\u0670']), ('\ufc5c', &['\u0631', + '\u0670']), ('\ufc5d', &['\u0649', '\u0670']), ('\ufc5e', &['\x20', '\u064c', '\u0651']), + ('\ufc5f', &['\x20', '\u064d', '\u0651']), ('\ufc60', &['\x20', '\u064e', '\u0651']), + ('\ufc61', &['\x20', '\u064f', '\u0651']), ('\ufc62', &['\x20', '\u0650', '\u0651']), + ('\ufc63', &['\x20', '\u0651', '\u0670']), ('\ufc64', &['\u0626', '\u0631']), ('\ufc65', + &['\u0626', '\u0632']), ('\ufc66', &['\u0626', '\u0645']), ('\ufc67', &['\u0626', + '\u0646']), ('\ufc68', &['\u0626', '\u0649']), ('\ufc69', &['\u0626', '\u064a']), ('\ufc6a', + &['\u0628', '\u0631']), ('\ufc6b', &['\u0628', '\u0632']), ('\ufc6c', &['\u0628', + '\u0645']), ('\ufc6d', &['\u0628', '\u0646']), ('\ufc6e', &['\u0628', '\u0649']), ('\ufc6f', + &['\u0628', '\u064a']), ('\ufc70', &['\u062a', '\u0631']), ('\ufc71', &['\u062a', + '\u0632']), ('\ufc72', &['\u062a', '\u0645']), ('\ufc73', &['\u062a', '\u0646']), ('\ufc74', + &['\u062a', '\u0649']), ('\ufc75', &['\u062a', '\u064a']), ('\ufc76', &['\u062b', + '\u0631']), ('\ufc77', &['\u062b', '\u0632']), ('\ufc78', &['\u062b', '\u0645']), ('\ufc79', + &['\u062b', '\u0646']), ('\ufc7a', &['\u062b', '\u0649']), ('\ufc7b', &['\u062b', + '\u064a']), ('\ufc7c', &['\u0641', '\u0649']), ('\ufc7d', &['\u0641', '\u064a']), ('\ufc7e', + &['\u0642', '\u0649']), ('\ufc7f', &['\u0642', '\u064a']), ('\ufc80', &['\u0643', + '\u0627']), ('\ufc81', &['\u0643', '\u0644']), ('\ufc82', &['\u0643', '\u0645']), ('\ufc83', + &['\u0643', '\u0649']), ('\ufc84', &['\u0643', '\u064a']), ('\ufc85', &['\u0644', + '\u0645']), ('\ufc86', &['\u0644', '\u0649']), ('\ufc87', &['\u0644', '\u064a']), ('\ufc88', + &['\u0645', '\u0627']), ('\ufc89', &['\u0645', '\u0645']), ('\ufc8a', &['\u0646', + '\u0631']), ('\ufc8b', &['\u0646', '\u0632']), ('\ufc8c', &['\u0646', '\u0645']), ('\ufc8d', + &['\u0646', '\u0646']), ('\ufc8e', &['\u0646', '\u0649']), ('\ufc8f', &['\u0646', + '\u064a']), ('\ufc90', &['\u0649', '\u0670']), ('\ufc91', &['\u064a', '\u0631']), ('\ufc92', + &['\u064a', '\u0632']), ('\ufc93', &['\u064a', '\u0645']), ('\ufc94', &['\u064a', + '\u0646']), ('\ufc95', &['\u064a', '\u0649']), ('\ufc96', &['\u064a', '\u064a']), ('\ufc97', + &['\u0626', '\u062c']), ('\ufc98', &['\u0626', '\u062d']), ('\ufc99', &['\u0626', + '\u062e']), ('\ufc9a', &['\u0626', '\u0645']), ('\ufc9b', &['\u0626', '\u0647']), ('\ufc9c', + &['\u0628', '\u062c']), ('\ufc9d', &['\u0628', '\u062d']), ('\ufc9e', &['\u0628', + '\u062e']), ('\ufc9f', &['\u0628', '\u0645']), ('\ufca0', &['\u0628', '\u0647']), ('\ufca1', + &['\u062a', '\u062c']), ('\ufca2', &['\u062a', '\u062d']), ('\ufca3', &['\u062a', + '\u062e']), ('\ufca4', &['\u062a', '\u0645']), ('\ufca5', &['\u062a', '\u0647']), ('\ufca6', + &['\u062b', '\u0645']), ('\ufca7', &['\u062c', '\u062d']), ('\ufca8', &['\u062c', + '\u0645']), ('\ufca9', &['\u062d', '\u062c']), ('\ufcaa', &['\u062d', '\u0645']), ('\ufcab', + &['\u062e', '\u062c']), ('\ufcac', &['\u062e', '\u0645']), ('\ufcad', &['\u0633', + '\u062c']), ('\ufcae', &['\u0633', '\u062d']), ('\ufcaf', &['\u0633', '\u062e']), ('\ufcb0', + &['\u0633', '\u0645']), ('\ufcb1', &['\u0635', '\u062d']), ('\ufcb2', &['\u0635', + '\u062e']), ('\ufcb3', &['\u0635', '\u0645']), ('\ufcb4', &['\u0636', '\u062c']), ('\ufcb5', + &['\u0636', '\u062d']), ('\ufcb6', &['\u0636', '\u062e']), ('\ufcb7', &['\u0636', + '\u0645']), ('\ufcb8', &['\u0637', '\u062d']), ('\ufcb9', &['\u0638', '\u0645']), ('\ufcba', + &['\u0639', '\u062c']), ('\ufcbb', &['\u0639', '\u0645']), ('\ufcbc', &['\u063a', + '\u062c']), ('\ufcbd', &['\u063a', '\u0645']), ('\ufcbe', &['\u0641', '\u062c']), ('\ufcbf', + &['\u0641', '\u062d']), ('\ufcc0', &['\u0641', '\u062e']), ('\ufcc1', &['\u0641', + '\u0645']), ('\ufcc2', &['\u0642', '\u062d']), ('\ufcc3', &['\u0642', '\u0645']), ('\ufcc4', + &['\u0643', '\u062c']), ('\ufcc5', &['\u0643', '\u062d']), ('\ufcc6', &['\u0643', + '\u062e']), ('\ufcc7', &['\u0643', '\u0644']), ('\ufcc8', &['\u0643', '\u0645']), ('\ufcc9', + &['\u0644', '\u062c']), ('\ufcca', &['\u0644', '\u062d']), ('\ufccb', &['\u0644', + '\u062e']), ('\ufccc', &['\u0644', '\u0645']), ('\ufccd', &['\u0644', '\u0647']), ('\ufcce', + &['\u0645', '\u062c']), ('\ufccf', &['\u0645', '\u062d']), ('\ufcd0', &['\u0645', + '\u062e']), ('\ufcd1', &['\u0645', '\u0645']), ('\ufcd2', &['\u0646', '\u062c']), ('\ufcd3', + &['\u0646', '\u062d']), ('\ufcd4', &['\u0646', '\u062e']), ('\ufcd5', &['\u0646', + '\u0645']), ('\ufcd6', &['\u0646', '\u0647']), ('\ufcd7', &['\u0647', '\u062c']), ('\ufcd8', + &['\u0647', '\u0645']), ('\ufcd9', &['\u0647', '\u0670']), ('\ufcda', &['\u064a', + '\u062c']), ('\ufcdb', &['\u064a', '\u062d']), ('\ufcdc', &['\u064a', '\u062e']), ('\ufcdd', + &['\u064a', '\u0645']), ('\ufcde', &['\u064a', '\u0647']), ('\ufcdf', &['\u0626', + '\u0645']), ('\ufce0', &['\u0626', '\u0647']), ('\ufce1', &['\u0628', '\u0645']), ('\ufce2', + &['\u0628', '\u0647']), ('\ufce3', &['\u062a', '\u0645']), ('\ufce4', &['\u062a', + '\u0647']), ('\ufce5', &['\u062b', '\u0645']), ('\ufce6', &['\u062b', '\u0647']), ('\ufce7', + &['\u0633', '\u0645']), ('\ufce8', &['\u0633', '\u0647']), ('\ufce9', &['\u0634', + '\u0645']), ('\ufcea', &['\u0634', '\u0647']), ('\ufceb', &['\u0643', '\u0644']), ('\ufcec', + &['\u0643', '\u0645']), ('\ufced', &['\u0644', '\u0645']), ('\ufcee', &['\u0646', + '\u0645']), ('\ufcef', &['\u0646', '\u0647']), ('\ufcf0', &['\u064a', '\u0645']), ('\ufcf1', + &['\u064a', '\u0647']), ('\ufcf2', &['\u0640', '\u064e', '\u0651']), ('\ufcf3', &['\u0640', + '\u064f', '\u0651']), ('\ufcf4', &['\u0640', '\u0650', '\u0651']), ('\ufcf5', &['\u0637', + '\u0649']), ('\ufcf6', &['\u0637', '\u064a']), ('\ufcf7', &['\u0639', '\u0649']), ('\ufcf8', + &['\u0639', '\u064a']), ('\ufcf9', &['\u063a', '\u0649']), ('\ufcfa', &['\u063a', + '\u064a']), ('\ufcfb', &['\u0633', '\u0649']), ('\ufcfc', &['\u0633', '\u064a']), ('\ufcfd', + &['\u0634', '\u0649']), ('\ufcfe', &['\u0634', '\u064a']), ('\ufcff', &['\u062d', + '\u0649']), ('\ufd00', &['\u062d', '\u064a']), ('\ufd01', &['\u062c', '\u0649']), ('\ufd02', + &['\u062c', '\u064a']), ('\ufd03', &['\u062e', '\u0649']), ('\ufd04', &['\u062e', + '\u064a']), ('\ufd05', &['\u0635', '\u0649']), ('\ufd06', &['\u0635', '\u064a']), ('\ufd07', + &['\u0636', '\u0649']), ('\ufd08', &['\u0636', '\u064a']), ('\ufd09', &['\u0634', + '\u062c']), ('\ufd0a', &['\u0634', '\u062d']), ('\ufd0b', &['\u0634', '\u062e']), ('\ufd0c', + &['\u0634', '\u0645']), ('\ufd0d', &['\u0634', '\u0631']), ('\ufd0e', &['\u0633', + '\u0631']), ('\ufd0f', &['\u0635', '\u0631']), ('\ufd10', &['\u0636', '\u0631']), ('\ufd11', + &['\u0637', '\u0649']), ('\ufd12', &['\u0637', '\u064a']), ('\ufd13', &['\u0639', + '\u0649']), ('\ufd14', &['\u0639', '\u064a']), ('\ufd15', &['\u063a', '\u0649']), ('\ufd16', + &['\u063a', '\u064a']), ('\ufd17', &['\u0633', '\u0649']), ('\ufd18', &['\u0633', + '\u064a']), ('\ufd19', &['\u0634', '\u0649']), ('\ufd1a', &['\u0634', '\u064a']), ('\ufd1b', + &['\u062d', '\u0649']), ('\ufd1c', &['\u062d', '\u064a']), ('\ufd1d', &['\u062c', + '\u0649']), ('\ufd1e', &['\u062c', '\u064a']), ('\ufd1f', &['\u062e', '\u0649']), ('\ufd20', + &['\u062e', '\u064a']), ('\ufd21', &['\u0635', '\u0649']), ('\ufd22', &['\u0635', + '\u064a']), ('\ufd23', &['\u0636', '\u0649']), ('\ufd24', &['\u0636', '\u064a']), ('\ufd25', + &['\u0634', '\u062c']), ('\ufd26', &['\u0634', '\u062d']), ('\ufd27', &['\u0634', + '\u062e']), ('\ufd28', &['\u0634', '\u0645']), ('\ufd29', &['\u0634', '\u0631']), ('\ufd2a', + &['\u0633', '\u0631']), ('\ufd2b', &['\u0635', '\u0631']), ('\ufd2c', &['\u0636', + '\u0631']), ('\ufd2d', &['\u0634', '\u062c']), ('\ufd2e', &['\u0634', '\u062d']), ('\ufd2f', + &['\u0634', '\u062e']), ('\ufd30', &['\u0634', '\u0645']), ('\ufd31', &['\u0633', + '\u0647']), ('\ufd32', &['\u0634', '\u0647']), ('\ufd33', &['\u0637', '\u0645']), ('\ufd34', + &['\u0633', '\u062c']), ('\ufd35', &['\u0633', '\u062d']), ('\ufd36', &['\u0633', + '\u062e']), ('\ufd37', &['\u0634', '\u062c']), ('\ufd38', &['\u0634', '\u062d']), ('\ufd39', + &['\u0634', '\u062e']), ('\ufd3a', &['\u0637', '\u0645']), ('\ufd3b', &['\u0638', + '\u0645']), ('\ufd3c', &['\u0627', '\u064b']), ('\ufd3d', &['\u0627', '\u064b']), ('\ufd50', + &['\u062a', '\u062c', '\u0645']), ('\ufd51', &['\u062a', '\u062d', '\u062c']), ('\ufd52', + &['\u062a', '\u062d', '\u062c']), ('\ufd53', &['\u062a', '\u062d', '\u0645']), ('\ufd54', + &['\u062a', '\u062e', '\u0645']), ('\ufd55', &['\u062a', '\u0645', '\u062c']), ('\ufd56', + &['\u062a', '\u0645', '\u062d']), ('\ufd57', &['\u062a', '\u0645', '\u062e']), ('\ufd58', + &['\u062c', '\u0645', '\u062d']), ('\ufd59', &['\u062c', '\u0645', '\u062d']), ('\ufd5a', + &['\u062d', '\u0645', '\u064a']), ('\ufd5b', &['\u062d', '\u0645', '\u0649']), ('\ufd5c', + &['\u0633', '\u062d', '\u062c']), ('\ufd5d', &['\u0633', '\u062c', '\u062d']), ('\ufd5e', + &['\u0633', '\u062c', '\u0649']), ('\ufd5f', &['\u0633', '\u0645', '\u062d']), ('\ufd60', + &['\u0633', '\u0645', '\u062d']), ('\ufd61', &['\u0633', '\u0645', '\u062c']), ('\ufd62', + &['\u0633', '\u0645', '\u0645']), ('\ufd63', &['\u0633', '\u0645', '\u0645']), ('\ufd64', + &['\u0635', '\u062d', '\u062d']), ('\ufd65', &['\u0635', '\u062d', '\u062d']), ('\ufd66', + &['\u0635', '\u0645', '\u0645']), ('\ufd67', &['\u0634', '\u062d', '\u0645']), ('\ufd68', + &['\u0634', '\u062d', '\u0645']), ('\ufd69', &['\u0634', '\u062c', '\u064a']), ('\ufd6a', + &['\u0634', '\u0645', '\u062e']), ('\ufd6b', &['\u0634', '\u0645', '\u062e']), ('\ufd6c', + &['\u0634', '\u0645', '\u0645']), ('\ufd6d', &['\u0634', '\u0645', '\u0645']), ('\ufd6e', + &['\u0636', '\u062d', '\u0649']), ('\ufd6f', &['\u0636', '\u062e', '\u0645']), ('\ufd70', + &['\u0636', '\u062e', '\u0645']), ('\ufd71', &['\u0637', '\u0645', '\u062d']), ('\ufd72', + &['\u0637', '\u0645', '\u062d']), ('\ufd73', &['\u0637', '\u0645', '\u0645']), ('\ufd74', + &['\u0637', '\u0645', '\u064a']), ('\ufd75', &['\u0639', '\u062c', '\u0645']), ('\ufd76', + &['\u0639', '\u0645', '\u0645']), ('\ufd77', &['\u0639', '\u0645', '\u0645']), ('\ufd78', + &['\u0639', '\u0645', '\u0649']), ('\ufd79', &['\u063a', '\u0645', '\u0645']), ('\ufd7a', + &['\u063a', '\u0645', '\u064a']), ('\ufd7b', &['\u063a', '\u0645', '\u0649']), ('\ufd7c', + &['\u0641', '\u062e', '\u0645']), ('\ufd7d', &['\u0641', '\u062e', '\u0645']), ('\ufd7e', + &['\u0642', '\u0645', '\u062d']), ('\ufd7f', &['\u0642', '\u0645', '\u0645']), ('\ufd80', + &['\u0644', '\u062d', '\u0645']), ('\ufd81', &['\u0644', '\u062d', '\u064a']), ('\ufd82', + &['\u0644', '\u062d', '\u0649']), ('\ufd83', &['\u0644', '\u062c', '\u062c']), ('\ufd84', + &['\u0644', '\u062c', '\u062c']), ('\ufd85', &['\u0644', '\u062e', '\u0645']), ('\ufd86', + &['\u0644', '\u062e', '\u0645']), ('\ufd87', &['\u0644', '\u0645', '\u062d']), ('\ufd88', + &['\u0644', '\u0645', '\u062d']), ('\ufd89', &['\u0645', '\u062d', '\u062c']), ('\ufd8a', + &['\u0645', '\u062d', '\u0645']), ('\ufd8b', &['\u0645', '\u062d', '\u064a']), ('\ufd8c', + &['\u0645', '\u062c', '\u062d']), ('\ufd8d', &['\u0645', '\u062c', '\u0645']), ('\ufd8e', + &['\u0645', '\u062e', '\u062c']), ('\ufd8f', &['\u0645', '\u062e', '\u0645']), ('\ufd92', + &['\u0645', '\u062c', '\u062e']), ('\ufd93', &['\u0647', '\u0645', '\u062c']), ('\ufd94', + &['\u0647', '\u0645', '\u0645']), ('\ufd95', &['\u0646', '\u062d', '\u0645']), ('\ufd96', + &['\u0646', '\u062d', '\u0649']), ('\ufd97', &['\u0646', '\u062c', '\u0645']), ('\ufd98', + &['\u0646', '\u062c', '\u0645']), ('\ufd99', &['\u0646', '\u062c', '\u0649']), ('\ufd9a', + &['\u0646', '\u0645', '\u064a']), ('\ufd9b', &['\u0646', '\u0645', '\u0649']), ('\ufd9c', + &['\u064a', '\u0645', '\u0645']), ('\ufd9d', &['\u064a', '\u0645', '\u0645']), ('\ufd9e', + &['\u0628', '\u062e', '\u064a']), ('\ufd9f', &['\u062a', '\u062c', '\u064a']), ('\ufda0', + &['\u062a', '\u062c', '\u0649']), ('\ufda1', &['\u062a', '\u062e', '\u064a']), ('\ufda2', + &['\u062a', '\u062e', '\u0649']), ('\ufda3', &['\u062a', '\u0645', '\u064a']), ('\ufda4', + &['\u062a', '\u0645', '\u0649']), ('\ufda5', &['\u062c', '\u0645', '\u064a']), ('\ufda6', + &['\u062c', '\u062d', '\u0649']), ('\ufda7', &['\u062c', '\u0645', '\u0649']), ('\ufda8', + &['\u0633', '\u062e', '\u0649']), ('\ufda9', &['\u0635', '\u062d', '\u064a']), ('\ufdaa', + &['\u0634', '\u062d', '\u064a']), ('\ufdab', &['\u0636', '\u062d', '\u064a']), ('\ufdac', + &['\u0644', '\u062c', '\u064a']), ('\ufdad', &['\u0644', '\u0645', '\u064a']), ('\ufdae', + &['\u064a', '\u062d', '\u064a']), ('\ufdaf', &['\u064a', '\u062c', '\u064a']), ('\ufdb0', + &['\u064a', '\u0645', '\u064a']), ('\ufdb1', &['\u0645', '\u0645', '\u064a']), ('\ufdb2', + &['\u0642', '\u0645', '\u064a']), ('\ufdb3', &['\u0646', '\u062d', '\u064a']), ('\ufdb4', + &['\u0642', '\u0645', '\u062d']), ('\ufdb5', &['\u0644', '\u062d', '\u0645']), ('\ufdb6', + &['\u0639', '\u0645', '\u064a']), ('\ufdb7', &['\u0643', '\u0645', '\u064a']), ('\ufdb8', + &['\u0646', '\u062c', '\u062d']), ('\ufdb9', &['\u0645', '\u062e', '\u064a']), ('\ufdba', + &['\u0644', '\u062c', '\u0645']), ('\ufdbb', &['\u0643', '\u0645', '\u0645']), ('\ufdbc', + &['\u0644', '\u062c', '\u0645']), ('\ufdbd', &['\u0646', '\u062c', '\u062d']), ('\ufdbe', + &['\u062c', '\u062d', '\u064a']), ('\ufdbf', &['\u062d', '\u062c', '\u064a']), ('\ufdc0', + &['\u0645', '\u062c', '\u064a']), ('\ufdc1', &['\u0641', '\u0645', '\u064a']), ('\ufdc2', + &['\u0628', '\u062d', '\u064a']), ('\ufdc3', &['\u0643', '\u0645', '\u0645']), ('\ufdc4', + &['\u0639', '\u062c', '\u0645']), ('\ufdc5', &['\u0635', '\u0645', '\u0645']), ('\ufdc6', + &['\u0633', '\u062e', '\u064a']), ('\ufdc7', &['\u0646', '\u062c', '\u064a']), ('\ufdf0', + &['\u0635', '\u0644', '\u06d2']), ('\ufdf1', &['\u0642', '\u0644', '\u06d2']), ('\ufdf2', + &['\u0627', '\u0644', '\u0644', '\u0647']), ('\ufdf3', &['\u0627', '\u0643', '\u0628', + '\u0631']), ('\ufdf4', &['\u0645', '\u062d', '\u0645', '\u062f']), ('\ufdf5', &['\u0635', + '\u0644', '\u0639', '\u0645']), ('\ufdf6', &['\u0631', '\u0633', '\u0648', '\u0644']), + ('\ufdf7', &['\u0639', '\u0644', '\u064a', '\u0647']), ('\ufdf8', &['\u0648', '\u0633', + '\u0644', '\u0645']), ('\ufdf9', &['\u0635', '\u0644', '\u0649']), ('\ufdfa', &['\u0635', + '\u0644', '\u0649', '\x20', '\u0627', '\u0644', '\u0644', '\u0647', '\x20', '\u0639', + '\u0644', '\u064a', '\u0647', '\x20', '\u0648', '\u0633', '\u0644', '\u0645']), ('\ufdfb', + &['\u062c', '\u0644', '\x20', '\u062c', '\u0644', '\u0627', '\u0644', '\u0647']), ('\ufdfc', + &['\u0631', '\u06cc', '\u0627', '\u0644']), ('\ufe10', &['\x2c']), ('\ufe11', &['\u3001']), + ('\ufe12', &['\u3002']), ('\ufe13', &['\x3a']), ('\ufe14', &['\x3b']), ('\ufe15', + &['\x21']), ('\ufe16', &['\x3f']), ('\ufe17', &['\u3016']), ('\ufe18', &['\u3017']), + ('\ufe19', &['\u2026']), ('\ufe30', &['\u2025']), ('\ufe31', &['\u2014']), ('\ufe32', + &['\u2013']), ('\ufe33', &['\x5f']), ('\ufe34', &['\x5f']), ('\ufe35', &['\x28']), + ('\ufe36', &['\x29']), ('\ufe37', &['\x7b']), ('\ufe38', &['\x7d']), ('\ufe39', + &['\u3014']), ('\ufe3a', &['\u3015']), ('\ufe3b', &['\u3010']), ('\ufe3c', &['\u3011']), + ('\ufe3d', &['\u300a']), ('\ufe3e', &['\u300b']), ('\ufe3f', &['\u3008']), ('\ufe40', + &['\u3009']), ('\ufe41', &['\u300c']), ('\ufe42', &['\u300d']), ('\ufe43', &['\u300e']), + ('\ufe44', &['\u300f']), ('\ufe47', &['\x5b']), ('\ufe48', &['\x5d']), ('\ufe49', + &['\u203e']), ('\ufe4a', &['\u203e']), ('\ufe4b', &['\u203e']), ('\ufe4c', &['\u203e']), + ('\ufe4d', &['\x5f']), ('\ufe4e', &['\x5f']), ('\ufe4f', &['\x5f']), ('\ufe50', &['\x2c']), + ('\ufe51', &['\u3001']), ('\ufe52', &['\x2e']), ('\ufe54', &['\x3b']), ('\ufe55', + &['\x3a']), ('\ufe56', &['\x3f']), ('\ufe57', &['\x21']), ('\ufe58', &['\u2014']), + ('\ufe59', &['\x28']), ('\ufe5a', &['\x29']), ('\ufe5b', &['\x7b']), ('\ufe5c', &['\x7d']), + ('\ufe5d', &['\u3014']), ('\ufe5e', &['\u3015']), ('\ufe5f', &['\x23']), ('\ufe60', + &['\x26']), ('\ufe61', &['\x2a']), ('\ufe62', &['\x2b']), ('\ufe63', &['\x2d']), ('\ufe64', + &['\x3c']), ('\ufe65', &['\x3e']), ('\ufe66', &['\x3d']), ('\ufe68', &['\x5c']), ('\ufe69', + &['\x24']), ('\ufe6a', &['\x25']), ('\ufe6b', &['\x40']), ('\ufe70', &['\x20', '\u064b']), + ('\ufe71', &['\u0640', '\u064b']), ('\ufe72', &['\x20', '\u064c']), ('\ufe74', &['\x20', + '\u064d']), ('\ufe76', &['\x20', '\u064e']), ('\ufe77', &['\u0640', '\u064e']), ('\ufe78', + &['\x20', '\u064f']), ('\ufe79', &['\u0640', '\u064f']), ('\ufe7a', &['\x20', '\u0650']), + ('\ufe7b', &['\u0640', '\u0650']), ('\ufe7c', &['\x20', '\u0651']), ('\ufe7d', &['\u0640', + '\u0651']), ('\ufe7e', &['\x20', '\u0652']), ('\ufe7f', &['\u0640', '\u0652']), ('\ufe80', + &['\u0621']), ('\ufe81', &['\u0622']), ('\ufe82', &['\u0622']), ('\ufe83', &['\u0623']), + ('\ufe84', &['\u0623']), ('\ufe85', &['\u0624']), ('\ufe86', &['\u0624']), ('\ufe87', + &['\u0625']), ('\ufe88', &['\u0625']), ('\ufe89', &['\u0626']), ('\ufe8a', &['\u0626']), + ('\ufe8b', &['\u0626']), ('\ufe8c', &['\u0626']), ('\ufe8d', &['\u0627']), ('\ufe8e', + &['\u0627']), ('\ufe8f', &['\u0628']), ('\ufe90', &['\u0628']), ('\ufe91', &['\u0628']), + ('\ufe92', &['\u0628']), ('\ufe93', &['\u0629']), ('\ufe94', &['\u0629']), ('\ufe95', + &['\u062a']), ('\ufe96', &['\u062a']), ('\ufe97', &['\u062a']), ('\ufe98', &['\u062a']), + ('\ufe99', &['\u062b']), ('\ufe9a', &['\u062b']), ('\ufe9b', &['\u062b']), ('\ufe9c', + &['\u062b']), ('\ufe9d', &['\u062c']), ('\ufe9e', &['\u062c']), ('\ufe9f', &['\u062c']), + ('\ufea0', &['\u062c']), ('\ufea1', &['\u062d']), ('\ufea2', &['\u062d']), ('\ufea3', + &['\u062d']), ('\ufea4', &['\u062d']), ('\ufea5', &['\u062e']), ('\ufea6', &['\u062e']), + ('\ufea7', &['\u062e']), ('\ufea8', &['\u062e']), ('\ufea9', &['\u062f']), ('\ufeaa', + &['\u062f']), ('\ufeab', &['\u0630']), ('\ufeac', &['\u0630']), ('\ufead', &['\u0631']), + ('\ufeae', &['\u0631']), ('\ufeaf', &['\u0632']), ('\ufeb0', &['\u0632']), ('\ufeb1', + &['\u0633']), ('\ufeb2', &['\u0633']), ('\ufeb3', &['\u0633']), ('\ufeb4', &['\u0633']), + ('\ufeb5', &['\u0634']), ('\ufeb6', &['\u0634']), ('\ufeb7', &['\u0634']), ('\ufeb8', + &['\u0634']), ('\ufeb9', &['\u0635']), ('\ufeba', &['\u0635']), ('\ufebb', &['\u0635']), + ('\ufebc', &['\u0635']), ('\ufebd', &['\u0636']), ('\ufebe', &['\u0636']), ('\ufebf', + &['\u0636']), ('\ufec0', &['\u0636']), ('\ufec1', &['\u0637']), ('\ufec2', &['\u0637']), + ('\ufec3', &['\u0637']), ('\ufec4', &['\u0637']), ('\ufec5', &['\u0638']), ('\ufec6', + &['\u0638']), ('\ufec7', &['\u0638']), ('\ufec8', &['\u0638']), ('\ufec9', &['\u0639']), + ('\ufeca', &['\u0639']), ('\ufecb', &['\u0639']), ('\ufecc', &['\u0639']), ('\ufecd', + &['\u063a']), ('\ufece', &['\u063a']), ('\ufecf', &['\u063a']), ('\ufed0', &['\u063a']), + ('\ufed1', &['\u0641']), ('\ufed2', &['\u0641']), ('\ufed3', &['\u0641']), ('\ufed4', + &['\u0641']), ('\ufed5', &['\u0642']), ('\ufed6', &['\u0642']), ('\ufed7', &['\u0642']), + ('\ufed8', &['\u0642']), ('\ufed9', &['\u0643']), ('\ufeda', &['\u0643']), ('\ufedb', + &['\u0643']), ('\ufedc', &['\u0643']), ('\ufedd', &['\u0644']), ('\ufede', &['\u0644']), + ('\ufedf', &['\u0644']), ('\ufee0', &['\u0644']), ('\ufee1', &['\u0645']), ('\ufee2', + &['\u0645']), ('\ufee3', &['\u0645']), ('\ufee4', &['\u0645']), ('\ufee5', &['\u0646']), + ('\ufee6', &['\u0646']), ('\ufee7', &['\u0646']), ('\ufee8', &['\u0646']), ('\ufee9', + &['\u0647']), ('\ufeea', &['\u0647']), ('\ufeeb', &['\u0647']), ('\ufeec', &['\u0647']), + ('\ufeed', &['\u0648']), ('\ufeee', &['\u0648']), ('\ufeef', &['\u0649']), ('\ufef0', + &['\u0649']), ('\ufef1', &['\u064a']), ('\ufef2', &['\u064a']), ('\ufef3', &['\u064a']), + ('\ufef4', &['\u064a']), ('\ufef5', &['\u0644', '\u0622']), ('\ufef6', &['\u0644', + '\u0622']), ('\ufef7', &['\u0644', '\u0623']), ('\ufef8', &['\u0644', '\u0623']), ('\ufef9', + &['\u0644', '\u0625']), ('\ufefa', &['\u0644', '\u0625']), ('\ufefb', &['\u0644', + '\u0627']), ('\ufefc', &['\u0644', '\u0627']), ('\uff01', &['\x21']), ('\uff02', &['\x22']), + ('\uff03', &['\x23']), ('\uff04', &['\x24']), ('\uff05', &['\x25']), ('\uff06', &['\x26']), + ('\uff07', &['\x27']), ('\uff08', &['\x28']), ('\uff09', &['\x29']), ('\uff0a', &['\x2a']), + ('\uff0b', &['\x2b']), ('\uff0c', &['\x2c']), ('\uff0d', &['\x2d']), ('\uff0e', &['\x2e']), + ('\uff0f', &['\x2f']), ('\uff10', &['\x30']), ('\uff11', &['\x31']), ('\uff12', &['\x32']), + ('\uff13', &['\x33']), ('\uff14', &['\x34']), ('\uff15', &['\x35']), ('\uff16', &['\x36']), + ('\uff17', &['\x37']), ('\uff18', &['\x38']), ('\uff19', &['\x39']), ('\uff1a', &['\x3a']), + ('\uff1b', &['\x3b']), ('\uff1c', &['\x3c']), ('\uff1d', &['\x3d']), ('\uff1e', &['\x3e']), + ('\uff1f', &['\x3f']), ('\uff20', &['\x40']), ('\uff21', &['\x41']), ('\uff22', &['\x42']), + ('\uff23', &['\x43']), ('\uff24', &['\x44']), ('\uff25', &['\x45']), ('\uff26', &['\x46']), + ('\uff27', &['\x47']), ('\uff28', &['\x48']), ('\uff29', &['\x49']), ('\uff2a', &['\x4a']), + ('\uff2b', &['\x4b']), ('\uff2c', &['\x4c']), ('\uff2d', &['\x4d']), ('\uff2e', &['\x4e']), + ('\uff2f', &['\x4f']), ('\uff30', &['\x50']), ('\uff31', &['\x51']), ('\uff32', &['\x52']), + ('\uff33', &['\x53']), ('\uff34', &['\x54']), ('\uff35', &['\x55']), ('\uff36', &['\x56']), + ('\uff37', &['\x57']), ('\uff38', &['\x58']), ('\uff39', &['\x59']), ('\uff3a', &['\x5a']), + ('\uff3b', &['\x5b']), ('\uff3c', &['\x5c']), ('\uff3d', &['\x5d']), ('\uff3e', &['\x5e']), + ('\uff3f', &['\x5f']), ('\uff40', &['\x60']), ('\uff41', &['\x61']), ('\uff42', &['\x62']), + ('\uff43', &['\x63']), ('\uff44', &['\x64']), ('\uff45', &['\x65']), ('\uff46', &['\x66']), + ('\uff47', &['\x67']), ('\uff48', &['\x68']), ('\uff49', &['\x69']), ('\uff4a', &['\x6a']), + ('\uff4b', &['\x6b']), ('\uff4c', &['\x6c']), ('\uff4d', &['\x6d']), ('\uff4e', &['\x6e']), + ('\uff4f', &['\x6f']), ('\uff50', &['\x70']), ('\uff51', &['\x71']), ('\uff52', &['\x72']), + ('\uff53', &['\x73']), ('\uff54', &['\x74']), ('\uff55', &['\x75']), ('\uff56', &['\x76']), + ('\uff57', &['\x77']), ('\uff58', &['\x78']), ('\uff59', &['\x79']), ('\uff5a', &['\x7a']), + ('\uff5b', &['\x7b']), ('\uff5c', &['\x7c']), ('\uff5d', &['\x7d']), ('\uff5e', &['\x7e']), + ('\uff5f', &['\u2985']), ('\uff60', &['\u2986']), ('\uff61', &['\u3002']), ('\uff62', + &['\u300c']), ('\uff63', &['\u300d']), ('\uff64', &['\u3001']), ('\uff65', &['\u30fb']), + ('\uff66', &['\u30f2']), ('\uff67', &['\u30a1']), ('\uff68', &['\u30a3']), ('\uff69', + &['\u30a5']), ('\uff6a', &['\u30a7']), ('\uff6b', &['\u30a9']), ('\uff6c', &['\u30e3']), + ('\uff6d', &['\u30e5']), ('\uff6e', &['\u30e7']), ('\uff6f', &['\u30c3']), ('\uff70', + &['\u30fc']), ('\uff71', &['\u30a2']), ('\uff72', &['\u30a4']), ('\uff73', &['\u30a6']), + ('\uff74', &['\u30a8']), ('\uff75', &['\u30aa']), ('\uff76', &['\u30ab']), ('\uff77', + &['\u30ad']), ('\uff78', &['\u30af']), ('\uff79', &['\u30b1']), ('\uff7a', &['\u30b3']), + ('\uff7b', &['\u30b5']), ('\uff7c', &['\u30b7']), ('\uff7d', &['\u30b9']), ('\uff7e', + &['\u30bb']), ('\uff7f', &['\u30bd']), ('\uff80', &['\u30bf']), ('\uff81', &['\u30c1']), + ('\uff82', &['\u30c4']), ('\uff83', &['\u30c6']), ('\uff84', &['\u30c8']), ('\uff85', + &['\u30ca']), ('\uff86', &['\u30cb']), ('\uff87', &['\u30cc']), ('\uff88', &['\u30cd']), + ('\uff89', &['\u30ce']), ('\uff8a', &['\u30cf']), ('\uff8b', &['\u30d2']), ('\uff8c', + &['\u30d5']), ('\uff8d', &['\u30d8']), ('\uff8e', &['\u30db']), ('\uff8f', &['\u30de']), + ('\uff90', &['\u30df']), ('\uff91', &['\u30e0']), ('\uff92', &['\u30e1']), ('\uff93', + &['\u30e2']), ('\uff94', &['\u30e4']), ('\uff95', &['\u30e6']), ('\uff96', &['\u30e8']), + ('\uff97', &['\u30e9']), ('\uff98', &['\u30ea']), ('\uff99', &['\u30eb']), ('\uff9a', + &['\u30ec']), ('\uff9b', &['\u30ed']), ('\uff9c', &['\u30ef']), ('\uff9d', &['\u30f3']), + ('\uff9e', &['\u3099']), ('\uff9f', &['\u309a']), ('\uffa0', &['\u3164']), ('\uffa1', + &['\u3131']), ('\uffa2', &['\u3132']), ('\uffa3', &['\u3133']), ('\uffa4', &['\u3134']), + ('\uffa5', &['\u3135']), ('\uffa6', &['\u3136']), ('\uffa7', &['\u3137']), ('\uffa8', + &['\u3138']), ('\uffa9', &['\u3139']), ('\uffaa', &['\u313a']), ('\uffab', &['\u313b']), + ('\uffac', &['\u313c']), ('\uffad', &['\u313d']), ('\uffae', &['\u313e']), ('\uffaf', + &['\u313f']), ('\uffb0', &['\u3140']), ('\uffb1', &['\u3141']), ('\uffb2', &['\u3142']), + ('\uffb3', &['\u3143']), ('\uffb4', &['\u3144']), ('\uffb5', &['\u3145']), ('\uffb6', + &['\u3146']), ('\uffb7', &['\u3147']), ('\uffb8', &['\u3148']), ('\uffb9', &['\u3149']), + ('\uffba', &['\u314a']), ('\uffbb', &['\u314b']), ('\uffbc', &['\u314c']), ('\uffbd', + &['\u314d']), ('\uffbe', &['\u314e']), ('\uffc2', &['\u314f']), ('\uffc3', &['\u3150']), + ('\uffc4', &['\u3151']), ('\uffc5', &['\u3152']), ('\uffc6', &['\u3153']), ('\uffc7', + &['\u3154']), ('\uffca', &['\u3155']), ('\uffcb', &['\u3156']), ('\uffcc', &['\u3157']), + ('\uffcd', &['\u3158']), ('\uffce', &['\u3159']), ('\uffcf', &['\u315a']), ('\uffd2', + &['\u315b']), ('\uffd3', &['\u315c']), ('\uffd4', &['\u315d']), ('\uffd5', &['\u315e']), + ('\uffd6', &['\u315f']), ('\uffd7', &['\u3160']), ('\uffda', &['\u3161']), ('\uffdb', + &['\u3162']), ('\uffdc', &['\u3163']), ('\uffe0', &['\xa2']), ('\uffe1', &['\xa3']), + ('\uffe2', &['\xac']), ('\uffe3', &['\xaf']), ('\uffe4', &['\xa6']), ('\uffe5', &['\xa5']), + ('\uffe6', &['\u20a9']), ('\uffe8', &['\u2502']), ('\uffe9', &['\u2190']), ('\uffea', + &['\u2191']), ('\uffeb', &['\u2192']), ('\uffec', &['\u2193']), ('\uffed', &['\u25a0']), + ('\uffee', &['\u25cb']), ('\U0001d400', &['\x41']), ('\U0001d401', &['\x42']), + ('\U0001d402', &['\x43']), ('\U0001d403', &['\x44']), ('\U0001d404', &['\x45']), + ('\U0001d405', &['\x46']), ('\U0001d406', &['\x47']), ('\U0001d407', &['\x48']), + ('\U0001d408', &['\x49']), ('\U0001d409', &['\x4a']), ('\U0001d40a', &['\x4b']), + ('\U0001d40b', &['\x4c']), ('\U0001d40c', &['\x4d']), ('\U0001d40d', &['\x4e']), + ('\U0001d40e', &['\x4f']), ('\U0001d40f', &['\x50']), ('\U0001d410', &['\x51']), + ('\U0001d411', &['\x52']), ('\U0001d412', &['\x53']), ('\U0001d413', &['\x54']), + ('\U0001d414', &['\x55']), ('\U0001d415', &['\x56']), ('\U0001d416', &['\x57']), + ('\U0001d417', &['\x58']), ('\U0001d418', &['\x59']), ('\U0001d419', &['\x5a']), + ('\U0001d41a', &['\x61']), ('\U0001d41b', &['\x62']), ('\U0001d41c', &['\x63']), + ('\U0001d41d', &['\x64']), ('\U0001d41e', &['\x65']), ('\U0001d41f', &['\x66']), + ('\U0001d420', &['\x67']), ('\U0001d421', &['\x68']), ('\U0001d422', &['\x69']), + ('\U0001d423', &['\x6a']), ('\U0001d424', &['\x6b']), ('\U0001d425', &['\x6c']), + ('\U0001d426', &['\x6d']), ('\U0001d427', &['\x6e']), ('\U0001d428', &['\x6f']), + ('\U0001d429', &['\x70']), ('\U0001d42a', &['\x71']), ('\U0001d42b', &['\x72']), + ('\U0001d42c', &['\x73']), ('\U0001d42d', &['\x74']), ('\U0001d42e', &['\x75']), + ('\U0001d42f', &['\x76']), ('\U0001d430', &['\x77']), ('\U0001d431', &['\x78']), + ('\U0001d432', &['\x79']), ('\U0001d433', &['\x7a']), ('\U0001d434', &['\x41']), + ('\U0001d435', &['\x42']), ('\U0001d436', &['\x43']), ('\U0001d437', &['\x44']), + ('\U0001d438', &['\x45']), ('\U0001d439', &['\x46']), ('\U0001d43a', &['\x47']), + ('\U0001d43b', &['\x48']), ('\U0001d43c', &['\x49']), ('\U0001d43d', &['\x4a']), + ('\U0001d43e', &['\x4b']), ('\U0001d43f', &['\x4c']), ('\U0001d440', &['\x4d']), + ('\U0001d441', &['\x4e']), ('\U0001d442', &['\x4f']), ('\U0001d443', &['\x50']), + ('\U0001d444', &['\x51']), ('\U0001d445', &['\x52']), ('\U0001d446', &['\x53']), + ('\U0001d447', &['\x54']), ('\U0001d448', &['\x55']), ('\U0001d449', &['\x56']), + ('\U0001d44a', &['\x57']), ('\U0001d44b', &['\x58']), ('\U0001d44c', &['\x59']), + ('\U0001d44d', &['\x5a']), ('\U0001d44e', &['\x61']), ('\U0001d44f', &['\x62']), + ('\U0001d450', &['\x63']), ('\U0001d451', &['\x64']), ('\U0001d452', &['\x65']), + ('\U0001d453', &['\x66']), ('\U0001d454', &['\x67']), ('\U0001d456', &['\x69']), + ('\U0001d457', &['\x6a']), ('\U0001d458', &['\x6b']), ('\U0001d459', &['\x6c']), + ('\U0001d45a', &['\x6d']), ('\U0001d45b', &['\x6e']), ('\U0001d45c', &['\x6f']), + ('\U0001d45d', &['\x70']), ('\U0001d45e', &['\x71']), ('\U0001d45f', &['\x72']), + ('\U0001d460', &['\x73']), ('\U0001d461', &['\x74']), ('\U0001d462', &['\x75']), + ('\U0001d463', &['\x76']), ('\U0001d464', &['\x77']), ('\U0001d465', &['\x78']), + ('\U0001d466', &['\x79']), ('\U0001d467', &['\x7a']), ('\U0001d468', &['\x41']), + ('\U0001d469', &['\x42']), ('\U0001d46a', &['\x43']), ('\U0001d46b', &['\x44']), + ('\U0001d46c', &['\x45']), ('\U0001d46d', &['\x46']), ('\U0001d46e', &['\x47']), + ('\U0001d46f', &['\x48']), ('\U0001d470', &['\x49']), ('\U0001d471', &['\x4a']), + ('\U0001d472', &['\x4b']), ('\U0001d473', &['\x4c']), ('\U0001d474', &['\x4d']), + ('\U0001d475', &['\x4e']), ('\U0001d476', &['\x4f']), ('\U0001d477', &['\x50']), + ('\U0001d478', &['\x51']), ('\U0001d479', &['\x52']), ('\U0001d47a', &['\x53']), + ('\U0001d47b', &['\x54']), ('\U0001d47c', &['\x55']), ('\U0001d47d', &['\x56']), + ('\U0001d47e', &['\x57']), ('\U0001d47f', &['\x58']), ('\U0001d480', &['\x59']), + ('\U0001d481', &['\x5a']), ('\U0001d482', &['\x61']), ('\U0001d483', &['\x62']), + ('\U0001d484', &['\x63']), ('\U0001d485', &['\x64']), ('\U0001d486', &['\x65']), + ('\U0001d487', &['\x66']), ('\U0001d488', &['\x67']), ('\U0001d489', &['\x68']), + ('\U0001d48a', &['\x69']), ('\U0001d48b', &['\x6a']), ('\U0001d48c', &['\x6b']), + ('\U0001d48d', &['\x6c']), ('\U0001d48e', &['\x6d']), ('\U0001d48f', &['\x6e']), + ('\U0001d490', &['\x6f']), ('\U0001d491', &['\x70']), ('\U0001d492', &['\x71']), + ('\U0001d493', &['\x72']), ('\U0001d494', &['\x73']), ('\U0001d495', &['\x74']), + ('\U0001d496', &['\x75']), ('\U0001d497', &['\x76']), ('\U0001d498', &['\x77']), + ('\U0001d499', &['\x78']), ('\U0001d49a', &['\x79']), ('\U0001d49b', &['\x7a']), + ('\U0001d49c', &['\x41']), ('\U0001d49e', &['\x43']), ('\U0001d49f', &['\x44']), + ('\U0001d4a2', &['\x47']), ('\U0001d4a5', &['\x4a']), ('\U0001d4a6', &['\x4b']), + ('\U0001d4a9', &['\x4e']), ('\U0001d4aa', &['\x4f']), ('\U0001d4ab', &['\x50']), + ('\U0001d4ac', &['\x51']), ('\U0001d4ae', &['\x53']), ('\U0001d4af', &['\x54']), + ('\U0001d4b0', &['\x55']), ('\U0001d4b1', &['\x56']), ('\U0001d4b2', &['\x57']), + ('\U0001d4b3', &['\x58']), ('\U0001d4b4', &['\x59']), ('\U0001d4b5', &['\x5a']), + ('\U0001d4b6', &['\x61']), ('\U0001d4b7', &['\x62']), ('\U0001d4b8', &['\x63']), + ('\U0001d4b9', &['\x64']), ('\U0001d4bb', &['\x66']), ('\U0001d4bd', &['\x68']), + ('\U0001d4be', &['\x69']), ('\U0001d4bf', &['\x6a']), ('\U0001d4c0', &['\x6b']), + ('\U0001d4c1', &['\x6c']), ('\U0001d4c2', &['\x6d']), ('\U0001d4c3', &['\x6e']), + ('\U0001d4c5', &['\x70']), ('\U0001d4c6', &['\x71']), ('\U0001d4c7', &['\x72']), + ('\U0001d4c8', &['\x73']), ('\U0001d4c9', &['\x74']), ('\U0001d4ca', &['\x75']), + ('\U0001d4cb', &['\x76']), ('\U0001d4cc', &['\x77']), ('\U0001d4cd', &['\x78']), + ('\U0001d4ce', &['\x79']), ('\U0001d4cf', &['\x7a']), ('\U0001d4d0', &['\x41']), + ('\U0001d4d1', &['\x42']), ('\U0001d4d2', &['\x43']), ('\U0001d4d3', &['\x44']), + ('\U0001d4d4', &['\x45']), ('\U0001d4d5', &['\x46']), ('\U0001d4d6', &['\x47']), + ('\U0001d4d7', &['\x48']), ('\U0001d4d8', &['\x49']), ('\U0001d4d9', &['\x4a']), + ('\U0001d4da', &['\x4b']), ('\U0001d4db', &['\x4c']), ('\U0001d4dc', &['\x4d']), + ('\U0001d4dd', &['\x4e']), ('\U0001d4de', &['\x4f']), ('\U0001d4df', &['\x50']), + ('\U0001d4e0', &['\x51']), ('\U0001d4e1', &['\x52']), ('\U0001d4e2', &['\x53']), + ('\U0001d4e3', &['\x54']), ('\U0001d4e4', &['\x55']), ('\U0001d4e5', &['\x56']), + ('\U0001d4e6', &['\x57']), ('\U0001d4e7', &['\x58']), ('\U0001d4e8', &['\x59']), + ('\U0001d4e9', &['\x5a']), ('\U0001d4ea', &['\x61']), ('\U0001d4eb', &['\x62']), + ('\U0001d4ec', &['\x63']), ('\U0001d4ed', &['\x64']), ('\U0001d4ee', &['\x65']), + ('\U0001d4ef', &['\x66']), ('\U0001d4f0', &['\x67']), ('\U0001d4f1', &['\x68']), + ('\U0001d4f2', &['\x69']), ('\U0001d4f3', &['\x6a']), ('\U0001d4f4', &['\x6b']), + ('\U0001d4f5', &['\x6c']), ('\U0001d4f6', &['\x6d']), ('\U0001d4f7', &['\x6e']), + ('\U0001d4f8', &['\x6f']), ('\U0001d4f9', &['\x70']), ('\U0001d4fa', &['\x71']), + ('\U0001d4fb', &['\x72']), ('\U0001d4fc', &['\x73']), ('\U0001d4fd', &['\x74']), + ('\U0001d4fe', &['\x75']), ('\U0001d4ff', &['\x76']), ('\U0001d500', &['\x77']), + ('\U0001d501', &['\x78']), ('\U0001d502', &['\x79']), ('\U0001d503', &['\x7a']), + ('\U0001d504', &['\x41']), ('\U0001d505', &['\x42']), ('\U0001d507', &['\x44']), + ('\U0001d508', &['\x45']), ('\U0001d509', &['\x46']), ('\U0001d50a', &['\x47']), + ('\U0001d50d', &['\x4a']), ('\U0001d50e', &['\x4b']), ('\U0001d50f', &['\x4c']), + ('\U0001d510', &['\x4d']), ('\U0001d511', &['\x4e']), ('\U0001d512', &['\x4f']), + ('\U0001d513', &['\x50']), ('\U0001d514', &['\x51']), ('\U0001d516', &['\x53']), + ('\U0001d517', &['\x54']), ('\U0001d518', &['\x55']), ('\U0001d519', &['\x56']), + ('\U0001d51a', &['\x57']), ('\U0001d51b', &['\x58']), ('\U0001d51c', &['\x59']), + ('\U0001d51e', &['\x61']), ('\U0001d51f', &['\x62']), ('\U0001d520', &['\x63']), + ('\U0001d521', &['\x64']), ('\U0001d522', &['\x65']), ('\U0001d523', &['\x66']), + ('\U0001d524', &['\x67']), ('\U0001d525', &['\x68']), ('\U0001d526', &['\x69']), + ('\U0001d527', &['\x6a']), ('\U0001d528', &['\x6b']), ('\U0001d529', &['\x6c']), + ('\U0001d52a', &['\x6d']), ('\U0001d52b', &['\x6e']), ('\U0001d52c', &['\x6f']), + ('\U0001d52d', &['\x70']), ('\U0001d52e', &['\x71']), ('\U0001d52f', &['\x72']), + ('\U0001d530', &['\x73']), ('\U0001d531', &['\x74']), ('\U0001d532', &['\x75']), + ('\U0001d533', &['\x76']), ('\U0001d534', &['\x77']), ('\U0001d535', &['\x78']), + ('\U0001d536', &['\x79']), ('\U0001d537', &['\x7a']), ('\U0001d538', &['\x41']), + ('\U0001d539', &['\x42']), ('\U0001d53b', &['\x44']), ('\U0001d53c', &['\x45']), + ('\U0001d53d', &['\x46']), ('\U0001d53e', &['\x47']), ('\U0001d540', &['\x49']), + ('\U0001d541', &['\x4a']), ('\U0001d542', &['\x4b']), ('\U0001d543', &['\x4c']), + ('\U0001d544', &['\x4d']), ('\U0001d546', &['\x4f']), ('\U0001d54a', &['\x53']), + ('\U0001d54b', &['\x54']), ('\U0001d54c', &['\x55']), ('\U0001d54d', &['\x56']), + ('\U0001d54e', &['\x57']), ('\U0001d54f', &['\x58']), ('\U0001d550', &['\x59']), + ('\U0001d552', &['\x61']), ('\U0001d553', &['\x62']), ('\U0001d554', &['\x63']), + ('\U0001d555', &['\x64']), ('\U0001d556', &['\x65']), ('\U0001d557', &['\x66']), + ('\U0001d558', &['\x67']), ('\U0001d559', &['\x68']), ('\U0001d55a', &['\x69']), + ('\U0001d55b', &['\x6a']), ('\U0001d55c', &['\x6b']), ('\U0001d55d', &['\x6c']), + ('\U0001d55e', &['\x6d']), ('\U0001d55f', &['\x6e']), ('\U0001d560', &['\x6f']), + ('\U0001d561', &['\x70']), ('\U0001d562', &['\x71']), ('\U0001d563', &['\x72']), + ('\U0001d564', &['\x73']), ('\U0001d565', &['\x74']), ('\U0001d566', &['\x75']), + ('\U0001d567', &['\x76']), ('\U0001d568', &['\x77']), ('\U0001d569', &['\x78']), + ('\U0001d56a', &['\x79']), ('\U0001d56b', &['\x7a']), ('\U0001d56c', &['\x41']), + ('\U0001d56d', &['\x42']), ('\U0001d56e', &['\x43']), ('\U0001d56f', &['\x44']), + ('\U0001d570', &['\x45']), ('\U0001d571', &['\x46']), ('\U0001d572', &['\x47']), + ('\U0001d573', &['\x48']), ('\U0001d574', &['\x49']), ('\U0001d575', &['\x4a']), + ('\U0001d576', &['\x4b']), ('\U0001d577', &['\x4c']), ('\U0001d578', &['\x4d']), + ('\U0001d579', &['\x4e']), ('\U0001d57a', &['\x4f']), ('\U0001d57b', &['\x50']), + ('\U0001d57c', &['\x51']), ('\U0001d57d', &['\x52']), ('\U0001d57e', &['\x53']), + ('\U0001d57f', &['\x54']), ('\U0001d580', &['\x55']), ('\U0001d581', &['\x56']), + ('\U0001d582', &['\x57']), ('\U0001d583', &['\x58']), ('\U0001d584', &['\x59']), + ('\U0001d585', &['\x5a']), ('\U0001d586', &['\x61']), ('\U0001d587', &['\x62']), + ('\U0001d588', &['\x63']), ('\U0001d589', &['\x64']), ('\U0001d58a', &['\x65']), + ('\U0001d58b', &['\x66']), ('\U0001d58c', &['\x67']), ('\U0001d58d', &['\x68']), + ('\U0001d58e', &['\x69']), ('\U0001d58f', &['\x6a']), ('\U0001d590', &['\x6b']), + ('\U0001d591', &['\x6c']), ('\U0001d592', &['\x6d']), ('\U0001d593', &['\x6e']), + ('\U0001d594', &['\x6f']), ('\U0001d595', &['\x70']), ('\U0001d596', &['\x71']), + ('\U0001d597', &['\x72']), ('\U0001d598', &['\x73']), ('\U0001d599', &['\x74']), + ('\U0001d59a', &['\x75']), ('\U0001d59b', &['\x76']), ('\U0001d59c', &['\x77']), + ('\U0001d59d', &['\x78']), ('\U0001d59e', &['\x79']), ('\U0001d59f', &['\x7a']), + ('\U0001d5a0', &['\x41']), ('\U0001d5a1', &['\x42']), ('\U0001d5a2', &['\x43']), + ('\U0001d5a3', &['\x44']), ('\U0001d5a4', &['\x45']), ('\U0001d5a5', &['\x46']), + ('\U0001d5a6', &['\x47']), ('\U0001d5a7', &['\x48']), ('\U0001d5a8', &['\x49']), + ('\U0001d5a9', &['\x4a']), ('\U0001d5aa', &['\x4b']), ('\U0001d5ab', &['\x4c']), + ('\U0001d5ac', &['\x4d']), ('\U0001d5ad', &['\x4e']), ('\U0001d5ae', &['\x4f']), + ('\U0001d5af', &['\x50']), ('\U0001d5b0', &['\x51']), ('\U0001d5b1', &['\x52']), + ('\U0001d5b2', &['\x53']), ('\U0001d5b3', &['\x54']), ('\U0001d5b4', &['\x55']), + ('\U0001d5b5', &['\x56']), ('\U0001d5b6', &['\x57']), ('\U0001d5b7', &['\x58']), + ('\U0001d5b8', &['\x59']), ('\U0001d5b9', &['\x5a']), ('\U0001d5ba', &['\x61']), + ('\U0001d5bb', &['\x62']), ('\U0001d5bc', &['\x63']), ('\U0001d5bd', &['\x64']), + ('\U0001d5be', &['\x65']), ('\U0001d5bf', &['\x66']), ('\U0001d5c0', &['\x67']), + ('\U0001d5c1', &['\x68']), ('\U0001d5c2', &['\x69']), ('\U0001d5c3', &['\x6a']), + ('\U0001d5c4', &['\x6b']), ('\U0001d5c5', &['\x6c']), ('\U0001d5c6', &['\x6d']), + ('\U0001d5c7', &['\x6e']), ('\U0001d5c8', &['\x6f']), ('\U0001d5c9', &['\x70']), + ('\U0001d5ca', &['\x71']), ('\U0001d5cb', &['\x72']), ('\U0001d5cc', &['\x73']), + ('\U0001d5cd', &['\x74']), ('\U0001d5ce', &['\x75']), ('\U0001d5cf', &['\x76']), + ('\U0001d5d0', &['\x77']), ('\U0001d5d1', &['\x78']), ('\U0001d5d2', &['\x79']), + ('\U0001d5d3', &['\x7a']), ('\U0001d5d4', &['\x41']), ('\U0001d5d5', &['\x42']), + ('\U0001d5d6', &['\x43']), ('\U0001d5d7', &['\x44']), ('\U0001d5d8', &['\x45']), + ('\U0001d5d9', &['\x46']), ('\U0001d5da', &['\x47']), ('\U0001d5db', &['\x48']), + ('\U0001d5dc', &['\x49']), ('\U0001d5dd', &['\x4a']), ('\U0001d5de', &['\x4b']), + ('\U0001d5df', &['\x4c']), ('\U0001d5e0', &['\x4d']), ('\U0001d5e1', &['\x4e']), + ('\U0001d5e2', &['\x4f']), ('\U0001d5e3', &['\x50']), ('\U0001d5e4', &['\x51']), + ('\U0001d5e5', &['\x52']), ('\U0001d5e6', &['\x53']), ('\U0001d5e7', &['\x54']), + ('\U0001d5e8', &['\x55']), ('\U0001d5e9', &['\x56']), ('\U0001d5ea', &['\x57']), + ('\U0001d5eb', &['\x58']), ('\U0001d5ec', &['\x59']), ('\U0001d5ed', &['\x5a']), + ('\U0001d5ee', &['\x61']), ('\U0001d5ef', &['\x62']), ('\U0001d5f0', &['\x63']), + ('\U0001d5f1', &['\x64']), ('\U0001d5f2', &['\x65']), ('\U0001d5f3', &['\x66']), + ('\U0001d5f4', &['\x67']), ('\U0001d5f5', &['\x68']), ('\U0001d5f6', &['\x69']), + ('\U0001d5f7', &['\x6a']), ('\U0001d5f8', &['\x6b']), ('\U0001d5f9', &['\x6c']), + ('\U0001d5fa', &['\x6d']), ('\U0001d5fb', &['\x6e']), ('\U0001d5fc', &['\x6f']), + ('\U0001d5fd', &['\x70']), ('\U0001d5fe', &['\x71']), ('\U0001d5ff', &['\x72']), + ('\U0001d600', &['\x73']), ('\U0001d601', &['\x74']), ('\U0001d602', &['\x75']), + ('\U0001d603', &['\x76']), ('\U0001d604', &['\x77']), ('\U0001d605', &['\x78']), + ('\U0001d606', &['\x79']), ('\U0001d607', &['\x7a']), ('\U0001d608', &['\x41']), + ('\U0001d609', &['\x42']), ('\U0001d60a', &['\x43']), ('\U0001d60b', &['\x44']), + ('\U0001d60c', &['\x45']), ('\U0001d60d', &['\x46']), ('\U0001d60e', &['\x47']), + ('\U0001d60f', &['\x48']), ('\U0001d610', &['\x49']), ('\U0001d611', &['\x4a']), + ('\U0001d612', &['\x4b']), ('\U0001d613', &['\x4c']), ('\U0001d614', &['\x4d']), + ('\U0001d615', &['\x4e']), ('\U0001d616', &['\x4f']), ('\U0001d617', &['\x50']), + ('\U0001d618', &['\x51']), ('\U0001d619', &['\x52']), ('\U0001d61a', &['\x53']), + ('\U0001d61b', &['\x54']), ('\U0001d61c', &['\x55']), ('\U0001d61d', &['\x56']), + ('\U0001d61e', &['\x57']), ('\U0001d61f', &['\x58']), ('\U0001d620', &['\x59']), + ('\U0001d621', &['\x5a']), ('\U0001d622', &['\x61']), ('\U0001d623', &['\x62']), + ('\U0001d624', &['\x63']), ('\U0001d625', &['\x64']), ('\U0001d626', &['\x65']), + ('\U0001d627', &['\x66']), ('\U0001d628', &['\x67']), ('\U0001d629', &['\x68']), + ('\U0001d62a', &['\x69']), ('\U0001d62b', &['\x6a']), ('\U0001d62c', &['\x6b']), + ('\U0001d62d', &['\x6c']), ('\U0001d62e', &['\x6d']), ('\U0001d62f', &['\x6e']), + ('\U0001d630', &['\x6f']), ('\U0001d631', &['\x70']), ('\U0001d632', &['\x71']), + ('\U0001d633', &['\x72']), ('\U0001d634', &['\x73']), ('\U0001d635', &['\x74']), + ('\U0001d636', &['\x75']), ('\U0001d637', &['\x76']), ('\U0001d638', &['\x77']), + ('\U0001d639', &['\x78']), ('\U0001d63a', &['\x79']), ('\U0001d63b', &['\x7a']), + ('\U0001d63c', &['\x41']), ('\U0001d63d', &['\x42']), ('\U0001d63e', &['\x43']), + ('\U0001d63f', &['\x44']), ('\U0001d640', &['\x45']), ('\U0001d641', &['\x46']), + ('\U0001d642', &['\x47']), ('\U0001d643', &['\x48']), ('\U0001d644', &['\x49']), + ('\U0001d645', &['\x4a']), ('\U0001d646', &['\x4b']), ('\U0001d647', &['\x4c']), + ('\U0001d648', &['\x4d']), ('\U0001d649', &['\x4e']), ('\U0001d64a', &['\x4f']), + ('\U0001d64b', &['\x50']), ('\U0001d64c', &['\x51']), ('\U0001d64d', &['\x52']), + ('\U0001d64e', &['\x53']), ('\U0001d64f', &['\x54']), ('\U0001d650', &['\x55']), + ('\U0001d651', &['\x56']), ('\U0001d652', &['\x57']), ('\U0001d653', &['\x58']), + ('\U0001d654', &['\x59']), ('\U0001d655', &['\x5a']), ('\U0001d656', &['\x61']), + ('\U0001d657', &['\x62']), ('\U0001d658', &['\x63']), ('\U0001d659', &['\x64']), + ('\U0001d65a', &['\x65']), ('\U0001d65b', &['\x66']), ('\U0001d65c', &['\x67']), + ('\U0001d65d', &['\x68']), ('\U0001d65e', &['\x69']), ('\U0001d65f', &['\x6a']), + ('\U0001d660', &['\x6b']), ('\U0001d661', &['\x6c']), ('\U0001d662', &['\x6d']), + ('\U0001d663', &['\x6e']), ('\U0001d664', &['\x6f']), ('\U0001d665', &['\x70']), + ('\U0001d666', &['\x71']), ('\U0001d667', &['\x72']), ('\U0001d668', &['\x73']), + ('\U0001d669', &['\x74']), ('\U0001d66a', &['\x75']), ('\U0001d66b', &['\x76']), + ('\U0001d66c', &['\x77']), ('\U0001d66d', &['\x78']), ('\U0001d66e', &['\x79']), + ('\U0001d66f', &['\x7a']), ('\U0001d670', &['\x41']), ('\U0001d671', &['\x42']), + ('\U0001d672', &['\x43']), ('\U0001d673', &['\x44']), ('\U0001d674', &['\x45']), + ('\U0001d675', &['\x46']), ('\U0001d676', &['\x47']), ('\U0001d677', &['\x48']), + ('\U0001d678', &['\x49']), ('\U0001d679', &['\x4a']), ('\U0001d67a', &['\x4b']), + ('\U0001d67b', &['\x4c']), ('\U0001d67c', &['\x4d']), ('\U0001d67d', &['\x4e']), + ('\U0001d67e', &['\x4f']), ('\U0001d67f', &['\x50']), ('\U0001d680', &['\x51']), + ('\U0001d681', &['\x52']), ('\U0001d682', &['\x53']), ('\U0001d683', &['\x54']), + ('\U0001d684', &['\x55']), ('\U0001d685', &['\x56']), ('\U0001d686', &['\x57']), + ('\U0001d687', &['\x58']), ('\U0001d688', &['\x59']), ('\U0001d689', &['\x5a']), + ('\U0001d68a', &['\x61']), ('\U0001d68b', &['\x62']), ('\U0001d68c', &['\x63']), + ('\U0001d68d', &['\x64']), ('\U0001d68e', &['\x65']), ('\U0001d68f', &['\x66']), + ('\U0001d690', &['\x67']), ('\U0001d691', &['\x68']), ('\U0001d692', &['\x69']), + ('\U0001d693', &['\x6a']), ('\U0001d694', &['\x6b']), ('\U0001d695', &['\x6c']), + ('\U0001d696', &['\x6d']), ('\U0001d697', &['\x6e']), ('\U0001d698', &['\x6f']), + ('\U0001d699', &['\x70']), ('\U0001d69a', &['\x71']), ('\U0001d69b', &['\x72']), + ('\U0001d69c', &['\x73']), ('\U0001d69d', &['\x74']), ('\U0001d69e', &['\x75']), + ('\U0001d69f', &['\x76']), ('\U0001d6a0', &['\x77']), ('\U0001d6a1', &['\x78']), + ('\U0001d6a2', &['\x79']), ('\U0001d6a3', &['\x7a']), ('\U0001d6a4', &['\u0131']), + ('\U0001d6a5', &['\u0237']), ('\U0001d6a8', &['\u0391']), ('\U0001d6a9', &['\u0392']), + ('\U0001d6aa', &['\u0393']), ('\U0001d6ab', &['\u0394']), ('\U0001d6ac', &['\u0395']), + ('\U0001d6ad', &['\u0396']), ('\U0001d6ae', &['\u0397']), ('\U0001d6af', &['\u0398']), + ('\U0001d6b0', &['\u0399']), ('\U0001d6b1', &['\u039a']), ('\U0001d6b2', &['\u039b']), + ('\U0001d6b3', &['\u039c']), ('\U0001d6b4', &['\u039d']), ('\U0001d6b5', &['\u039e']), + ('\U0001d6b6', &['\u039f']), ('\U0001d6b7', &['\u03a0']), ('\U0001d6b8', &['\u03a1']), + ('\U0001d6b9', &['\u03f4']), ('\U0001d6ba', &['\u03a3']), ('\U0001d6bb', &['\u03a4']), + ('\U0001d6bc', &['\u03a5']), ('\U0001d6bd', &['\u03a6']), ('\U0001d6be', &['\u03a7']), + ('\U0001d6bf', &['\u03a8']), ('\U0001d6c0', &['\u03a9']), ('\U0001d6c1', &['\u2207']), + ('\U0001d6c2', &['\u03b1']), ('\U0001d6c3', &['\u03b2']), ('\U0001d6c4', &['\u03b3']), + ('\U0001d6c5', &['\u03b4']), ('\U0001d6c6', &['\u03b5']), ('\U0001d6c7', &['\u03b6']), + ('\U0001d6c8', &['\u03b7']), ('\U0001d6c9', &['\u03b8']), ('\U0001d6ca', &['\u03b9']), + ('\U0001d6cb', &['\u03ba']), ('\U0001d6cc', &['\u03bb']), ('\U0001d6cd', &['\u03bc']), + ('\U0001d6ce', &['\u03bd']), ('\U0001d6cf', &['\u03be']), ('\U0001d6d0', &['\u03bf']), + ('\U0001d6d1', &['\u03c0']), ('\U0001d6d2', &['\u03c1']), ('\U0001d6d3', &['\u03c2']), + ('\U0001d6d4', &['\u03c3']), ('\U0001d6d5', &['\u03c4']), ('\U0001d6d6', &['\u03c5']), + ('\U0001d6d7', &['\u03c6']), ('\U0001d6d8', &['\u03c7']), ('\U0001d6d9', &['\u03c8']), + ('\U0001d6da', &['\u03c9']), ('\U0001d6db', &['\u2202']), ('\U0001d6dc', &['\u03f5']), + ('\U0001d6dd', &['\u03d1']), ('\U0001d6de', &['\u03f0']), ('\U0001d6df', &['\u03d5']), + ('\U0001d6e0', &['\u03f1']), ('\U0001d6e1', &['\u03d6']), ('\U0001d6e2', &['\u0391']), + ('\U0001d6e3', &['\u0392']), ('\U0001d6e4', &['\u0393']), ('\U0001d6e5', &['\u0394']), + ('\U0001d6e6', &['\u0395']), ('\U0001d6e7', &['\u0396']), ('\U0001d6e8', &['\u0397']), + ('\U0001d6e9', &['\u0398']), ('\U0001d6ea', &['\u0399']), ('\U0001d6eb', &['\u039a']), + ('\U0001d6ec', &['\u039b']), ('\U0001d6ed', &['\u039c']), ('\U0001d6ee', &['\u039d']), + ('\U0001d6ef', &['\u039e']), ('\U0001d6f0', &['\u039f']), ('\U0001d6f1', &['\u03a0']), + ('\U0001d6f2', &['\u03a1']), ('\U0001d6f3', &['\u03f4']), ('\U0001d6f4', &['\u03a3']), + ('\U0001d6f5', &['\u03a4']), ('\U0001d6f6', &['\u03a5']), ('\U0001d6f7', &['\u03a6']), + ('\U0001d6f8', &['\u03a7']), ('\U0001d6f9', &['\u03a8']), ('\U0001d6fa', &['\u03a9']), + ('\U0001d6fb', &['\u2207']), ('\U0001d6fc', &['\u03b1']), ('\U0001d6fd', &['\u03b2']), + ('\U0001d6fe', &['\u03b3']), ('\U0001d6ff', &['\u03b4']), ('\U0001d700', &['\u03b5']), + ('\U0001d701', &['\u03b6']), ('\U0001d702', &['\u03b7']), ('\U0001d703', &['\u03b8']), + ('\U0001d704', &['\u03b9']), ('\U0001d705', &['\u03ba']), ('\U0001d706', &['\u03bb']), + ('\U0001d707', &['\u03bc']), ('\U0001d708', &['\u03bd']), ('\U0001d709', &['\u03be']), + ('\U0001d70a', &['\u03bf']), ('\U0001d70b', &['\u03c0']), ('\U0001d70c', &['\u03c1']), + ('\U0001d70d', &['\u03c2']), ('\U0001d70e', &['\u03c3']), ('\U0001d70f', &['\u03c4']), + ('\U0001d710', &['\u03c5']), ('\U0001d711', &['\u03c6']), ('\U0001d712', &['\u03c7']), + ('\U0001d713', &['\u03c8']), ('\U0001d714', &['\u03c9']), ('\U0001d715', &['\u2202']), + ('\U0001d716', &['\u03f5']), ('\U0001d717', &['\u03d1']), ('\U0001d718', &['\u03f0']), + ('\U0001d719', &['\u03d5']), ('\U0001d71a', &['\u03f1']), ('\U0001d71b', &['\u03d6']), + ('\U0001d71c', &['\u0391']), ('\U0001d71d', &['\u0392']), ('\U0001d71e', &['\u0393']), + ('\U0001d71f', &['\u0394']), ('\U0001d720', &['\u0395']), ('\U0001d721', &['\u0396']), + ('\U0001d722', &['\u0397']), ('\U0001d723', &['\u0398']), ('\U0001d724', &['\u0399']), + ('\U0001d725', &['\u039a']), ('\U0001d726', &['\u039b']), ('\U0001d727', &['\u039c']), + ('\U0001d728', &['\u039d']), ('\U0001d729', &['\u039e']), ('\U0001d72a', &['\u039f']), + ('\U0001d72b', &['\u03a0']), ('\U0001d72c', &['\u03a1']), ('\U0001d72d', &['\u03f4']), + ('\U0001d72e', &['\u03a3']), ('\U0001d72f', &['\u03a4']), ('\U0001d730', &['\u03a5']), + ('\U0001d731', &['\u03a6']), ('\U0001d732', &['\u03a7']), ('\U0001d733', &['\u03a8']), + ('\U0001d734', &['\u03a9']), ('\U0001d735', &['\u2207']), ('\U0001d736', &['\u03b1']), + ('\U0001d737', &['\u03b2']), ('\U0001d738', &['\u03b3']), ('\U0001d739', &['\u03b4']), + ('\U0001d73a', &['\u03b5']), ('\U0001d73b', &['\u03b6']), ('\U0001d73c', &['\u03b7']), + ('\U0001d73d', &['\u03b8']), ('\U0001d73e', &['\u03b9']), ('\U0001d73f', &['\u03ba']), + ('\U0001d740', &['\u03bb']), ('\U0001d741', &['\u03bc']), ('\U0001d742', &['\u03bd']), + ('\U0001d743', &['\u03be']), ('\U0001d744', &['\u03bf']), ('\U0001d745', &['\u03c0']), + ('\U0001d746', &['\u03c1']), ('\U0001d747', &['\u03c2']), ('\U0001d748', &['\u03c3']), + ('\U0001d749', &['\u03c4']), ('\U0001d74a', &['\u03c5']), ('\U0001d74b', &['\u03c6']), + ('\U0001d74c', &['\u03c7']), ('\U0001d74d', &['\u03c8']), ('\U0001d74e', &['\u03c9']), + ('\U0001d74f', &['\u2202']), ('\U0001d750', &['\u03f5']), ('\U0001d751', &['\u03d1']), + ('\U0001d752', &['\u03f0']), ('\U0001d753', &['\u03d5']), ('\U0001d754', &['\u03f1']), + ('\U0001d755', &['\u03d6']), ('\U0001d756', &['\u0391']), ('\U0001d757', &['\u0392']), + ('\U0001d758', &['\u0393']), ('\U0001d759', &['\u0394']), ('\U0001d75a', &['\u0395']), + ('\U0001d75b', &['\u0396']), ('\U0001d75c', &['\u0397']), ('\U0001d75d', &['\u0398']), + ('\U0001d75e', &['\u0399']), ('\U0001d75f', &['\u039a']), ('\U0001d760', &['\u039b']), + ('\U0001d761', &['\u039c']), ('\U0001d762', &['\u039d']), ('\U0001d763', &['\u039e']), + ('\U0001d764', &['\u039f']), ('\U0001d765', &['\u03a0']), ('\U0001d766', &['\u03a1']), + ('\U0001d767', &['\u03f4']), ('\U0001d768', &['\u03a3']), ('\U0001d769', &['\u03a4']), + ('\U0001d76a', &['\u03a5']), ('\U0001d76b', &['\u03a6']), ('\U0001d76c', &['\u03a7']), + ('\U0001d76d', &['\u03a8']), ('\U0001d76e', &['\u03a9']), ('\U0001d76f', &['\u2207']), + ('\U0001d770', &['\u03b1']), ('\U0001d771', &['\u03b2']), ('\U0001d772', &['\u03b3']), + ('\U0001d773', &['\u03b4']), ('\U0001d774', &['\u03b5']), ('\U0001d775', &['\u03b6']), + ('\U0001d776', &['\u03b7']), ('\U0001d777', &['\u03b8']), ('\U0001d778', &['\u03b9']), + ('\U0001d779', &['\u03ba']), ('\U0001d77a', &['\u03bb']), ('\U0001d77b', &['\u03bc']), + ('\U0001d77c', &['\u03bd']), ('\U0001d77d', &['\u03be']), ('\U0001d77e', &['\u03bf']), + ('\U0001d77f', &['\u03c0']), ('\U0001d780', &['\u03c1']), ('\U0001d781', &['\u03c2']), + ('\U0001d782', &['\u03c3']), ('\U0001d783', &['\u03c4']), ('\U0001d784', &['\u03c5']), + ('\U0001d785', &['\u03c6']), ('\U0001d786', &['\u03c7']), ('\U0001d787', &['\u03c8']), + ('\U0001d788', &['\u03c9']), ('\U0001d789', &['\u2202']), ('\U0001d78a', &['\u03f5']), + ('\U0001d78b', &['\u03d1']), ('\U0001d78c', &['\u03f0']), ('\U0001d78d', &['\u03d5']), + ('\U0001d78e', &['\u03f1']), ('\U0001d78f', &['\u03d6']), ('\U0001d790', &['\u0391']), + ('\U0001d791', &['\u0392']), ('\U0001d792', &['\u0393']), ('\U0001d793', &['\u0394']), + ('\U0001d794', &['\u0395']), ('\U0001d795', &['\u0396']), ('\U0001d796', &['\u0397']), + ('\U0001d797', &['\u0398']), ('\U0001d798', &['\u0399']), ('\U0001d799', &['\u039a']), + ('\U0001d79a', &['\u039b']), ('\U0001d79b', &['\u039c']), ('\U0001d79c', &['\u039d']), + ('\U0001d79d', &['\u039e']), ('\U0001d79e', &['\u039f']), ('\U0001d79f', &['\u03a0']), + ('\U0001d7a0', &['\u03a1']), ('\U0001d7a1', &['\u03f4']), ('\U0001d7a2', &['\u03a3']), + ('\U0001d7a3', &['\u03a4']), ('\U0001d7a4', &['\u03a5']), ('\U0001d7a5', &['\u03a6']), + ('\U0001d7a6', &['\u03a7']), ('\U0001d7a7', &['\u03a8']), ('\U0001d7a8', &['\u03a9']), + ('\U0001d7a9', &['\u2207']), ('\U0001d7aa', &['\u03b1']), ('\U0001d7ab', &['\u03b2']), + ('\U0001d7ac', &['\u03b3']), ('\U0001d7ad', &['\u03b4']), ('\U0001d7ae', &['\u03b5']), + ('\U0001d7af', &['\u03b6']), ('\U0001d7b0', &['\u03b7']), ('\U0001d7b1', &['\u03b8']), + ('\U0001d7b2', &['\u03b9']), ('\U0001d7b3', &['\u03ba']), ('\U0001d7b4', &['\u03bb']), + ('\U0001d7b5', &['\u03bc']), ('\U0001d7b6', &['\u03bd']), ('\U0001d7b7', &['\u03be']), + ('\U0001d7b8', &['\u03bf']), ('\U0001d7b9', &['\u03c0']), ('\U0001d7ba', &['\u03c1']), + ('\U0001d7bb', &['\u03c2']), ('\U0001d7bc', &['\u03c3']), ('\U0001d7bd', &['\u03c4']), + ('\U0001d7be', &['\u03c5']), ('\U0001d7bf', &['\u03c6']), ('\U0001d7c0', &['\u03c7']), + ('\U0001d7c1', &['\u03c8']), ('\U0001d7c2', &['\u03c9']), ('\U0001d7c3', &['\u2202']), + ('\U0001d7c4', &['\u03f5']), ('\U0001d7c5', &['\u03d1']), ('\U0001d7c6', &['\u03f0']), + ('\U0001d7c7', &['\u03d5']), ('\U0001d7c8', &['\u03f1']), ('\U0001d7c9', &['\u03d6']), + ('\U0001d7ca', &['\u03dc']), ('\U0001d7cb', &['\u03dd']), ('\U0001d7ce', &['\x30']), + ('\U0001d7cf', &['\x31']), ('\U0001d7d0', &['\x32']), ('\U0001d7d1', &['\x33']), + ('\U0001d7d2', &['\x34']), ('\U0001d7d3', &['\x35']), ('\U0001d7d4', &['\x36']), + ('\U0001d7d5', &['\x37']), ('\U0001d7d6', &['\x38']), ('\U0001d7d7', &['\x39']), + ('\U0001d7d8', &['\x30']), ('\U0001d7d9', &['\x31']), ('\U0001d7da', &['\x32']), + ('\U0001d7db', &['\x33']), ('\U0001d7dc', &['\x34']), ('\U0001d7dd', &['\x35']), + ('\U0001d7de', &['\x36']), ('\U0001d7df', &['\x37']), ('\U0001d7e0', &['\x38']), + ('\U0001d7e1', &['\x39']), ('\U0001d7e2', &['\x30']), ('\U0001d7e3', &['\x31']), + ('\U0001d7e4', &['\x32']), ('\U0001d7e5', &['\x33']), ('\U0001d7e6', &['\x34']), + ('\U0001d7e7', &['\x35']), ('\U0001d7e8', &['\x36']), ('\U0001d7e9', &['\x37']), + ('\U0001d7ea', &['\x38']), ('\U0001d7eb', &['\x39']), ('\U0001d7ec', &['\x30']), + ('\U0001d7ed', &['\x31']), ('\U0001d7ee', &['\x32']), ('\U0001d7ef', &['\x33']), + ('\U0001d7f0', &['\x34']), ('\U0001d7f1', &['\x35']), ('\U0001d7f2', &['\x36']), + ('\U0001d7f3', &['\x37']), ('\U0001d7f4', &['\x38']), ('\U0001d7f5', &['\x39']), + ('\U0001d7f6', &['\x30']), ('\U0001d7f7', &['\x31']), ('\U0001d7f8', &['\x32']), + ('\U0001d7f9', &['\x33']), ('\U0001d7fa', &['\x34']), ('\U0001d7fb', &['\x35']), + ('\U0001d7fc', &['\x36']), ('\U0001d7fd', &['\x37']), ('\U0001d7fe', &['\x38']), + ('\U0001d7ff', &['\x39']), ('\U0001ee00', &['\u0627']), ('\U0001ee01', &['\u0628']), + ('\U0001ee02', &['\u062c']), ('\U0001ee03', &['\u062f']), ('\U0001ee05', &['\u0648']), + ('\U0001ee06', &['\u0632']), ('\U0001ee07', &['\u062d']), ('\U0001ee08', &['\u0637']), + ('\U0001ee09', &['\u064a']), ('\U0001ee0a', &['\u0643']), ('\U0001ee0b', &['\u0644']), + ('\U0001ee0c', &['\u0645']), ('\U0001ee0d', &['\u0646']), ('\U0001ee0e', &['\u0633']), + ('\U0001ee0f', &['\u0639']), ('\U0001ee10', &['\u0641']), ('\U0001ee11', &['\u0635']), + ('\U0001ee12', &['\u0642']), ('\U0001ee13', &['\u0631']), ('\U0001ee14', &['\u0634']), + ('\U0001ee15', &['\u062a']), ('\U0001ee16', &['\u062b']), ('\U0001ee17', &['\u062e']), + ('\U0001ee18', &['\u0630']), ('\U0001ee19', &['\u0636']), ('\U0001ee1a', &['\u0638']), + ('\U0001ee1b', &['\u063a']), ('\U0001ee1c', &['\u066e']), ('\U0001ee1d', &['\u06ba']), + ('\U0001ee1e', &['\u06a1']), ('\U0001ee1f', &['\u066f']), ('\U0001ee21', &['\u0628']), + ('\U0001ee22', &['\u062c']), ('\U0001ee24', &['\u0647']), ('\U0001ee27', &['\u062d']), + ('\U0001ee29', &['\u064a']), ('\U0001ee2a', &['\u0643']), ('\U0001ee2b', &['\u0644']), + ('\U0001ee2c', &['\u0645']), ('\U0001ee2d', &['\u0646']), ('\U0001ee2e', &['\u0633']), + ('\U0001ee2f', &['\u0639']), ('\U0001ee30', &['\u0641']), ('\U0001ee31', &['\u0635']), + ('\U0001ee32', &['\u0642']), ('\U0001ee34', &['\u0634']), ('\U0001ee35', &['\u062a']), + ('\U0001ee36', &['\u062b']), ('\U0001ee37', &['\u062e']), ('\U0001ee39', &['\u0636']), + ('\U0001ee3b', &['\u063a']), ('\U0001ee42', &['\u062c']), ('\U0001ee47', &['\u062d']), + ('\U0001ee49', &['\u064a']), ('\U0001ee4b', &['\u0644']), ('\U0001ee4d', &['\u0646']), + ('\U0001ee4e', &['\u0633']), ('\U0001ee4f', &['\u0639']), ('\U0001ee51', &['\u0635']), + ('\U0001ee52', &['\u0642']), ('\U0001ee54', &['\u0634']), ('\U0001ee57', &['\u062e']), + ('\U0001ee59', &['\u0636']), ('\U0001ee5b', &['\u063a']), ('\U0001ee5d', &['\u06ba']), + ('\U0001ee5f', &['\u066f']), ('\U0001ee61', &['\u0628']), ('\U0001ee62', &['\u062c']), + ('\U0001ee64', &['\u0647']), ('\U0001ee67', &['\u062d']), ('\U0001ee68', &['\u0637']), + ('\U0001ee69', &['\u064a']), ('\U0001ee6a', &['\u0643']), ('\U0001ee6c', &['\u0645']), + ('\U0001ee6d', &['\u0646']), ('\U0001ee6e', &['\u0633']), ('\U0001ee6f', &['\u0639']), + ('\U0001ee70', &['\u0641']), ('\U0001ee71', &['\u0635']), ('\U0001ee72', &['\u0642']), + ('\U0001ee74', &['\u0634']), ('\U0001ee75', &['\u062a']), ('\U0001ee76', &['\u062b']), + ('\U0001ee77', &['\u062e']), ('\U0001ee79', &['\u0636']), ('\U0001ee7a', &['\u0638']), + ('\U0001ee7b', &['\u063a']), ('\U0001ee7c', &['\u066e']), ('\U0001ee7e', &['\u06a1']), + ('\U0001ee80', &['\u0627']), ('\U0001ee81', &['\u0628']), ('\U0001ee82', &['\u062c']), + ('\U0001ee83', &['\u062f']), ('\U0001ee84', &['\u0647']), ('\U0001ee85', &['\u0648']), + ('\U0001ee86', &['\u0632']), ('\U0001ee87', &['\u062d']), ('\U0001ee88', &['\u0637']), + ('\U0001ee89', &['\u064a']), ('\U0001ee8b', &['\u0644']), ('\U0001ee8c', &['\u0645']), + ('\U0001ee8d', &['\u0646']), ('\U0001ee8e', &['\u0633']), ('\U0001ee8f', &['\u0639']), + ('\U0001ee90', &['\u0641']), ('\U0001ee91', &['\u0635']), ('\U0001ee92', &['\u0642']), + ('\U0001ee93', &['\u0631']), ('\U0001ee94', &['\u0634']), ('\U0001ee95', &['\u062a']), + ('\U0001ee96', &['\u062b']), ('\U0001ee97', &['\u062e']), ('\U0001ee98', &['\u0630']), + ('\U0001ee99', &['\u0636']), ('\U0001ee9a', &['\u0638']), ('\U0001ee9b', &['\u063a']), + ('\U0001eea1', &['\u0628']), ('\U0001eea2', &['\u062c']), ('\U0001eea3', &['\u062f']), + ('\U0001eea5', &['\u0648']), ('\U0001eea6', &['\u0632']), ('\U0001eea7', &['\u062d']), + ('\U0001eea8', &['\u0637']), ('\U0001eea9', &['\u064a']), ('\U0001eeab', &['\u0644']), + ('\U0001eeac', &['\u0645']), ('\U0001eead', &['\u0646']), ('\U0001eeae', &['\u0633']), + ('\U0001eeaf', &['\u0639']), ('\U0001eeb0', &['\u0641']), ('\U0001eeb1', &['\u0635']), + ('\U0001eeb2', &['\u0642']), ('\U0001eeb3', &['\u0631']), ('\U0001eeb4', &['\u0634']), + ('\U0001eeb5', &['\u062a']), ('\U0001eeb6', &['\u062b']), ('\U0001eeb7', &['\u062e']), + ('\U0001eeb8', &['\u0630']), ('\U0001eeb9', &['\u0636']), ('\U0001eeba', &['\u0638']), + ('\U0001eebb', &['\u063a']), ('\U0001f100', &['\x30', '\x2e']), ('\U0001f101', &['\x30', + '\x2c']), ('\U0001f102', &['\x31', '\x2c']), ('\U0001f103', &['\x32', '\x2c']), + ('\U0001f104', &['\x33', '\x2c']), ('\U0001f105', &['\x34', '\x2c']), ('\U0001f106', + &['\x35', '\x2c']), ('\U0001f107', &['\x36', '\x2c']), ('\U0001f108', &['\x37', '\x2c']), + ('\U0001f109', &['\x38', '\x2c']), ('\U0001f10a', &['\x39', '\x2c']), ('\U0001f110', + &['\x28', '\x41', '\x29']), ('\U0001f111', &['\x28', '\x42', '\x29']), ('\U0001f112', + &['\x28', '\x43', '\x29']), ('\U0001f113', &['\x28', '\x44', '\x29']), ('\U0001f114', + &['\x28', '\x45', '\x29']), ('\U0001f115', &['\x28', '\x46', '\x29']), ('\U0001f116', + &['\x28', '\x47', '\x29']), ('\U0001f117', &['\x28', '\x48', '\x29']), ('\U0001f118', + &['\x28', '\x49', '\x29']), ('\U0001f119', &['\x28', '\x4a', '\x29']), ('\U0001f11a', + &['\x28', '\x4b', '\x29']), ('\U0001f11b', &['\x28', '\x4c', '\x29']), ('\U0001f11c', + &['\x28', '\x4d', '\x29']), ('\U0001f11d', &['\x28', '\x4e', '\x29']), ('\U0001f11e', + &['\x28', '\x4f', '\x29']), ('\U0001f11f', &['\x28', '\x50', '\x29']), ('\U0001f120', + &['\x28', '\x51', '\x29']), ('\U0001f121', &['\x28', '\x52', '\x29']), ('\U0001f122', + &['\x28', '\x53', '\x29']), ('\U0001f123', &['\x28', '\x54', '\x29']), ('\U0001f124', + &['\x28', '\x55', '\x29']), ('\U0001f125', &['\x28', '\x56', '\x29']), ('\U0001f126', + &['\x28', '\x57', '\x29']), ('\U0001f127', &['\x28', '\x58', '\x29']), ('\U0001f128', + &['\x28', '\x59', '\x29']), ('\U0001f129', &['\x28', '\x5a', '\x29']), ('\U0001f12a', + &['\u3014', '\x53', '\u3015']), ('\U0001f12b', &['\x43']), ('\U0001f12c', &['\x52']), + ('\U0001f12d', &['\x43', '\x44']), ('\U0001f12e', &['\x57', '\x5a']), ('\U0001f130', + &['\x41']), ('\U0001f131', &['\x42']), ('\U0001f132', &['\x43']), ('\U0001f133', &['\x44']), + ('\U0001f134', &['\x45']), ('\U0001f135', &['\x46']), ('\U0001f136', &['\x47']), + ('\U0001f137', &['\x48']), ('\U0001f138', &['\x49']), ('\U0001f139', &['\x4a']), + ('\U0001f13a', &['\x4b']), ('\U0001f13b', &['\x4c']), ('\U0001f13c', &['\x4d']), + ('\U0001f13d', &['\x4e']), ('\U0001f13e', &['\x4f']), ('\U0001f13f', &['\x50']), + ('\U0001f140', &['\x51']), ('\U0001f141', &['\x52']), ('\U0001f142', &['\x53']), + ('\U0001f143', &['\x54']), ('\U0001f144', &['\x55']), ('\U0001f145', &['\x56']), + ('\U0001f146', &['\x57']), ('\U0001f147', &['\x58']), ('\U0001f148', &['\x59']), + ('\U0001f149', &['\x5a']), ('\U0001f14a', &['\x48', '\x56']), ('\U0001f14b', &['\x4d', + '\x56']), ('\U0001f14c', &['\x53', '\x44']), ('\U0001f14d', &['\x53', '\x53']), + ('\U0001f14e', &['\x50', '\x50', '\x56']), ('\U0001f14f', &['\x57', '\x43']), ('\U0001f16a', + &['\x4d', '\x43']), ('\U0001f16b', &['\x4d', '\x44']), ('\U0001f190', &['\x44', '\x4a']), + ('\U0001f200', &['\u307b', '\u304b']), ('\U0001f201', &['\u30b3', '\u30b3']), ('\U0001f202', + &['\u30b5']), ('\U0001f210', &['\u624b']), ('\U0001f211', &['\u5b57']), ('\U0001f212', + &['\u53cc']), ('\U0001f213', &['\u30c7']), ('\U0001f214', &['\u4e8c']), ('\U0001f215', + &['\u591a']), ('\U0001f216', &['\u89e3']), ('\U0001f217', &['\u5929']), ('\U0001f218', + &['\u4ea4']), ('\U0001f219', &['\u6620']), ('\U0001f21a', &['\u7121']), ('\U0001f21b', + &['\u6599']), ('\U0001f21c', &['\u524d']), ('\U0001f21d', &['\u5f8c']), ('\U0001f21e', + &['\u518d']), ('\U0001f21f', &['\u65b0']), ('\U0001f220', &['\u521d']), ('\U0001f221', + &['\u7d42']), ('\U0001f222', &['\u751f']), ('\U0001f223', &['\u8ca9']), ('\U0001f224', + &['\u58f0']), ('\U0001f225', &['\u5439']), ('\U0001f226', &['\u6f14']), ('\U0001f227', + &['\u6295']), ('\U0001f228', &['\u6355']), ('\U0001f229', &['\u4e00']), ('\U0001f22a', + &['\u4e09']), ('\U0001f22b', &['\u904a']), ('\U0001f22c', &['\u5de6']), ('\U0001f22d', + &['\u4e2d']), ('\U0001f22e', &['\u53f3']), ('\U0001f22f', &['\u6307']), ('\U0001f230', + &['\u8d70']), ('\U0001f231', &['\u6253']), ('\U0001f232', &['\u7981']), ('\U0001f233', + &['\u7a7a']), ('\U0001f234', &['\u5408']), ('\U0001f235', &['\u6e80']), ('\U0001f236', + &['\u6709']), ('\U0001f237', &['\u6708']), ('\U0001f238', &['\u7533']), ('\U0001f239', + &['\u5272']), ('\U0001f23a', &['\u55b6']), ('\U0001f240', &['\u3014', '\u672c', '\u3015']), + ('\U0001f241', &['\u3014', '\u4e09', '\u3015']), ('\U0001f242', &['\u3014', '\u4e8c', + '\u3015']), ('\U0001f243', &['\u3014', '\u5b89', '\u3015']), ('\U0001f244', &['\u3014', + '\u70b9', '\u3015']), ('\U0001f245', &['\u3014', '\u6253', '\u3015']), ('\U0001f246', + &['\u3014', '\u76d7', '\u3015']), ('\U0001f247', &['\u3014', '\u52dd', '\u3015']), + ('\U0001f248', &['\u3014', '\u6557', '\u3015']), ('\U0001f250', &['\u5f97']), ('\U0001f251', + &['\u53ef']) + ]; + + pub fn canonical(c: char, i: |char|) { d(c, i, false); } + + pub fn compatibility(c: char, i: |char|) { d(c, i, true); } + + fn d(c: char, i: |char|, k: bool) { + use iter::Iterator; + if c <= '\x7f' { i(c); return; } + + match bsearch_table(c, canonical_table) { + Some(canon) => { + for x in canon.iter() { + d(*x, |b| i(b), k); + } + return; + } + None => () + } + + if !k { i(c); return; } + + match bsearch_table(c, compatibility_table) { + Some(compat) => { + for x in compat.iter() { + d(*x, |b| i(b), k); + } + return; + } + None => () + } + + i(c); + } +} + +pub mod derived_property { + static Alphabetic_table : &'static [(char,char)] = &[ + ('\x41', '\x5a'), ('\x61', '\x7a'), + ('\xaa', '\xaa'), ('\xb5', '\xb5'), + ('\xba', '\xba'), ('\xc0', '\xd6'), + ('\xd8', '\xf6'), ('\xf8', '\u01ba'), + ('\u01bb', '\u01bb'), ('\u01bc', '\u01bf'), + ('\u01c0', '\u01c3'), ('\u01c4', '\u0293'), + ('\u0294', '\u0294'), ('\u0295', '\u02af'), + ('\u02b0', '\u02c1'), ('\u02c6', '\u02d1'), + ('\u02e0', '\u02e4'), ('\u02ec', '\u02ec'), + ('\u02ee', '\u02ee'), ('\u0345', '\u0345'), + ('\u0370', '\u0373'), ('\u0374', '\u0374'), + ('\u0376', '\u0377'), ('\u037a', '\u037a'), + ('\u037b', '\u037d'), ('\u0386', '\u0386'), + ('\u0388', '\u038a'), ('\u038c', '\u038c'), + ('\u038e', '\u03a1'), ('\u03a3', '\u03f5'), + ('\u03f7', '\u0481'), ('\u048a', '\u0527'), + ('\u0531', '\u0556'), ('\u0559', '\u0559'), + ('\u0561', '\u0587'), ('\u05b0', '\u05bd'), + ('\u05bf', '\u05bf'), ('\u05c1', '\u05c2'), + ('\u05c4', '\u05c5'), ('\u05c7', '\u05c7'), + ('\u05d0', '\u05ea'), ('\u05f0', '\u05f2'), + ('\u0610', '\u061a'), ('\u0620', '\u063f'), + ('\u0640', '\u0640'), ('\u0641', '\u064a'), + ('\u064b', '\u0657'), ('\u0659', '\u065f'), + ('\u066e', '\u066f'), ('\u0670', '\u0670'), + ('\u0671', '\u06d3'), ('\u06d5', '\u06d5'), + ('\u06d6', '\u06dc'), ('\u06e1', '\u06e4'), + ('\u06e5', '\u06e6'), ('\u06e7', '\u06e8'), + ('\u06ed', '\u06ed'), ('\u06ee', '\u06ef'), + ('\u06fa', '\u06fc'), ('\u06ff', '\u06ff'), + ('\u0710', '\u0710'), ('\u0711', '\u0711'), + ('\u0712', '\u072f'), ('\u0730', '\u073f'), + ('\u074d', '\u07a5'), ('\u07a6', '\u07b0'), + ('\u07b1', '\u07b1'), ('\u07ca', '\u07ea'), + ('\u07f4', '\u07f5'), ('\u07fa', '\u07fa'), + ('\u0800', '\u0815'), ('\u0816', '\u0817'), + ('\u081a', '\u081a'), ('\u081b', '\u0823'), + ('\u0824', '\u0824'), ('\u0825', '\u0827'), + ('\u0828', '\u0828'), ('\u0829', '\u082c'), + ('\u0840', '\u0858'), ('\u08a0', '\u08a0'), + ('\u08a2', '\u08ac'), ('\u08e4', '\u08e9'), + ('\u08f0', '\u08fe'), ('\u0900', '\u0902'), + ('\u0903', '\u0903'), ('\u0904', '\u0939'), + ('\u093a', '\u093a'), ('\u093b', '\u093b'), + ('\u093d', '\u093d'), ('\u093e', '\u0940'), + ('\u0941', '\u0948'), ('\u0949', '\u094c'), + ('\u094e', '\u094f'), ('\u0950', '\u0950'), + ('\u0955', '\u0957'), ('\u0958', '\u0961'), + ('\u0962', '\u0963'), ('\u0971', '\u0971'), + ('\u0972', '\u0977'), ('\u0979', '\u097f'), + ('\u0981', '\u0981'), ('\u0982', '\u0983'), + ('\u0985', '\u098c'), ('\u098f', '\u0990'), + ('\u0993', '\u09a8'), ('\u09aa', '\u09b0'), + ('\u09b2', '\u09b2'), ('\u09b6', '\u09b9'), + ('\u09bd', '\u09bd'), ('\u09be', '\u09c0'), + ('\u09c1', '\u09c4'), ('\u09c7', '\u09c8'), + ('\u09cb', '\u09cc'), ('\u09ce', '\u09ce'), + ('\u09d7', '\u09d7'), ('\u09dc', '\u09dd'), + ('\u09df', '\u09e1'), ('\u09e2', '\u09e3'), + ('\u09f0', '\u09f1'), ('\u0a01', '\u0a02'), + ('\u0a03', '\u0a03'), ('\u0a05', '\u0a0a'), + ('\u0a0f', '\u0a10'), ('\u0a13', '\u0a28'), + ('\u0a2a', '\u0a30'), ('\u0a32', '\u0a33'), + ('\u0a35', '\u0a36'), ('\u0a38', '\u0a39'), + ('\u0a3e', '\u0a40'), ('\u0a41', '\u0a42'), + ('\u0a47', '\u0a48'), ('\u0a4b', '\u0a4c'), + ('\u0a51', '\u0a51'), ('\u0a59', '\u0a5c'), + ('\u0a5e', '\u0a5e'), ('\u0a70', '\u0a71'), + ('\u0a72', '\u0a74'), ('\u0a75', '\u0a75'), + ('\u0a81', '\u0a82'), ('\u0a83', '\u0a83'), + ('\u0a85', '\u0a8d'), ('\u0a8f', '\u0a91'), + ('\u0a93', '\u0aa8'), ('\u0aaa', '\u0ab0'), + ('\u0ab2', '\u0ab3'), ('\u0ab5', '\u0ab9'), + ('\u0abd', '\u0abd'), ('\u0abe', '\u0ac0'), + ('\u0ac1', '\u0ac5'), ('\u0ac7', '\u0ac8'), + ('\u0ac9', '\u0ac9'), ('\u0acb', '\u0acc'), + ('\u0ad0', '\u0ad0'), ('\u0ae0', '\u0ae1'), + ('\u0ae2', '\u0ae3'), ('\u0b01', '\u0b01'), + ('\u0b02', '\u0b03'), ('\u0b05', '\u0b0c'), + ('\u0b0f', '\u0b10'), ('\u0b13', '\u0b28'), + ('\u0b2a', '\u0b30'), ('\u0b32', '\u0b33'), + ('\u0b35', '\u0b39'), ('\u0b3d', '\u0b3d'), + ('\u0b3e', '\u0b3e'), ('\u0b3f', '\u0b3f'), + ('\u0b40', '\u0b40'), ('\u0b41', '\u0b44'), + ('\u0b47', '\u0b48'), ('\u0b4b', '\u0b4c'), + ('\u0b56', '\u0b56'), ('\u0b57', '\u0b57'), + ('\u0b5c', '\u0b5d'), ('\u0b5f', '\u0b61'), + ('\u0b62', '\u0b63'), ('\u0b71', '\u0b71'), + ('\u0b82', '\u0b82'), ('\u0b83', '\u0b83'), + ('\u0b85', '\u0b8a'), ('\u0b8e', '\u0b90'), + ('\u0b92', '\u0b95'), ('\u0b99', '\u0b9a'), + ('\u0b9c', '\u0b9c'), ('\u0b9e', '\u0b9f'), + ('\u0ba3', '\u0ba4'), ('\u0ba8', '\u0baa'), + ('\u0bae', '\u0bb9'), ('\u0bbe', '\u0bbf'), + ('\u0bc0', '\u0bc0'), ('\u0bc1', '\u0bc2'), + ('\u0bc6', '\u0bc8'), ('\u0bca', '\u0bcc'), + ('\u0bd0', '\u0bd0'), ('\u0bd7', '\u0bd7'), + ('\u0c01', '\u0c03'), ('\u0c05', '\u0c0c'), + ('\u0c0e', '\u0c10'), ('\u0c12', '\u0c28'), + ('\u0c2a', '\u0c33'), ('\u0c35', '\u0c39'), + ('\u0c3d', '\u0c3d'), ('\u0c3e', '\u0c40'), + ('\u0c41', '\u0c44'), ('\u0c46', '\u0c48'), + ('\u0c4a', '\u0c4c'), ('\u0c55', '\u0c56'), + ('\u0c58', '\u0c59'), ('\u0c60', '\u0c61'), + ('\u0c62', '\u0c63'), ('\u0c82', '\u0c83'), + ('\u0c85', '\u0c8c'), ('\u0c8e', '\u0c90'), + ('\u0c92', '\u0ca8'), ('\u0caa', '\u0cb3'), + ('\u0cb5', '\u0cb9'), ('\u0cbd', '\u0cbd'), + ('\u0cbe', '\u0cbe'), ('\u0cbf', '\u0cbf'), + ('\u0cc0', '\u0cc4'), ('\u0cc6', '\u0cc6'), + ('\u0cc7', '\u0cc8'), ('\u0cca', '\u0ccb'), + ('\u0ccc', '\u0ccc'), ('\u0cd5', '\u0cd6'), + ('\u0cde', '\u0cde'), ('\u0ce0', '\u0ce1'), + ('\u0ce2', '\u0ce3'), ('\u0cf1', '\u0cf2'), + ('\u0d02', '\u0d03'), ('\u0d05', '\u0d0c'), + ('\u0d0e', '\u0d10'), ('\u0d12', '\u0d3a'), + ('\u0d3d', '\u0d3d'), ('\u0d3e', '\u0d40'), + ('\u0d41', '\u0d44'), ('\u0d46', '\u0d48'), + ('\u0d4a', '\u0d4c'), ('\u0d4e', '\u0d4e'), + ('\u0d57', '\u0d57'), ('\u0d60', '\u0d61'), + ('\u0d62', '\u0d63'), ('\u0d7a', '\u0d7f'), + ('\u0d82', '\u0d83'), ('\u0d85', '\u0d96'), + ('\u0d9a', '\u0db1'), ('\u0db3', '\u0dbb'), + ('\u0dbd', '\u0dbd'), ('\u0dc0', '\u0dc6'), + ('\u0dcf', '\u0dd1'), ('\u0dd2', '\u0dd4'), + ('\u0dd6', '\u0dd6'), ('\u0dd8', '\u0ddf'), + ('\u0df2', '\u0df3'), ('\u0e01', '\u0e30'), + ('\u0e31', '\u0e31'), ('\u0e32', '\u0e33'), + ('\u0e34', '\u0e3a'), ('\u0e40', '\u0e45'), + ('\u0e46', '\u0e46'), ('\u0e4d', '\u0e4d'), + ('\u0e81', '\u0e82'), ('\u0e84', '\u0e84'), + ('\u0e87', '\u0e88'), ('\u0e8a', '\u0e8a'), + ('\u0e8d', '\u0e8d'), ('\u0e94', '\u0e97'), + ('\u0e99', '\u0e9f'), ('\u0ea1', '\u0ea3'), + ('\u0ea5', '\u0ea5'), ('\u0ea7', '\u0ea7'), + ('\u0eaa', '\u0eab'), ('\u0ead', '\u0eb0'), + ('\u0eb1', '\u0eb1'), ('\u0eb2', '\u0eb3'), + ('\u0eb4', '\u0eb9'), ('\u0ebb', '\u0ebc'), + ('\u0ebd', '\u0ebd'), ('\u0ec0', '\u0ec4'), + ('\u0ec6', '\u0ec6'), ('\u0ecd', '\u0ecd'), + ('\u0edc', '\u0edf'), ('\u0f00', '\u0f00'), + ('\u0f40', '\u0f47'), ('\u0f49', '\u0f6c'), + ('\u0f71', '\u0f7e'), ('\u0f7f', '\u0f7f'), + ('\u0f80', '\u0f81'), ('\u0f88', '\u0f8c'), + ('\u0f8d', '\u0f97'), ('\u0f99', '\u0fbc'), + ('\u1000', '\u102a'), ('\u102b', '\u102c'), + ('\u102d', '\u1030'), ('\u1031', '\u1031'), + ('\u1032', '\u1036'), ('\u1038', '\u1038'), + ('\u103b', '\u103c'), ('\u103d', '\u103e'), + ('\u103f', '\u103f'), ('\u1050', '\u1055'), + ('\u1056', '\u1057'), ('\u1058', '\u1059'), + ('\u105a', '\u105d'), ('\u105e', '\u1060'), + ('\u1061', '\u1061'), ('\u1062', '\u1062'), + ('\u1065', '\u1066'), ('\u1067', '\u1068'), + ('\u106e', '\u1070'), ('\u1071', '\u1074'), + ('\u1075', '\u1081'), ('\u1082', '\u1082'), + ('\u1083', '\u1084'), ('\u1085', '\u1086'), + ('\u108e', '\u108e'), ('\u109c', '\u109c'), + ('\u109d', '\u109d'), ('\u10a0', '\u10c5'), + ('\u10c7', '\u10c7'), ('\u10cd', '\u10cd'), + ('\u10d0', '\u10fa'), ('\u10fc', '\u10fc'), + ('\u10fd', '\u1248'), ('\u124a', '\u124d'), + ('\u1250', '\u1256'), ('\u1258', '\u1258'), + ('\u125a', '\u125d'), ('\u1260', '\u1288'), + ('\u128a', '\u128d'), ('\u1290', '\u12b0'), + ('\u12b2', '\u12b5'), ('\u12b8', '\u12be'), + ('\u12c0', '\u12c0'), ('\u12c2', '\u12c5'), + ('\u12c8', '\u12d6'), ('\u12d8', '\u1310'), + ('\u1312', '\u1315'), ('\u1318', '\u135a'), + ('\u135f', '\u135f'), ('\u1380', '\u138f'), + ('\u13a0', '\u13f4'), ('\u1401', '\u166c'), + ('\u166f', '\u167f'), ('\u1681', '\u169a'), + ('\u16a0', '\u16ea'), ('\u16ee', '\u16f0'), + ('\u1700', '\u170c'), ('\u170e', '\u1711'), + ('\u1712', '\u1713'), ('\u1720', '\u1731'), + ('\u1732', '\u1733'), ('\u1740', '\u1751'), + ('\u1752', '\u1753'), ('\u1760', '\u176c'), + ('\u176e', '\u1770'), ('\u1772', '\u1773'), + ('\u1780', '\u17b3'), ('\u17b6', '\u17b6'), + ('\u17b7', '\u17bd'), ('\u17be', '\u17c5'), + ('\u17c6', '\u17c6'), ('\u17c7', '\u17c8'), + ('\u17d7', '\u17d7'), ('\u17dc', '\u17dc'), + ('\u1820', '\u1842'), ('\u1843', '\u1843'), + ('\u1844', '\u1877'), ('\u1880', '\u18a8'), + ('\u18a9', '\u18a9'), ('\u18aa', '\u18aa'), + ('\u18b0', '\u18f5'), ('\u1900', '\u191c'), + ('\u1920', '\u1922'), ('\u1923', '\u1926'), + ('\u1927', '\u1928'), ('\u1929', '\u192b'), + ('\u1930', '\u1931'), ('\u1932', '\u1932'), + ('\u1933', '\u1938'), ('\u1950', '\u196d'), + ('\u1970', '\u1974'), ('\u1980', '\u19ab'), + ('\u19b0', '\u19c0'), ('\u19c1', '\u19c7'), + ('\u19c8', '\u19c9'), ('\u1a00', '\u1a16'), + ('\u1a17', '\u1a18'), ('\u1a19', '\u1a1a'), + ('\u1a1b', '\u1a1b'), ('\u1a20', '\u1a54'), + ('\u1a55', '\u1a55'), ('\u1a56', '\u1a56'), + ('\u1a57', '\u1a57'), ('\u1a58', '\u1a5e'), + ('\u1a61', '\u1a61'), ('\u1a62', '\u1a62'), + ('\u1a63', '\u1a64'), ('\u1a65', '\u1a6c'), + ('\u1a6d', '\u1a72'), ('\u1a73', '\u1a74'), + ('\u1aa7', '\u1aa7'), ('\u1b00', '\u1b03'), + ('\u1b04', '\u1b04'), ('\u1b05', '\u1b33'), + ('\u1b35', '\u1b35'), ('\u1b36', '\u1b3a'), + ('\u1b3b', '\u1b3b'), ('\u1b3c', '\u1b3c'), + ('\u1b3d', '\u1b41'), ('\u1b42', '\u1b42'), + ('\u1b43', '\u1b43'), ('\u1b45', '\u1b4b'), + ('\u1b80', '\u1b81'), ('\u1b82', '\u1b82'), + ('\u1b83', '\u1ba0'), ('\u1ba1', '\u1ba1'), + ('\u1ba2', '\u1ba5'), ('\u1ba6', '\u1ba7'), + ('\u1ba8', '\u1ba9'), ('\u1bac', '\u1bad'), + ('\u1bae', '\u1baf'), ('\u1bba', '\u1be5'), + ('\u1be7', '\u1be7'), ('\u1be8', '\u1be9'), + ('\u1bea', '\u1bec'), ('\u1bed', '\u1bed'), + ('\u1bee', '\u1bee'), ('\u1bef', '\u1bf1'), + ('\u1c00', '\u1c23'), ('\u1c24', '\u1c2b'), + ('\u1c2c', '\u1c33'), ('\u1c34', '\u1c35'), + ('\u1c4d', '\u1c4f'), ('\u1c5a', '\u1c77'), + ('\u1c78', '\u1c7d'), ('\u1ce9', '\u1cec'), + ('\u1cee', '\u1cf1'), ('\u1cf2', '\u1cf3'), + ('\u1cf5', '\u1cf6'), ('\u1d00', '\u1d2b'), + ('\u1d2c', '\u1d6a'), ('\u1d6b', '\u1d77'), + ('\u1d78', '\u1d78'), ('\u1d79', '\u1d9a'), + ('\u1d9b', '\u1dbf'), ('\u1e00', '\u1f15'), + ('\u1f18', '\u1f1d'), ('\u1f20', '\u1f45'), + ('\u1f48', '\u1f4d'), ('\u1f50', '\u1f57'), + ('\u1f59', '\u1f59'), ('\u1f5b', '\u1f5b'), + ('\u1f5d', '\u1f5d'), ('\u1f5f', '\u1f7d'), + ('\u1f80', '\u1fb4'), ('\u1fb6', '\u1fbc'), + ('\u1fbe', '\u1fbe'), ('\u1fc2', '\u1fc4'), + ('\u1fc6', '\u1fcc'), ('\u1fd0', '\u1fd3'), + ('\u1fd6', '\u1fdb'), ('\u1fe0', '\u1fec'), + ('\u1ff2', '\u1ff4'), ('\u1ff6', '\u1ffc'), + ('\u2071', '\u2071'), ('\u207f', '\u207f'), + ('\u2090', '\u209c'), ('\u2102', '\u2102'), + ('\u2107', '\u2107'), ('\u210a', '\u2113'), + ('\u2115', '\u2115'), ('\u2119', '\u211d'), + ('\u2124', '\u2124'), ('\u2126', '\u2126'), + ('\u2128', '\u2128'), ('\u212a', '\u212d'), + ('\u212f', '\u2134'), ('\u2135', '\u2138'), + ('\u2139', '\u2139'), ('\u213c', '\u213f'), + ('\u2145', '\u2149'), ('\u214e', '\u214e'), + ('\u2160', '\u2182'), ('\u2183', '\u2184'), + ('\u2185', '\u2188'), ('\u24b6', '\u24e9'), + ('\u2c00', '\u2c2e'), ('\u2c30', '\u2c5e'), + ('\u2c60', '\u2c7b'), ('\u2c7c', '\u2c7d'), + ('\u2c7e', '\u2ce4'), ('\u2ceb', '\u2cee'), + ('\u2cf2', '\u2cf3'), ('\u2d00', '\u2d25'), + ('\u2d27', '\u2d27'), ('\u2d2d', '\u2d2d'), + ('\u2d30', '\u2d67'), ('\u2d6f', '\u2d6f'), + ('\u2d80', '\u2d96'), ('\u2da0', '\u2da6'), + ('\u2da8', '\u2dae'), ('\u2db0', '\u2db6'), + ('\u2db8', '\u2dbe'), ('\u2dc0', '\u2dc6'), + ('\u2dc8', '\u2dce'), ('\u2dd0', '\u2dd6'), + ('\u2dd8', '\u2dde'), ('\u2de0', '\u2dff'), + ('\u2e2f', '\u2e2f'), ('\u3005', '\u3005'), + ('\u3006', '\u3006'), ('\u3007', '\u3007'), + ('\u3021', '\u3029'), ('\u3031', '\u3035'), + ('\u3038', '\u303a'), ('\u303b', '\u303b'), + ('\u303c', '\u303c'), ('\u3041', '\u3096'), + ('\u309d', '\u309e'), ('\u309f', '\u309f'), + ('\u30a1', '\u30fa'), ('\u30fc', '\u30fe'), + ('\u30ff', '\u30ff'), ('\u3105', '\u312d'), + ('\u3131', '\u318e'), ('\u31a0', '\u31ba'), + ('\u31f0', '\u31ff'), ('\u3400', '\u4db5'), + ('\u4e00', '\u9fcc'), ('\ua000', '\ua014'), + ('\ua015', '\ua015'), ('\ua016', '\ua48c'), + ('\ua4d0', '\ua4f7'), ('\ua4f8', '\ua4fd'), + ('\ua500', '\ua60b'), ('\ua60c', '\ua60c'), + ('\ua610', '\ua61f'), ('\ua62a', '\ua62b'), + ('\ua640', '\ua66d'), ('\ua66e', '\ua66e'), + ('\ua674', '\ua67b'), ('\ua67f', '\ua67f'), + ('\ua680', '\ua697'), ('\ua69f', '\ua69f'), + ('\ua6a0', '\ua6e5'), ('\ua6e6', '\ua6ef'), + ('\ua717', '\ua71f'), ('\ua722', '\ua76f'), + ('\ua770', '\ua770'), ('\ua771', '\ua787'), + ('\ua788', '\ua788'), ('\ua78b', '\ua78e'), + ('\ua790', '\ua793'), ('\ua7a0', '\ua7aa'), + ('\ua7f8', '\ua7f9'), ('\ua7fa', '\ua7fa'), + ('\ua7fb', '\ua801'), ('\ua803', '\ua805'), + ('\ua807', '\ua80a'), ('\ua80c', '\ua822'), + ('\ua823', '\ua824'), ('\ua825', '\ua826'), + ('\ua827', '\ua827'), ('\ua840', '\ua873'), + ('\ua880', '\ua881'), ('\ua882', '\ua8b3'), + ('\ua8b4', '\ua8c3'), ('\ua8f2', '\ua8f7'), + ('\ua8fb', '\ua8fb'), ('\ua90a', '\ua925'), + ('\ua926', '\ua92a'), ('\ua930', '\ua946'), + ('\ua947', '\ua951'), ('\ua952', '\ua952'), + ('\ua960', '\ua97c'), ('\ua980', '\ua982'), + ('\ua983', '\ua983'), ('\ua984', '\ua9b2'), + ('\ua9b4', '\ua9b5'), ('\ua9b6', '\ua9b9'), + ('\ua9ba', '\ua9bb'), ('\ua9bc', '\ua9bc'), + ('\ua9bd', '\ua9bf'), ('\ua9cf', '\ua9cf'), + ('\uaa00', '\uaa28'), ('\uaa29', '\uaa2e'), + ('\uaa2f', '\uaa30'), ('\uaa31', '\uaa32'), + ('\uaa33', '\uaa34'), ('\uaa35', '\uaa36'), + ('\uaa40', '\uaa42'), ('\uaa43', '\uaa43'), + ('\uaa44', '\uaa4b'), ('\uaa4c', '\uaa4c'), + ('\uaa4d', '\uaa4d'), ('\uaa60', '\uaa6f'), + ('\uaa70', '\uaa70'), ('\uaa71', '\uaa76'), + ('\uaa7a', '\uaa7a'), ('\uaa80', '\uaaaf'), + ('\uaab0', '\uaab0'), ('\uaab1', '\uaab1'), + ('\uaab2', '\uaab4'), ('\uaab5', '\uaab6'), + ('\uaab7', '\uaab8'), ('\uaab9', '\uaabd'), + ('\uaabe', '\uaabe'), ('\uaac0', '\uaac0'), + ('\uaac2', '\uaac2'), ('\uaadb', '\uaadc'), + ('\uaadd', '\uaadd'), ('\uaae0', '\uaaea'), + ('\uaaeb', '\uaaeb'), ('\uaaec', '\uaaed'), + ('\uaaee', '\uaaef'), ('\uaaf2', '\uaaf2'), + ('\uaaf3', '\uaaf4'), ('\uaaf5', '\uaaf5'), + ('\uab01', '\uab06'), ('\uab09', '\uab0e'), + ('\uab11', '\uab16'), ('\uab20', '\uab26'), + ('\uab28', '\uab2e'), ('\uabc0', '\uabe2'), + ('\uabe3', '\uabe4'), ('\uabe5', '\uabe5'), + ('\uabe6', '\uabe7'), ('\uabe8', '\uabe8'), + ('\uabe9', '\uabea'), ('\uac00', '\ud7a3'), + ('\ud7b0', '\ud7c6'), ('\ud7cb', '\ud7fb'), + ('\uf900', '\ufa6d'), ('\ufa70', '\ufad9'), + ('\ufb00', '\ufb06'), ('\ufb13', '\ufb17'), + ('\ufb1d', '\ufb1d'), ('\ufb1e', '\ufb1e'), + ('\ufb1f', '\ufb28'), ('\ufb2a', '\ufb36'), + ('\ufb38', '\ufb3c'), ('\ufb3e', '\ufb3e'), + ('\ufb40', '\ufb41'), ('\ufb43', '\ufb44'), + ('\ufb46', '\ufbb1'), ('\ufbd3', '\ufd3d'), + ('\ufd50', '\ufd8f'), ('\ufd92', '\ufdc7'), + ('\ufdf0', '\ufdfb'), ('\ufe70', '\ufe74'), + ('\ufe76', '\ufefc'), ('\uff21', '\uff3a'), + ('\uff41', '\uff5a'), ('\uff66', '\uff6f'), + ('\uff70', '\uff70'), ('\uff71', '\uff9d'), + ('\uff9e', '\uff9f'), ('\uffa0', '\uffbe'), + ('\uffc2', '\uffc7'), ('\uffca', '\uffcf'), + ('\uffd2', '\uffd7'), ('\uffda', '\uffdc'), + ('\U00010000', '\U0001000b'), ('\U0001000d', '\U00010026'), + ('\U00010028', '\U0001003a'), ('\U0001003c', '\U0001003d'), + ('\U0001003f', '\U0001004d'), ('\U00010050', '\U0001005d'), + ('\U00010080', '\U000100fa'), ('\U00010140', '\U00010174'), + ('\U00010280', '\U0001029c'), ('\U000102a0', '\U000102d0'), + ('\U00010300', '\U0001031e'), ('\U00010330', '\U00010340'), + ('\U00010341', '\U00010341'), ('\U00010342', '\U00010349'), + ('\U0001034a', '\U0001034a'), ('\U00010380', '\U0001039d'), + ('\U000103a0', '\U000103c3'), ('\U000103c8', '\U000103cf'), + ('\U000103d1', '\U000103d5'), ('\U00010400', '\U0001044f'), + ('\U00010450', '\U0001049d'), ('\U00010800', '\U00010805'), + ('\U00010808', '\U00010808'), ('\U0001080a', '\U00010835'), + ('\U00010837', '\U00010838'), ('\U0001083c', '\U0001083c'), + ('\U0001083f', '\U00010855'), ('\U00010900', '\U00010915'), + ('\U00010920', '\U00010939'), ('\U00010980', '\U000109b7'), + ('\U000109be', '\U000109bf'), ('\U00010a00', '\U00010a00'), + ('\U00010a01', '\U00010a03'), ('\U00010a05', '\U00010a06'), + ('\U00010a0c', '\U00010a0f'), ('\U00010a10', '\U00010a13'), + ('\U00010a15', '\U00010a17'), ('\U00010a19', '\U00010a33'), + ('\U00010a60', '\U00010a7c'), ('\U00010b00', '\U00010b35'), + ('\U00010b40', '\U00010b55'), ('\U00010b60', '\U00010b72'), + ('\U00010c00', '\U00010c48'), ('\U00011000', '\U00011000'), + ('\U00011001', '\U00011001'), ('\U00011002', '\U00011002'), + ('\U00011003', '\U00011037'), ('\U00011038', '\U00011045'), + ('\U00011082', '\U00011082'), ('\U00011083', '\U000110af'), + ('\U000110b0', '\U000110b2'), ('\U000110b3', '\U000110b6'), + ('\U000110b7', '\U000110b8'), ('\U000110d0', '\U000110e8'), + ('\U00011100', '\U00011102'), ('\U00011103', '\U00011126'), + ('\U00011127', '\U0001112b'), ('\U0001112c', '\U0001112c'), + ('\U0001112d', '\U00011132'), ('\U00011180', '\U00011181'), + ('\U00011182', '\U00011182'), ('\U00011183', '\U000111b2'), + ('\U000111b3', '\U000111b5'), ('\U000111b6', '\U000111be'), + ('\U000111bf', '\U000111bf'), ('\U000111c1', '\U000111c4'), + ('\U00011680', '\U000116aa'), ('\U000116ab', '\U000116ab'), + ('\U000116ac', '\U000116ac'), ('\U000116ad', '\U000116ad'), + ('\U000116ae', '\U000116af'), ('\U000116b0', '\U000116b5'), + ('\U00012000', '\U0001236e'), ('\U00012400', '\U00012462'), + ('\U00013000', '\U0001342e'), ('\U00016800', '\U00016a38'), + ('\U00016f00', '\U00016f44'), ('\U00016f50', '\U00016f50'), + ('\U00016f51', '\U00016f7e'), ('\U00016f93', '\U00016f9f'), + ('\U0001b000', '\U0001b001'), ('\U0001d400', '\U0001d454'), + ('\U0001d456', '\U0001d49c'), ('\U0001d49e', '\U0001d49f'), + ('\U0001d4a2', '\U0001d4a2'), ('\U0001d4a5', '\U0001d4a6'), + ('\U0001d4a9', '\U0001d4ac'), ('\U0001d4ae', '\U0001d4b9'), + ('\U0001d4bb', '\U0001d4bb'), ('\U0001d4bd', '\U0001d4c3'), + ('\U0001d4c5', '\U0001d505'), ('\U0001d507', '\U0001d50a'), + ('\U0001d50d', '\U0001d514'), ('\U0001d516', '\U0001d51c'), + ('\U0001d51e', '\U0001d539'), ('\U0001d53b', '\U0001d53e'), + ('\U0001d540', '\U0001d544'), ('\U0001d546', '\U0001d546'), + ('\U0001d54a', '\U0001d550'), ('\U0001d552', '\U0001d6a5'), + ('\U0001d6a8', '\U0001d6c0'), ('\U0001d6c2', '\U0001d6da'), + ('\U0001d6dc', '\U0001d6fa'), ('\U0001d6fc', '\U0001d714'), + ('\U0001d716', '\U0001d734'), ('\U0001d736', '\U0001d74e'), + ('\U0001d750', '\U0001d76e'), ('\U0001d770', '\U0001d788'), + ('\U0001d78a', '\U0001d7a8'), ('\U0001d7aa', '\U0001d7c2'), + ('\U0001d7c4', '\U0001d7cb'), ('\U0001ee00', '\U0001ee03'), + ('\U0001ee05', '\U0001ee1f'), ('\U0001ee21', '\U0001ee22'), + ('\U0001ee24', '\U0001ee24'), ('\U0001ee27', '\U0001ee27'), + ('\U0001ee29', '\U0001ee32'), ('\U0001ee34', '\U0001ee37'), + ('\U0001ee39', '\U0001ee39'), ('\U0001ee3b', '\U0001ee3b'), + ('\U0001ee42', '\U0001ee42'), ('\U0001ee47', '\U0001ee47'), + ('\U0001ee49', '\U0001ee49'), ('\U0001ee4b', '\U0001ee4b'), + ('\U0001ee4d', '\U0001ee4f'), ('\U0001ee51', '\U0001ee52'), + ('\U0001ee54', '\U0001ee54'), ('\U0001ee57', '\U0001ee57'), + ('\U0001ee59', '\U0001ee59'), ('\U0001ee5b', '\U0001ee5b'), + ('\U0001ee5d', '\U0001ee5d'), ('\U0001ee5f', '\U0001ee5f'), + ('\U0001ee61', '\U0001ee62'), ('\U0001ee64', '\U0001ee64'), + ('\U0001ee67', '\U0001ee6a'), ('\U0001ee6c', '\U0001ee72'), + ('\U0001ee74', '\U0001ee77'), ('\U0001ee79', '\U0001ee7c'), + ('\U0001ee7e', '\U0001ee7e'), ('\U0001ee80', '\U0001ee89'), + ('\U0001ee8b', '\U0001ee9b'), ('\U0001eea1', '\U0001eea3'), + ('\U0001eea5', '\U0001eea9'), ('\U0001eeab', '\U0001eebb'), + ('\U00020000', '\U0002a6d6'), ('\U0002a700', '\U0002b734'), + ('\U0002b740', '\U0002b81d'), ('\U0002f800', '\U0002fa1d') + ]; + + pub fn Alphabetic(c: char) -> bool { + super::bsearch_range_table(c, Alphabetic_table) + } + + static Lowercase_table : &'static [(char,char)] = &[ + ('\x61', '\x7a'), ('\xaa', '\xaa'), + ('\xb5', '\xb5'), ('\xba', '\xba'), + ('\xdf', '\xf6'), ('\xf8', '\xff'), + ('\u0101', '\u0101'), ('\u0103', '\u0103'), + ('\u0105', '\u0105'), ('\u0107', '\u0107'), + ('\u0109', '\u0109'), ('\u010b', '\u010b'), + ('\u010d', '\u010d'), ('\u010f', '\u010f'), + ('\u0111', '\u0111'), ('\u0113', '\u0113'), + ('\u0115', '\u0115'), ('\u0117', '\u0117'), + ('\u0119', '\u0119'), ('\u011b', '\u011b'), + ('\u011d', '\u011d'), ('\u011f', '\u011f'), + ('\u0121', '\u0121'), ('\u0123', '\u0123'), + ('\u0125', '\u0125'), ('\u0127', '\u0127'), + ('\u0129', '\u0129'), ('\u012b', '\u012b'), + ('\u012d', '\u012d'), ('\u012f', '\u012f'), + ('\u0131', '\u0131'), ('\u0133', '\u0133'), + ('\u0135', '\u0135'), ('\u0137', '\u0138'), + ('\u013a', '\u013a'), ('\u013c', '\u013c'), + ('\u013e', '\u013e'), ('\u0140', '\u0140'), + ('\u0142', '\u0142'), ('\u0144', '\u0144'), + ('\u0146', '\u0146'), ('\u0148', '\u0149'), + ('\u014b', '\u014b'), ('\u014d', '\u014d'), + ('\u014f', '\u014f'), ('\u0151', '\u0151'), + ('\u0153', '\u0153'), ('\u0155', '\u0155'), + ('\u0157', '\u0157'), ('\u0159', '\u0159'), + ('\u015b', '\u015b'), ('\u015d', '\u015d'), + ('\u015f', '\u015f'), ('\u0161', '\u0161'), + ('\u0163', '\u0163'), ('\u0165', '\u0165'), + ('\u0167', '\u0167'), ('\u0169', '\u0169'), + ('\u016b', '\u016b'), ('\u016d', '\u016d'), + ('\u016f', '\u016f'), ('\u0171', '\u0171'), + ('\u0173', '\u0173'), ('\u0175', '\u0175'), + ('\u0177', '\u0177'), ('\u017a', '\u017a'), + ('\u017c', '\u017c'), ('\u017e', '\u0180'), + ('\u0183', '\u0183'), ('\u0185', '\u0185'), + ('\u0188', '\u0188'), ('\u018c', '\u018d'), + ('\u0192', '\u0192'), ('\u0195', '\u0195'), + ('\u0199', '\u019b'), ('\u019e', '\u019e'), + ('\u01a1', '\u01a1'), ('\u01a3', '\u01a3'), + ('\u01a5', '\u01a5'), ('\u01a8', '\u01a8'), + ('\u01aa', '\u01ab'), ('\u01ad', '\u01ad'), + ('\u01b0', '\u01b0'), ('\u01b4', '\u01b4'), + ('\u01b6', '\u01b6'), ('\u01b9', '\u01ba'), + ('\u01bd', '\u01bf'), ('\u01c6', '\u01c6'), + ('\u01c9', '\u01c9'), ('\u01cc', '\u01cc'), + ('\u01ce', '\u01ce'), ('\u01d0', '\u01d0'), + ('\u01d2', '\u01d2'), ('\u01d4', '\u01d4'), + ('\u01d6', '\u01d6'), ('\u01d8', '\u01d8'), + ('\u01da', '\u01da'), ('\u01dc', '\u01dd'), + ('\u01df', '\u01df'), ('\u01e1', '\u01e1'), + ('\u01e3', '\u01e3'), ('\u01e5', '\u01e5'), + ('\u01e7', '\u01e7'), ('\u01e9', '\u01e9'), + ('\u01eb', '\u01eb'), ('\u01ed', '\u01ed'), + ('\u01ef', '\u01f0'), ('\u01f3', '\u01f3'), + ('\u01f5', '\u01f5'), ('\u01f9', '\u01f9'), + ('\u01fb', '\u01fb'), ('\u01fd', '\u01fd'), + ('\u01ff', '\u01ff'), ('\u0201', '\u0201'), + ('\u0203', '\u0203'), ('\u0205', '\u0205'), + ('\u0207', '\u0207'), ('\u0209', '\u0209'), + ('\u020b', '\u020b'), ('\u020d', '\u020d'), + ('\u020f', '\u020f'), ('\u0211', '\u0211'), + ('\u0213', '\u0213'), ('\u0215', '\u0215'), + ('\u0217', '\u0217'), ('\u0219', '\u0219'), + ('\u021b', '\u021b'), ('\u021d', '\u021d'), + ('\u021f', '\u021f'), ('\u0221', '\u0221'), + ('\u0223', '\u0223'), ('\u0225', '\u0225'), + ('\u0227', '\u0227'), ('\u0229', '\u0229'), + ('\u022b', '\u022b'), ('\u022d', '\u022d'), + ('\u022f', '\u022f'), ('\u0231', '\u0231'), + ('\u0233', '\u0239'), ('\u023c', '\u023c'), + ('\u023f', '\u0240'), ('\u0242', '\u0242'), + ('\u0247', '\u0247'), ('\u0249', '\u0249'), + ('\u024b', '\u024b'), ('\u024d', '\u024d'), + ('\u024f', '\u0293'), ('\u0295', '\u02af'), + ('\u02b0', '\u02b8'), ('\u02c0', '\u02c1'), + ('\u02e0', '\u02e4'), ('\u0345', '\u0345'), + ('\u0371', '\u0371'), ('\u0373', '\u0373'), + ('\u0377', '\u0377'), ('\u037a', '\u037a'), + ('\u037b', '\u037d'), ('\u0390', '\u0390'), + ('\u03ac', '\u03ce'), ('\u03d0', '\u03d1'), + ('\u03d5', '\u03d7'), ('\u03d9', '\u03d9'), + ('\u03db', '\u03db'), ('\u03dd', '\u03dd'), + ('\u03df', '\u03df'), ('\u03e1', '\u03e1'), + ('\u03e3', '\u03e3'), ('\u03e5', '\u03e5'), + ('\u03e7', '\u03e7'), ('\u03e9', '\u03e9'), + ('\u03eb', '\u03eb'), ('\u03ed', '\u03ed'), + ('\u03ef', '\u03f3'), ('\u03f5', '\u03f5'), + ('\u03f8', '\u03f8'), ('\u03fb', '\u03fc'), + ('\u0430', '\u045f'), ('\u0461', '\u0461'), + ('\u0463', '\u0463'), ('\u0465', '\u0465'), + ('\u0467', '\u0467'), ('\u0469', '\u0469'), + ('\u046b', '\u046b'), ('\u046d', '\u046d'), + ('\u046f', '\u046f'), ('\u0471', '\u0471'), + ('\u0473', '\u0473'), ('\u0475', '\u0475'), + ('\u0477', '\u0477'), ('\u0479', '\u0479'), + ('\u047b', '\u047b'), ('\u047d', '\u047d'), + ('\u047f', '\u047f'), ('\u0481', '\u0481'), + ('\u048b', '\u048b'), ('\u048d', '\u048d'), + ('\u048f', '\u048f'), ('\u0491', '\u0491'), + ('\u0493', '\u0493'), ('\u0495', '\u0495'), + ('\u0497', '\u0497'), ('\u0499', '\u0499'), + ('\u049b', '\u049b'), ('\u049d', '\u049d'), + ('\u049f', '\u049f'), ('\u04a1', '\u04a1'), + ('\u04a3', '\u04a3'), ('\u04a5', '\u04a5'), + ('\u04a7', '\u04a7'), ('\u04a9', '\u04a9'), + ('\u04ab', '\u04ab'), ('\u04ad', '\u04ad'), + ('\u04af', '\u04af'), ('\u04b1', '\u04b1'), + ('\u04b3', '\u04b3'), ('\u04b5', '\u04b5'), + ('\u04b7', '\u04b7'), ('\u04b9', '\u04b9'), + ('\u04bb', '\u04bb'), ('\u04bd', '\u04bd'), + ('\u04bf', '\u04bf'), ('\u04c2', '\u04c2'), + ('\u04c4', '\u04c4'), ('\u04c6', '\u04c6'), + ('\u04c8', '\u04c8'), ('\u04ca', '\u04ca'), + ('\u04cc', '\u04cc'), ('\u04ce', '\u04cf'), + ('\u04d1', '\u04d1'), ('\u04d3', '\u04d3'), + ('\u04d5', '\u04d5'), ('\u04d7', '\u04d7'), + ('\u04d9', '\u04d9'), ('\u04db', '\u04db'), + ('\u04dd', '\u04dd'), ('\u04df', '\u04df'), + ('\u04e1', '\u04e1'), ('\u04e3', '\u04e3'), + ('\u04e5', '\u04e5'), ('\u04e7', '\u04e7'), + ('\u04e9', '\u04e9'), ('\u04eb', '\u04eb'), + ('\u04ed', '\u04ed'), ('\u04ef', '\u04ef'), + ('\u04f1', '\u04f1'), ('\u04f3', '\u04f3'), + ('\u04f5', '\u04f5'), ('\u04f7', '\u04f7'), + ('\u04f9', '\u04f9'), ('\u04fb', '\u04fb'), + ('\u04fd', '\u04fd'), ('\u04ff', '\u04ff'), + ('\u0501', '\u0501'), ('\u0503', '\u0503'), + ('\u0505', '\u0505'), ('\u0507', '\u0507'), + ('\u0509', '\u0509'), ('\u050b', '\u050b'), + ('\u050d', '\u050d'), ('\u050f', '\u050f'), + ('\u0511', '\u0511'), ('\u0513', '\u0513'), + ('\u0515', '\u0515'), ('\u0517', '\u0517'), + ('\u0519', '\u0519'), ('\u051b', '\u051b'), + ('\u051d', '\u051d'), ('\u051f', '\u051f'), + ('\u0521', '\u0521'), ('\u0523', '\u0523'), + ('\u0525', '\u0525'), ('\u0527', '\u0527'), + ('\u0561', '\u0587'), ('\u1d00', '\u1d2b'), + ('\u1d2c', '\u1d6a'), ('\u1d6b', '\u1d77'), + ('\u1d78', '\u1d78'), ('\u1d79', '\u1d9a'), + ('\u1d9b', '\u1dbf'), ('\u1e01', '\u1e01'), + ('\u1e03', '\u1e03'), ('\u1e05', '\u1e05'), + ('\u1e07', '\u1e07'), ('\u1e09', '\u1e09'), + ('\u1e0b', '\u1e0b'), ('\u1e0d', '\u1e0d'), + ('\u1e0f', '\u1e0f'), ('\u1e11', '\u1e11'), + ('\u1e13', '\u1e13'), ('\u1e15', '\u1e15'), + ('\u1e17', '\u1e17'), ('\u1e19', '\u1e19'), + ('\u1e1b', '\u1e1b'), ('\u1e1d', '\u1e1d'), + ('\u1e1f', '\u1e1f'), ('\u1e21', '\u1e21'), + ('\u1e23', '\u1e23'), ('\u1e25', '\u1e25'), + ('\u1e27', '\u1e27'), ('\u1e29', '\u1e29'), + ('\u1e2b', '\u1e2b'), ('\u1e2d', '\u1e2d'), + ('\u1e2f', '\u1e2f'), ('\u1e31', '\u1e31'), + ('\u1e33', '\u1e33'), ('\u1e35', '\u1e35'), + ('\u1e37', '\u1e37'), ('\u1e39', '\u1e39'), + ('\u1e3b', '\u1e3b'), ('\u1e3d', '\u1e3d'), + ('\u1e3f', '\u1e3f'), ('\u1e41', '\u1e41'), + ('\u1e43', '\u1e43'), ('\u1e45', '\u1e45'), + ('\u1e47', '\u1e47'), ('\u1e49', '\u1e49'), + ('\u1e4b', '\u1e4b'), ('\u1e4d', '\u1e4d'), + ('\u1e4f', '\u1e4f'), ('\u1e51', '\u1e51'), + ('\u1e53', '\u1e53'), ('\u1e55', '\u1e55'), + ('\u1e57', '\u1e57'), ('\u1e59', '\u1e59'), + ('\u1e5b', '\u1e5b'), ('\u1e5d', '\u1e5d'), + ('\u1e5f', '\u1e5f'), ('\u1e61', '\u1e61'), + ('\u1e63', '\u1e63'), ('\u1e65', '\u1e65'), + ('\u1e67', '\u1e67'), ('\u1e69', '\u1e69'), + ('\u1e6b', '\u1e6b'), ('\u1e6d', '\u1e6d'), + ('\u1e6f', '\u1e6f'), ('\u1e71', '\u1e71'), + ('\u1e73', '\u1e73'), ('\u1e75', '\u1e75'), + ('\u1e77', '\u1e77'), ('\u1e79', '\u1e79'), + ('\u1e7b', '\u1e7b'), ('\u1e7d', '\u1e7d'), + ('\u1e7f', '\u1e7f'), ('\u1e81', '\u1e81'), + ('\u1e83', '\u1e83'), ('\u1e85', '\u1e85'), + ('\u1e87', '\u1e87'), ('\u1e89', '\u1e89'), + ('\u1e8b', '\u1e8b'), ('\u1e8d', '\u1e8d'), + ('\u1e8f', '\u1e8f'), ('\u1e91', '\u1e91'), + ('\u1e93', '\u1e93'), ('\u1e95', '\u1e9d'), + ('\u1e9f', '\u1e9f'), ('\u1ea1', '\u1ea1'), + ('\u1ea3', '\u1ea3'), ('\u1ea5', '\u1ea5'), + ('\u1ea7', '\u1ea7'), ('\u1ea9', '\u1ea9'), + ('\u1eab', '\u1eab'), ('\u1ead', '\u1ead'), + ('\u1eaf', '\u1eaf'), ('\u1eb1', '\u1eb1'), + ('\u1eb3', '\u1eb3'), ('\u1eb5', '\u1eb5'), + ('\u1eb7', '\u1eb7'), ('\u1eb9', '\u1eb9'), + ('\u1ebb', '\u1ebb'), ('\u1ebd', '\u1ebd'), + ('\u1ebf', '\u1ebf'), ('\u1ec1', '\u1ec1'), + ('\u1ec3', '\u1ec3'), ('\u1ec5', '\u1ec5'), + ('\u1ec7', '\u1ec7'), ('\u1ec9', '\u1ec9'), + ('\u1ecb', '\u1ecb'), ('\u1ecd', '\u1ecd'), + ('\u1ecf', '\u1ecf'), ('\u1ed1', '\u1ed1'), + ('\u1ed3', '\u1ed3'), ('\u1ed5', '\u1ed5'), + ('\u1ed7', '\u1ed7'), ('\u1ed9', '\u1ed9'), + ('\u1edb', '\u1edb'), ('\u1edd', '\u1edd'), + ('\u1edf', '\u1edf'), ('\u1ee1', '\u1ee1'), + ('\u1ee3', '\u1ee3'), ('\u1ee5', '\u1ee5'), + ('\u1ee7', '\u1ee7'), ('\u1ee9', '\u1ee9'), + ('\u1eeb', '\u1eeb'), ('\u1eed', '\u1eed'), + ('\u1eef', '\u1eef'), ('\u1ef1', '\u1ef1'), + ('\u1ef3', '\u1ef3'), ('\u1ef5', '\u1ef5'), + ('\u1ef7', '\u1ef7'), ('\u1ef9', '\u1ef9'), + ('\u1efb', '\u1efb'), ('\u1efd', '\u1efd'), + ('\u1eff', '\u1f07'), ('\u1f10', '\u1f15'), + ('\u1f20', '\u1f27'), ('\u1f30', '\u1f37'), + ('\u1f40', '\u1f45'), ('\u1f50', '\u1f57'), + ('\u1f60', '\u1f67'), ('\u1f70', '\u1f7d'), + ('\u1f80', '\u1f87'), ('\u1f90', '\u1f97'), + ('\u1fa0', '\u1fa7'), ('\u1fb0', '\u1fb4'), + ('\u1fb6', '\u1fb7'), ('\u1fbe', '\u1fbe'), + ('\u1fc2', '\u1fc4'), ('\u1fc6', '\u1fc7'), + ('\u1fd0', '\u1fd3'), ('\u1fd6', '\u1fd7'), + ('\u1fe0', '\u1fe7'), ('\u1ff2', '\u1ff4'), + ('\u1ff6', '\u1ff7'), ('\u2071', '\u2071'), + ('\u207f', '\u207f'), ('\u2090', '\u209c'), + ('\u210a', '\u210a'), ('\u210e', '\u210f'), + ('\u2113', '\u2113'), ('\u212f', '\u212f'), + ('\u2134', '\u2134'), ('\u2139', '\u2139'), + ('\u213c', '\u213d'), ('\u2146', '\u2149'), + ('\u214e', '\u214e'), ('\u2170', '\u217f'), + ('\u2184', '\u2184'), ('\u24d0', '\u24e9'), + ('\u2c30', '\u2c5e'), ('\u2c61', '\u2c61'), + ('\u2c65', '\u2c66'), ('\u2c68', '\u2c68'), + ('\u2c6a', '\u2c6a'), ('\u2c6c', '\u2c6c'), + ('\u2c71', '\u2c71'), ('\u2c73', '\u2c74'), + ('\u2c76', '\u2c7b'), ('\u2c7c', '\u2c7d'), + ('\u2c81', '\u2c81'), ('\u2c83', '\u2c83'), + ('\u2c85', '\u2c85'), ('\u2c87', '\u2c87'), + ('\u2c89', '\u2c89'), ('\u2c8b', '\u2c8b'), + ('\u2c8d', '\u2c8d'), ('\u2c8f', '\u2c8f'), + ('\u2c91', '\u2c91'), ('\u2c93', '\u2c93'), + ('\u2c95', '\u2c95'), ('\u2c97', '\u2c97'), + ('\u2c99', '\u2c99'), ('\u2c9b', '\u2c9b'), + ('\u2c9d', '\u2c9d'), ('\u2c9f', '\u2c9f'), + ('\u2ca1', '\u2ca1'), ('\u2ca3', '\u2ca3'), + ('\u2ca5', '\u2ca5'), ('\u2ca7', '\u2ca7'), + ('\u2ca9', '\u2ca9'), ('\u2cab', '\u2cab'), + ('\u2cad', '\u2cad'), ('\u2caf', '\u2caf'), + ('\u2cb1', '\u2cb1'), ('\u2cb3', '\u2cb3'), + ('\u2cb5', '\u2cb5'), ('\u2cb7', '\u2cb7'), + ('\u2cb9', '\u2cb9'), ('\u2cbb', '\u2cbb'), + ('\u2cbd', '\u2cbd'), ('\u2cbf', '\u2cbf'), + ('\u2cc1', '\u2cc1'), ('\u2cc3', '\u2cc3'), + ('\u2cc5', '\u2cc5'), ('\u2cc7', '\u2cc7'), + ('\u2cc9', '\u2cc9'), ('\u2ccb', '\u2ccb'), + ('\u2ccd', '\u2ccd'), ('\u2ccf', '\u2ccf'), + ('\u2cd1', '\u2cd1'), ('\u2cd3', '\u2cd3'), + ('\u2cd5', '\u2cd5'), ('\u2cd7', '\u2cd7'), + ('\u2cd9', '\u2cd9'), ('\u2cdb', '\u2cdb'), + ('\u2cdd', '\u2cdd'), ('\u2cdf', '\u2cdf'), + ('\u2ce1', '\u2ce1'), ('\u2ce3', '\u2ce4'), + ('\u2cec', '\u2cec'), ('\u2cee', '\u2cee'), + ('\u2cf3', '\u2cf3'), ('\u2d00', '\u2d25'), + ('\u2d27', '\u2d27'), ('\u2d2d', '\u2d2d'), + ('\ua641', '\ua641'), ('\ua643', '\ua643'), + ('\ua645', '\ua645'), ('\ua647', '\ua647'), + ('\ua649', '\ua649'), ('\ua64b', '\ua64b'), + ('\ua64d', '\ua64d'), ('\ua64f', '\ua64f'), + ('\ua651', '\ua651'), ('\ua653', '\ua653'), + ('\ua655', '\ua655'), ('\ua657', '\ua657'), + ('\ua659', '\ua659'), ('\ua65b', '\ua65b'), + ('\ua65d', '\ua65d'), ('\ua65f', '\ua65f'), + ('\ua661', '\ua661'), ('\ua663', '\ua663'), + ('\ua665', '\ua665'), ('\ua667', '\ua667'), + ('\ua669', '\ua669'), ('\ua66b', '\ua66b'), + ('\ua66d', '\ua66d'), ('\ua681', '\ua681'), + ('\ua683', '\ua683'), ('\ua685', '\ua685'), + ('\ua687', '\ua687'), ('\ua689', '\ua689'), + ('\ua68b', '\ua68b'), ('\ua68d', '\ua68d'), + ('\ua68f', '\ua68f'), ('\ua691', '\ua691'), + ('\ua693', '\ua693'), ('\ua695', '\ua695'), + ('\ua697', '\ua697'), ('\ua723', '\ua723'), + ('\ua725', '\ua725'), ('\ua727', '\ua727'), + ('\ua729', '\ua729'), ('\ua72b', '\ua72b'), + ('\ua72d', '\ua72d'), ('\ua72f', '\ua731'), + ('\ua733', '\ua733'), ('\ua735', '\ua735'), + ('\ua737', '\ua737'), ('\ua739', '\ua739'), + ('\ua73b', '\ua73b'), ('\ua73d', '\ua73d'), + ('\ua73f', '\ua73f'), ('\ua741', '\ua741'), + ('\ua743', '\ua743'), ('\ua745', '\ua745'), + ('\ua747', '\ua747'), ('\ua749', '\ua749'), + ('\ua74b', '\ua74b'), ('\ua74d', '\ua74d'), + ('\ua74f', '\ua74f'), ('\ua751', '\ua751'), + ('\ua753', '\ua753'), ('\ua755', '\ua755'), + ('\ua757', '\ua757'), ('\ua759', '\ua759'), + ('\ua75b', '\ua75b'), ('\ua75d', '\ua75d'), + ('\ua75f', '\ua75f'), ('\ua761', '\ua761'), + ('\ua763', '\ua763'), ('\ua765', '\ua765'), + ('\ua767', '\ua767'), ('\ua769', '\ua769'), + ('\ua76b', '\ua76b'), ('\ua76d', '\ua76d'), + ('\ua76f', '\ua76f'), ('\ua770', '\ua770'), + ('\ua771', '\ua778'), ('\ua77a', '\ua77a'), + ('\ua77c', '\ua77c'), ('\ua77f', '\ua77f'), + ('\ua781', '\ua781'), ('\ua783', '\ua783'), + ('\ua785', '\ua785'), ('\ua787', '\ua787'), + ('\ua78c', '\ua78c'), ('\ua78e', '\ua78e'), + ('\ua791', '\ua791'), ('\ua793', '\ua793'), + ('\ua7a1', '\ua7a1'), ('\ua7a3', '\ua7a3'), + ('\ua7a5', '\ua7a5'), ('\ua7a7', '\ua7a7'), + ('\ua7a9', '\ua7a9'), ('\ua7f8', '\ua7f9'), + ('\ua7fa', '\ua7fa'), ('\ufb00', '\ufb06'), + ('\ufb13', '\ufb17'), ('\uff41', '\uff5a'), + ('\U00010428', '\U0001044f'), ('\U0001d41a', '\U0001d433'), + ('\U0001d44e', '\U0001d454'), ('\U0001d456', '\U0001d467'), + ('\U0001d482', '\U0001d49b'), ('\U0001d4b6', '\U0001d4b9'), + ('\U0001d4bb', '\U0001d4bb'), ('\U0001d4bd', '\U0001d4c3'), + ('\U0001d4c5', '\U0001d4cf'), ('\U0001d4ea', '\U0001d503'), + ('\U0001d51e', '\U0001d537'), ('\U0001d552', '\U0001d56b'), + ('\U0001d586', '\U0001d59f'), ('\U0001d5ba', '\U0001d5d3'), + ('\U0001d5ee', '\U0001d607'), ('\U0001d622', '\U0001d63b'), + ('\U0001d656', '\U0001d66f'), ('\U0001d68a', '\U0001d6a5'), + ('\U0001d6c2', '\U0001d6da'), ('\U0001d6dc', '\U0001d6e1'), + ('\U0001d6fc', '\U0001d714'), ('\U0001d716', '\U0001d71b'), + ('\U0001d736', '\U0001d74e'), ('\U0001d750', '\U0001d755'), + ('\U0001d770', '\U0001d788'), ('\U0001d78a', '\U0001d78f'), + ('\U0001d7aa', '\U0001d7c2'), ('\U0001d7c4', '\U0001d7c9'), + ('\U0001d7cb', '\U0001d7cb') + ]; + + pub fn Lowercase(c: char) -> bool { + super::bsearch_range_table(c, Lowercase_table) + } + + static Uppercase_table : &'static [(char,char)] = &[ + ('\x41', '\x5a'), ('\xc0', '\xd6'), + ('\xd8', '\xde'), ('\u0100', '\u0100'), + ('\u0102', '\u0102'), ('\u0104', '\u0104'), + ('\u0106', '\u0106'), ('\u0108', '\u0108'), + ('\u010a', '\u010a'), ('\u010c', '\u010c'), + ('\u010e', '\u010e'), ('\u0110', '\u0110'), + ('\u0112', '\u0112'), ('\u0114', '\u0114'), + ('\u0116', '\u0116'), ('\u0118', '\u0118'), + ('\u011a', '\u011a'), ('\u011c', '\u011c'), + ('\u011e', '\u011e'), ('\u0120', '\u0120'), + ('\u0122', '\u0122'), ('\u0124', '\u0124'), + ('\u0126', '\u0126'), ('\u0128', '\u0128'), + ('\u012a', '\u012a'), ('\u012c', '\u012c'), + ('\u012e', '\u012e'), ('\u0130', '\u0130'), + ('\u0132', '\u0132'), ('\u0134', '\u0134'), + ('\u0136', '\u0136'), ('\u0139', '\u0139'), + ('\u013b', '\u013b'), ('\u013d', '\u013d'), + ('\u013f', '\u013f'), ('\u0141', '\u0141'), + ('\u0143', '\u0143'), ('\u0145', '\u0145'), + ('\u0147', '\u0147'), ('\u014a', '\u014a'), + ('\u014c', '\u014c'), ('\u014e', '\u014e'), + ('\u0150', '\u0150'), ('\u0152', '\u0152'), + ('\u0154', '\u0154'), ('\u0156', '\u0156'), + ('\u0158', '\u0158'), ('\u015a', '\u015a'), + ('\u015c', '\u015c'), ('\u015e', '\u015e'), + ('\u0160', '\u0160'), ('\u0162', '\u0162'), + ('\u0164', '\u0164'), ('\u0166', '\u0166'), + ('\u0168', '\u0168'), ('\u016a', '\u016a'), + ('\u016c', '\u016c'), ('\u016e', '\u016e'), + ('\u0170', '\u0170'), ('\u0172', '\u0172'), + ('\u0174', '\u0174'), ('\u0176', '\u0176'), + ('\u0178', '\u0179'), ('\u017b', '\u017b'), + ('\u017d', '\u017d'), ('\u0181', '\u0182'), + ('\u0184', '\u0184'), ('\u0186', '\u0187'), + ('\u0189', '\u018b'), ('\u018e', '\u0191'), + ('\u0193', '\u0194'), ('\u0196', '\u0198'), + ('\u019c', '\u019d'), ('\u019f', '\u01a0'), + ('\u01a2', '\u01a2'), ('\u01a4', '\u01a4'), + ('\u01a6', '\u01a7'), ('\u01a9', '\u01a9'), + ('\u01ac', '\u01ac'), ('\u01ae', '\u01af'), + ('\u01b1', '\u01b3'), ('\u01b5', '\u01b5'), + ('\u01b7', '\u01b8'), ('\u01bc', '\u01bc'), + ('\u01c4', '\u01c4'), ('\u01c7', '\u01c7'), + ('\u01ca', '\u01ca'), ('\u01cd', '\u01cd'), + ('\u01cf', '\u01cf'), ('\u01d1', '\u01d1'), + ('\u01d3', '\u01d3'), ('\u01d5', '\u01d5'), + ('\u01d7', '\u01d7'), ('\u01d9', '\u01d9'), + ('\u01db', '\u01db'), ('\u01de', '\u01de'), + ('\u01e0', '\u01e0'), ('\u01e2', '\u01e2'), + ('\u01e4', '\u01e4'), ('\u01e6', '\u01e6'), + ('\u01e8', '\u01e8'), ('\u01ea', '\u01ea'), + ('\u01ec', '\u01ec'), ('\u01ee', '\u01ee'), + ('\u01f1', '\u01f1'), ('\u01f4', '\u01f4'), + ('\u01f6', '\u01f8'), ('\u01fa', '\u01fa'), + ('\u01fc', '\u01fc'), ('\u01fe', '\u01fe'), + ('\u0200', '\u0200'), ('\u0202', '\u0202'), + ('\u0204', '\u0204'), ('\u0206', '\u0206'), + ('\u0208', '\u0208'), ('\u020a', '\u020a'), + ('\u020c', '\u020c'), ('\u020e', '\u020e'), + ('\u0210', '\u0210'), ('\u0212', '\u0212'), + ('\u0214', '\u0214'), ('\u0216', '\u0216'), + ('\u0218', '\u0218'), ('\u021a', '\u021a'), + ('\u021c', '\u021c'), ('\u021e', '\u021e'), + ('\u0220', '\u0220'), ('\u0222', '\u0222'), + ('\u0224', '\u0224'), ('\u0226', '\u0226'), + ('\u0228', '\u0228'), ('\u022a', '\u022a'), + ('\u022c', '\u022c'), ('\u022e', '\u022e'), + ('\u0230', '\u0230'), ('\u0232', '\u0232'), + ('\u023a', '\u023b'), ('\u023d', '\u023e'), + ('\u0241', '\u0241'), ('\u0243', '\u0246'), + ('\u0248', '\u0248'), ('\u024a', '\u024a'), + ('\u024c', '\u024c'), ('\u024e', '\u024e'), + ('\u0370', '\u0370'), ('\u0372', '\u0372'), + ('\u0376', '\u0376'), ('\u0386', '\u0386'), + ('\u0388', '\u038a'), ('\u038c', '\u038c'), + ('\u038e', '\u038f'), ('\u0391', '\u03a1'), + ('\u03a3', '\u03ab'), ('\u03cf', '\u03cf'), + ('\u03d2', '\u03d4'), ('\u03d8', '\u03d8'), + ('\u03da', '\u03da'), ('\u03dc', '\u03dc'), + ('\u03de', '\u03de'), ('\u03e0', '\u03e0'), + ('\u03e2', '\u03e2'), ('\u03e4', '\u03e4'), + ('\u03e6', '\u03e6'), ('\u03e8', '\u03e8'), + ('\u03ea', '\u03ea'), ('\u03ec', '\u03ec'), + ('\u03ee', '\u03ee'), ('\u03f4', '\u03f4'), + ('\u03f7', '\u03f7'), ('\u03f9', '\u03fa'), + ('\u03fd', '\u042f'), ('\u0460', '\u0460'), + ('\u0462', '\u0462'), ('\u0464', '\u0464'), + ('\u0466', '\u0466'), ('\u0468', '\u0468'), + ('\u046a', '\u046a'), ('\u046c', '\u046c'), + ('\u046e', '\u046e'), ('\u0470', '\u0470'), + ('\u0472', '\u0472'), ('\u0474', '\u0474'), + ('\u0476', '\u0476'), ('\u0478', '\u0478'), + ('\u047a', '\u047a'), ('\u047c', '\u047c'), + ('\u047e', '\u047e'), ('\u0480', '\u0480'), + ('\u048a', '\u048a'), ('\u048c', '\u048c'), + ('\u048e', '\u048e'), ('\u0490', '\u0490'), + ('\u0492', '\u0492'), ('\u0494', '\u0494'), + ('\u0496', '\u0496'), ('\u0498', '\u0498'), + ('\u049a', '\u049a'), ('\u049c', '\u049c'), + ('\u049e', '\u049e'), ('\u04a0', '\u04a0'), + ('\u04a2', '\u04a2'), ('\u04a4', '\u04a4'), + ('\u04a6', '\u04a6'), ('\u04a8', '\u04a8'), + ('\u04aa', '\u04aa'), ('\u04ac', '\u04ac'), + ('\u04ae', '\u04ae'), ('\u04b0', '\u04b0'), + ('\u04b2', '\u04b2'), ('\u04b4', '\u04b4'), + ('\u04b6', '\u04b6'), ('\u04b8', '\u04b8'), + ('\u04ba', '\u04ba'), ('\u04bc', '\u04bc'), + ('\u04be', '\u04be'), ('\u04c0', '\u04c1'), + ('\u04c3', '\u04c3'), ('\u04c5', '\u04c5'), + ('\u04c7', '\u04c7'), ('\u04c9', '\u04c9'), + ('\u04cb', '\u04cb'), ('\u04cd', '\u04cd'), + ('\u04d0', '\u04d0'), ('\u04d2', '\u04d2'), + ('\u04d4', '\u04d4'), ('\u04d6', '\u04d6'), + ('\u04d8', '\u04d8'), ('\u04da', '\u04da'), + ('\u04dc', '\u04dc'), ('\u04de', '\u04de'), + ('\u04e0', '\u04e0'), ('\u04e2', '\u04e2'), + ('\u04e4', '\u04e4'), ('\u04e6', '\u04e6'), + ('\u04e8', '\u04e8'), ('\u04ea', '\u04ea'), + ('\u04ec', '\u04ec'), ('\u04ee', '\u04ee'), + ('\u04f0', '\u04f0'), ('\u04f2', '\u04f2'), + ('\u04f4', '\u04f4'), ('\u04f6', '\u04f6'), + ('\u04f8', '\u04f8'), ('\u04fa', '\u04fa'), + ('\u04fc', '\u04fc'), ('\u04fe', '\u04fe'), + ('\u0500', '\u0500'), ('\u0502', '\u0502'), + ('\u0504', '\u0504'), ('\u0506', '\u0506'), + ('\u0508', '\u0508'), ('\u050a', '\u050a'), + ('\u050c', '\u050c'), ('\u050e', '\u050e'), + ('\u0510', '\u0510'), ('\u0512', '\u0512'), + ('\u0514', '\u0514'), ('\u0516', '\u0516'), + ('\u0518', '\u0518'), ('\u051a', '\u051a'), + ('\u051c', '\u051c'), ('\u051e', '\u051e'), + ('\u0520', '\u0520'), ('\u0522', '\u0522'), + ('\u0524', '\u0524'), ('\u0526', '\u0526'), + ('\u0531', '\u0556'), ('\u10a0', '\u10c5'), + ('\u10c7', '\u10c7'), ('\u10cd', '\u10cd'), + ('\u1e00', '\u1e00'), ('\u1e02', '\u1e02'), + ('\u1e04', '\u1e04'), ('\u1e06', '\u1e06'), + ('\u1e08', '\u1e08'), ('\u1e0a', '\u1e0a'), + ('\u1e0c', '\u1e0c'), ('\u1e0e', '\u1e0e'), + ('\u1e10', '\u1e10'), ('\u1e12', '\u1e12'), + ('\u1e14', '\u1e14'), ('\u1e16', '\u1e16'), + ('\u1e18', '\u1e18'), ('\u1e1a', '\u1e1a'), + ('\u1e1c', '\u1e1c'), ('\u1e1e', '\u1e1e'), + ('\u1e20', '\u1e20'), ('\u1e22', '\u1e22'), + ('\u1e24', '\u1e24'), ('\u1e26', '\u1e26'), + ('\u1e28', '\u1e28'), ('\u1e2a', '\u1e2a'), + ('\u1e2c', '\u1e2c'), ('\u1e2e', '\u1e2e'), + ('\u1e30', '\u1e30'), ('\u1e32', '\u1e32'), + ('\u1e34', '\u1e34'), ('\u1e36', '\u1e36'), + ('\u1e38', '\u1e38'), ('\u1e3a', '\u1e3a'), + ('\u1e3c', '\u1e3c'), ('\u1e3e', '\u1e3e'), + ('\u1e40', '\u1e40'), ('\u1e42', '\u1e42'), + ('\u1e44', '\u1e44'), ('\u1e46', '\u1e46'), + ('\u1e48', '\u1e48'), ('\u1e4a', '\u1e4a'), + ('\u1e4c', '\u1e4c'), ('\u1e4e', '\u1e4e'), + ('\u1e50', '\u1e50'), ('\u1e52', '\u1e52'), + ('\u1e54', '\u1e54'), ('\u1e56', '\u1e56'), + ('\u1e58', '\u1e58'), ('\u1e5a', '\u1e5a'), + ('\u1e5c', '\u1e5c'), ('\u1e5e', '\u1e5e'), + ('\u1e60', '\u1e60'), ('\u1e62', '\u1e62'), + ('\u1e64', '\u1e64'), ('\u1e66', '\u1e66'), + ('\u1e68', '\u1e68'), ('\u1e6a', '\u1e6a'), + ('\u1e6c', '\u1e6c'), ('\u1e6e', '\u1e6e'), + ('\u1e70', '\u1e70'), ('\u1e72', '\u1e72'), + ('\u1e74', '\u1e74'), ('\u1e76', '\u1e76'), + ('\u1e78', '\u1e78'), ('\u1e7a', '\u1e7a'), + ('\u1e7c', '\u1e7c'), ('\u1e7e', '\u1e7e'), + ('\u1e80', '\u1e80'), ('\u1e82', '\u1e82'), + ('\u1e84', '\u1e84'), ('\u1e86', '\u1e86'), + ('\u1e88', '\u1e88'), ('\u1e8a', '\u1e8a'), + ('\u1e8c', '\u1e8c'), ('\u1e8e', '\u1e8e'), + ('\u1e90', '\u1e90'), ('\u1e92', '\u1e92'), + ('\u1e94', '\u1e94'), ('\u1e9e', '\u1e9e'), + ('\u1ea0', '\u1ea0'), ('\u1ea2', '\u1ea2'), + ('\u1ea4', '\u1ea4'), ('\u1ea6', '\u1ea6'), + ('\u1ea8', '\u1ea8'), ('\u1eaa', '\u1eaa'), + ('\u1eac', '\u1eac'), ('\u1eae', '\u1eae'), + ('\u1eb0', '\u1eb0'), ('\u1eb2', '\u1eb2'), + ('\u1eb4', '\u1eb4'), ('\u1eb6', '\u1eb6'), + ('\u1eb8', '\u1eb8'), ('\u1eba', '\u1eba'), + ('\u1ebc', '\u1ebc'), ('\u1ebe', '\u1ebe'), + ('\u1ec0', '\u1ec0'), ('\u1ec2', '\u1ec2'), + ('\u1ec4', '\u1ec4'), ('\u1ec6', '\u1ec6'), + ('\u1ec8', '\u1ec8'), ('\u1eca', '\u1eca'), + ('\u1ecc', '\u1ecc'), ('\u1ece', '\u1ece'), + ('\u1ed0', '\u1ed0'), ('\u1ed2', '\u1ed2'), + ('\u1ed4', '\u1ed4'), ('\u1ed6', '\u1ed6'), + ('\u1ed8', '\u1ed8'), ('\u1eda', '\u1eda'), + ('\u1edc', '\u1edc'), ('\u1ede', '\u1ede'), + ('\u1ee0', '\u1ee0'), ('\u1ee2', '\u1ee2'), + ('\u1ee4', '\u1ee4'), ('\u1ee6', '\u1ee6'), + ('\u1ee8', '\u1ee8'), ('\u1eea', '\u1eea'), + ('\u1eec', '\u1eec'), ('\u1eee', '\u1eee'), + ('\u1ef0', '\u1ef0'), ('\u1ef2', '\u1ef2'), + ('\u1ef4', '\u1ef4'), ('\u1ef6', '\u1ef6'), + ('\u1ef8', '\u1ef8'), ('\u1efa', '\u1efa'), + ('\u1efc', '\u1efc'), ('\u1efe', '\u1efe'), + ('\u1f08', '\u1f0f'), ('\u1f18', '\u1f1d'), + ('\u1f28', '\u1f2f'), ('\u1f38', '\u1f3f'), + ('\u1f48', '\u1f4d'), ('\u1f59', '\u1f59'), + ('\u1f5b', '\u1f5b'), ('\u1f5d', '\u1f5d'), + ('\u1f5f', '\u1f5f'), ('\u1f68', '\u1f6f'), + ('\u1fb8', '\u1fbb'), ('\u1fc8', '\u1fcb'), + ('\u1fd8', '\u1fdb'), ('\u1fe8', '\u1fec'), + ('\u1ff8', '\u1ffb'), ('\u2102', '\u2102'), + ('\u2107', '\u2107'), ('\u210b', '\u210d'), + ('\u2110', '\u2112'), ('\u2115', '\u2115'), + ('\u2119', '\u211d'), ('\u2124', '\u2124'), + ('\u2126', '\u2126'), ('\u2128', '\u2128'), + ('\u212a', '\u212d'), ('\u2130', '\u2133'), + ('\u213e', '\u213f'), ('\u2145', '\u2145'), + ('\u2160', '\u216f'), ('\u2183', '\u2183'), + ('\u24b6', '\u24cf'), ('\u2c00', '\u2c2e'), + ('\u2c60', '\u2c60'), ('\u2c62', '\u2c64'), + ('\u2c67', '\u2c67'), ('\u2c69', '\u2c69'), + ('\u2c6b', '\u2c6b'), ('\u2c6d', '\u2c70'), + ('\u2c72', '\u2c72'), ('\u2c75', '\u2c75'), + ('\u2c7e', '\u2c80'), ('\u2c82', '\u2c82'), + ('\u2c84', '\u2c84'), ('\u2c86', '\u2c86'), + ('\u2c88', '\u2c88'), ('\u2c8a', '\u2c8a'), + ('\u2c8c', '\u2c8c'), ('\u2c8e', '\u2c8e'), + ('\u2c90', '\u2c90'), ('\u2c92', '\u2c92'), + ('\u2c94', '\u2c94'), ('\u2c96', '\u2c96'), + ('\u2c98', '\u2c98'), ('\u2c9a', '\u2c9a'), + ('\u2c9c', '\u2c9c'), ('\u2c9e', '\u2c9e'), + ('\u2ca0', '\u2ca0'), ('\u2ca2', '\u2ca2'), + ('\u2ca4', '\u2ca4'), ('\u2ca6', '\u2ca6'), + ('\u2ca8', '\u2ca8'), ('\u2caa', '\u2caa'), + ('\u2cac', '\u2cac'), ('\u2cae', '\u2cae'), + ('\u2cb0', '\u2cb0'), ('\u2cb2', '\u2cb2'), + ('\u2cb4', '\u2cb4'), ('\u2cb6', '\u2cb6'), + ('\u2cb8', '\u2cb8'), ('\u2cba', '\u2cba'), + ('\u2cbc', '\u2cbc'), ('\u2cbe', '\u2cbe'), + ('\u2cc0', '\u2cc0'), ('\u2cc2', '\u2cc2'), + ('\u2cc4', '\u2cc4'), ('\u2cc6', '\u2cc6'), + ('\u2cc8', '\u2cc8'), ('\u2cca', '\u2cca'), + ('\u2ccc', '\u2ccc'), ('\u2cce', '\u2cce'), + ('\u2cd0', '\u2cd0'), ('\u2cd2', '\u2cd2'), + ('\u2cd4', '\u2cd4'), ('\u2cd6', '\u2cd6'), + ('\u2cd8', '\u2cd8'), ('\u2cda', '\u2cda'), + ('\u2cdc', '\u2cdc'), ('\u2cde', '\u2cde'), + ('\u2ce0', '\u2ce0'), ('\u2ce2', '\u2ce2'), + ('\u2ceb', '\u2ceb'), ('\u2ced', '\u2ced'), + ('\u2cf2', '\u2cf2'), ('\ua640', '\ua640'), + ('\ua642', '\ua642'), ('\ua644', '\ua644'), + ('\ua646', '\ua646'), ('\ua648', '\ua648'), + ('\ua64a', '\ua64a'), ('\ua64c', '\ua64c'), + ('\ua64e', '\ua64e'), ('\ua650', '\ua650'), + ('\ua652', '\ua652'), ('\ua654', '\ua654'), + ('\ua656', '\ua656'), ('\ua658', '\ua658'), + ('\ua65a', '\ua65a'), ('\ua65c', '\ua65c'), + ('\ua65e', '\ua65e'), ('\ua660', '\ua660'), + ('\ua662', '\ua662'), ('\ua664', '\ua664'), + ('\ua666', '\ua666'), ('\ua668', '\ua668'), + ('\ua66a', '\ua66a'), ('\ua66c', '\ua66c'), + ('\ua680', '\ua680'), ('\ua682', '\ua682'), + ('\ua684', '\ua684'), ('\ua686', '\ua686'), + ('\ua688', '\ua688'), ('\ua68a', '\ua68a'), + ('\ua68c', '\ua68c'), ('\ua68e', '\ua68e'), + ('\ua690', '\ua690'), ('\ua692', '\ua692'), + ('\ua694', '\ua694'), ('\ua696', '\ua696'), + ('\ua722', '\ua722'), ('\ua724', '\ua724'), + ('\ua726', '\ua726'), ('\ua728', '\ua728'), + ('\ua72a', '\ua72a'), ('\ua72c', '\ua72c'), + ('\ua72e', '\ua72e'), ('\ua732', '\ua732'), + ('\ua734', '\ua734'), ('\ua736', '\ua736'), + ('\ua738', '\ua738'), ('\ua73a', '\ua73a'), + ('\ua73c', '\ua73c'), ('\ua73e', '\ua73e'), + ('\ua740', '\ua740'), ('\ua742', '\ua742'), + ('\ua744', '\ua744'), ('\ua746', '\ua746'), + ('\ua748', '\ua748'), ('\ua74a', '\ua74a'), + ('\ua74c', '\ua74c'), ('\ua74e', '\ua74e'), + ('\ua750', '\ua750'), ('\ua752', '\ua752'), + ('\ua754', '\ua754'), ('\ua756', '\ua756'), + ('\ua758', '\ua758'), ('\ua75a', '\ua75a'), + ('\ua75c', '\ua75c'), ('\ua75e', '\ua75e'), + ('\ua760', '\ua760'), ('\ua762', '\ua762'), + ('\ua764', '\ua764'), ('\ua766', '\ua766'), + ('\ua768', '\ua768'), ('\ua76a', '\ua76a'), + ('\ua76c', '\ua76c'), ('\ua76e', '\ua76e'), + ('\ua779', '\ua779'), ('\ua77b', '\ua77b'), + ('\ua77d', '\ua77e'), ('\ua780', '\ua780'), + ('\ua782', '\ua782'), ('\ua784', '\ua784'), + ('\ua786', '\ua786'), ('\ua78b', '\ua78b'), + ('\ua78d', '\ua78d'), ('\ua790', '\ua790'), + ('\ua792', '\ua792'), ('\ua7a0', '\ua7a0'), + ('\ua7a2', '\ua7a2'), ('\ua7a4', '\ua7a4'), + ('\ua7a6', '\ua7a6'), ('\ua7a8', '\ua7a8'), + ('\ua7aa', '\ua7aa'), ('\uff21', '\uff3a'), + ('\U00010400', '\U00010427'), ('\U0001d400', '\U0001d419'), + ('\U0001d434', '\U0001d44d'), ('\U0001d468', '\U0001d481'), + ('\U0001d49c', '\U0001d49c'), ('\U0001d49e', '\U0001d49f'), + ('\U0001d4a2', '\U0001d4a2'), ('\U0001d4a5', '\U0001d4a6'), + ('\U0001d4a9', '\U0001d4ac'), ('\U0001d4ae', '\U0001d4b5'), + ('\U0001d4d0', '\U0001d4e9'), ('\U0001d504', '\U0001d505'), + ('\U0001d507', '\U0001d50a'), ('\U0001d50d', '\U0001d514'), + ('\U0001d516', '\U0001d51c'), ('\U0001d538', '\U0001d539'), + ('\U0001d53b', '\U0001d53e'), ('\U0001d540', '\U0001d544'), + ('\U0001d546', '\U0001d546'), ('\U0001d54a', '\U0001d550'), + ('\U0001d56c', '\U0001d585'), ('\U0001d5a0', '\U0001d5b9'), + ('\U0001d5d4', '\U0001d5ed'), ('\U0001d608', '\U0001d621'), + ('\U0001d63c', '\U0001d655'), ('\U0001d670', '\U0001d689'), + ('\U0001d6a8', '\U0001d6c0'), ('\U0001d6e2', '\U0001d6fa'), + ('\U0001d71c', '\U0001d734'), ('\U0001d756', '\U0001d76e'), + ('\U0001d790', '\U0001d7a8'), ('\U0001d7ca', '\U0001d7ca') + ]; + + pub fn Uppercase(c: char) -> bool { + super::bsearch_range_table(c, Uppercase_table) + } + + static XID_Continue_table : &'static [(char,char)] = &[ + ('\x30', '\x39'), ('\x41', '\x5a'), + ('\x5f', '\x5f'), ('\x61', '\x7a'), + ('\xaa', '\xaa'), ('\xb5', '\xb5'), + ('\xb7', '\xb7'), ('\xba', '\xba'), + ('\xc0', '\xd6'), ('\xd8', '\xf6'), + ('\xf8', '\u01ba'), ('\u01bb', '\u01bb'), + ('\u01bc', '\u01bf'), ('\u01c0', '\u01c3'), + ('\u01c4', '\u0293'), ('\u0294', '\u0294'), + ('\u0295', '\u02af'), ('\u02b0', '\u02c1'), + ('\u02c6', '\u02d1'), ('\u02e0', '\u02e4'), + ('\u02ec', '\u02ec'), ('\u02ee', '\u02ee'), + ('\u0300', '\u036f'), ('\u0370', '\u0373'), + ('\u0374', '\u0374'), ('\u0376', '\u0377'), + ('\u037b', '\u037d'), ('\u0386', '\u0386'), + ('\u0387', '\u0387'), ('\u0388', '\u038a'), + ('\u038c', '\u038c'), ('\u038e', '\u03a1'), + ('\u03a3', '\u03f5'), ('\u03f7', '\u0481'), + ('\u0483', '\u0487'), ('\u048a', '\u0527'), + ('\u0531', '\u0556'), ('\u0559', '\u0559'), + ('\u0561', '\u0587'), ('\u0591', '\u05bd'), + ('\u05bf', '\u05bf'), ('\u05c1', '\u05c2'), + ('\u05c4', '\u05c5'), ('\u05c7', '\u05c7'), + ('\u05d0', '\u05ea'), ('\u05f0', '\u05f2'), + ('\u0610', '\u061a'), ('\u0620', '\u063f'), + ('\u0640', '\u0640'), ('\u0641', '\u064a'), + ('\u064b', '\u065f'), ('\u0660', '\u0669'), + ('\u066e', '\u066f'), ('\u0670', '\u0670'), + ('\u0671', '\u06d3'), ('\u06d5', '\u06d5'), + ('\u06d6', '\u06dc'), ('\u06df', '\u06e4'), + ('\u06e5', '\u06e6'), ('\u06e7', '\u06e8'), + ('\u06ea', '\u06ed'), ('\u06ee', '\u06ef'), + ('\u06f0', '\u06f9'), ('\u06fa', '\u06fc'), + ('\u06ff', '\u06ff'), ('\u0710', '\u0710'), + ('\u0711', '\u0711'), ('\u0712', '\u072f'), + ('\u0730', '\u074a'), ('\u074d', '\u07a5'), + ('\u07a6', '\u07b0'), ('\u07b1', '\u07b1'), + ('\u07c0', '\u07c9'), ('\u07ca', '\u07ea'), + ('\u07eb', '\u07f3'), ('\u07f4', '\u07f5'), + ('\u07fa', '\u07fa'), ('\u0800', '\u0815'), + ('\u0816', '\u0819'), ('\u081a', '\u081a'), + ('\u081b', '\u0823'), ('\u0824', '\u0824'), + ('\u0825', '\u0827'), ('\u0828', '\u0828'), + ('\u0829', '\u082d'), ('\u0840', '\u0858'), + ('\u0859', '\u085b'), ('\u08a0', '\u08a0'), + ('\u08a2', '\u08ac'), ('\u08e4', '\u08fe'), + ('\u0900', '\u0902'), ('\u0903', '\u0903'), + ('\u0904', '\u0939'), ('\u093a', '\u093a'), + ('\u093b', '\u093b'), ('\u093c', '\u093c'), + ('\u093d', '\u093d'), ('\u093e', '\u0940'), + ('\u0941', '\u0948'), ('\u0949', '\u094c'), + ('\u094d', '\u094d'), ('\u094e', '\u094f'), + ('\u0950', '\u0950'), ('\u0951', '\u0957'), + ('\u0958', '\u0961'), ('\u0962', '\u0963'), + ('\u0966', '\u096f'), ('\u0971', '\u0971'), + ('\u0972', '\u0977'), ('\u0979', '\u097f'), + ('\u0981', '\u0981'), ('\u0982', '\u0983'), + ('\u0985', '\u098c'), ('\u098f', '\u0990'), + ('\u0993', '\u09a8'), ('\u09aa', '\u09b0'), + ('\u09b2', '\u09b2'), ('\u09b6', '\u09b9'), + ('\u09bc', '\u09bc'), ('\u09bd', '\u09bd'), + ('\u09be', '\u09c0'), ('\u09c1', '\u09c4'), + ('\u09c7', '\u09c8'), ('\u09cb', '\u09cc'), + ('\u09cd', '\u09cd'), ('\u09ce', '\u09ce'), + ('\u09d7', '\u09d7'), ('\u09dc', '\u09dd'), + ('\u09df', '\u09e1'), ('\u09e2', '\u09e3'), + ('\u09e6', '\u09ef'), ('\u09f0', '\u09f1'), + ('\u0a01', '\u0a02'), ('\u0a03', '\u0a03'), + ('\u0a05', '\u0a0a'), ('\u0a0f', '\u0a10'), + ('\u0a13', '\u0a28'), ('\u0a2a', '\u0a30'), + ('\u0a32', '\u0a33'), ('\u0a35', '\u0a36'), + ('\u0a38', '\u0a39'), ('\u0a3c', '\u0a3c'), + ('\u0a3e', '\u0a40'), ('\u0a41', '\u0a42'), + ('\u0a47', '\u0a48'), ('\u0a4b', '\u0a4d'), + ('\u0a51', '\u0a51'), ('\u0a59', '\u0a5c'), + ('\u0a5e', '\u0a5e'), ('\u0a66', '\u0a6f'), + ('\u0a70', '\u0a71'), ('\u0a72', '\u0a74'), + ('\u0a75', '\u0a75'), ('\u0a81', '\u0a82'), + ('\u0a83', '\u0a83'), ('\u0a85', '\u0a8d'), + ('\u0a8f', '\u0a91'), ('\u0a93', '\u0aa8'), + ('\u0aaa', '\u0ab0'), ('\u0ab2', '\u0ab3'), + ('\u0ab5', '\u0ab9'), ('\u0abc', '\u0abc'), + ('\u0abd', '\u0abd'), ('\u0abe', '\u0ac0'), + ('\u0ac1', '\u0ac5'), ('\u0ac7', '\u0ac8'), + ('\u0ac9', '\u0ac9'), ('\u0acb', '\u0acc'), + ('\u0acd', '\u0acd'), ('\u0ad0', '\u0ad0'), + ('\u0ae0', '\u0ae1'), ('\u0ae2', '\u0ae3'), + ('\u0ae6', '\u0aef'), ('\u0b01', '\u0b01'), + ('\u0b02', '\u0b03'), ('\u0b05', '\u0b0c'), + ('\u0b0f', '\u0b10'), ('\u0b13', '\u0b28'), + ('\u0b2a', '\u0b30'), ('\u0b32', '\u0b33'), + ('\u0b35', '\u0b39'), ('\u0b3c', '\u0b3c'), + ('\u0b3d', '\u0b3d'), ('\u0b3e', '\u0b3e'), + ('\u0b3f', '\u0b3f'), ('\u0b40', '\u0b40'), + ('\u0b41', '\u0b44'), ('\u0b47', '\u0b48'), + ('\u0b4b', '\u0b4c'), ('\u0b4d', '\u0b4d'), + ('\u0b56', '\u0b56'), ('\u0b57', '\u0b57'), + ('\u0b5c', '\u0b5d'), ('\u0b5f', '\u0b61'), + ('\u0b62', '\u0b63'), ('\u0b66', '\u0b6f'), + ('\u0b71', '\u0b71'), ('\u0b82', '\u0b82'), + ('\u0b83', '\u0b83'), ('\u0b85', '\u0b8a'), + ('\u0b8e', '\u0b90'), ('\u0b92', '\u0b95'), + ('\u0b99', '\u0b9a'), ('\u0b9c', '\u0b9c'), + ('\u0b9e', '\u0b9f'), ('\u0ba3', '\u0ba4'), + ('\u0ba8', '\u0baa'), ('\u0bae', '\u0bb9'), + ('\u0bbe', '\u0bbf'), ('\u0bc0', '\u0bc0'), + ('\u0bc1', '\u0bc2'), ('\u0bc6', '\u0bc8'), + ('\u0bca', '\u0bcc'), ('\u0bcd', '\u0bcd'), + ('\u0bd0', '\u0bd0'), ('\u0bd7', '\u0bd7'), + ('\u0be6', '\u0bef'), ('\u0c01', '\u0c03'), + ('\u0c05', '\u0c0c'), ('\u0c0e', '\u0c10'), + ('\u0c12', '\u0c28'), ('\u0c2a', '\u0c33'), + ('\u0c35', '\u0c39'), ('\u0c3d', '\u0c3d'), + ('\u0c3e', '\u0c40'), ('\u0c41', '\u0c44'), + ('\u0c46', '\u0c48'), ('\u0c4a', '\u0c4d'), + ('\u0c55', '\u0c56'), ('\u0c58', '\u0c59'), + ('\u0c60', '\u0c61'), ('\u0c62', '\u0c63'), + ('\u0c66', '\u0c6f'), ('\u0c82', '\u0c83'), + ('\u0c85', '\u0c8c'), ('\u0c8e', '\u0c90'), + ('\u0c92', '\u0ca8'), ('\u0caa', '\u0cb3'), + ('\u0cb5', '\u0cb9'), ('\u0cbc', '\u0cbc'), + ('\u0cbd', '\u0cbd'), ('\u0cbe', '\u0cbe'), + ('\u0cbf', '\u0cbf'), ('\u0cc0', '\u0cc4'), + ('\u0cc6', '\u0cc6'), ('\u0cc7', '\u0cc8'), + ('\u0cca', '\u0ccb'), ('\u0ccc', '\u0ccd'), + ('\u0cd5', '\u0cd6'), ('\u0cde', '\u0cde'), + ('\u0ce0', '\u0ce1'), ('\u0ce2', '\u0ce3'), + ('\u0ce6', '\u0cef'), ('\u0cf1', '\u0cf2'), + ('\u0d02', '\u0d03'), ('\u0d05', '\u0d0c'), + ('\u0d0e', '\u0d10'), ('\u0d12', '\u0d3a'), + ('\u0d3d', '\u0d3d'), ('\u0d3e', '\u0d40'), + ('\u0d41', '\u0d44'), ('\u0d46', '\u0d48'), + ('\u0d4a', '\u0d4c'), ('\u0d4d', '\u0d4d'), + ('\u0d4e', '\u0d4e'), ('\u0d57', '\u0d57'), + ('\u0d60', '\u0d61'), ('\u0d62', '\u0d63'), + ('\u0d66', '\u0d6f'), ('\u0d7a', '\u0d7f'), + ('\u0d82', '\u0d83'), ('\u0d85', '\u0d96'), + ('\u0d9a', '\u0db1'), ('\u0db3', '\u0dbb'), + ('\u0dbd', '\u0dbd'), ('\u0dc0', '\u0dc6'), + ('\u0dca', '\u0dca'), ('\u0dcf', '\u0dd1'), + ('\u0dd2', '\u0dd4'), ('\u0dd6', '\u0dd6'), + ('\u0dd8', '\u0ddf'), ('\u0df2', '\u0df3'), + ('\u0e01', '\u0e30'), ('\u0e31', '\u0e31'), + ('\u0e32', '\u0e33'), ('\u0e34', '\u0e3a'), + ('\u0e40', '\u0e45'), ('\u0e46', '\u0e46'), + ('\u0e47', '\u0e4e'), ('\u0e50', '\u0e59'), + ('\u0e81', '\u0e82'), ('\u0e84', '\u0e84'), + ('\u0e87', '\u0e88'), ('\u0e8a', '\u0e8a'), + ('\u0e8d', '\u0e8d'), ('\u0e94', '\u0e97'), + ('\u0e99', '\u0e9f'), ('\u0ea1', '\u0ea3'), + ('\u0ea5', '\u0ea5'), ('\u0ea7', '\u0ea7'), + ('\u0eaa', '\u0eab'), ('\u0ead', '\u0eb0'), + ('\u0eb1', '\u0eb1'), ('\u0eb2', '\u0eb3'), + ('\u0eb4', '\u0eb9'), ('\u0ebb', '\u0ebc'), + ('\u0ebd', '\u0ebd'), ('\u0ec0', '\u0ec4'), + ('\u0ec6', '\u0ec6'), ('\u0ec8', '\u0ecd'), + ('\u0ed0', '\u0ed9'), ('\u0edc', '\u0edf'), + ('\u0f00', '\u0f00'), ('\u0f18', '\u0f19'), + ('\u0f20', '\u0f29'), ('\u0f35', '\u0f35'), + ('\u0f37', '\u0f37'), ('\u0f39', '\u0f39'), + ('\u0f3e', '\u0f3f'), ('\u0f40', '\u0f47'), + ('\u0f49', '\u0f6c'), ('\u0f71', '\u0f7e'), + ('\u0f7f', '\u0f7f'), ('\u0f80', '\u0f84'), + ('\u0f86', '\u0f87'), ('\u0f88', '\u0f8c'), + ('\u0f8d', '\u0f97'), ('\u0f99', '\u0fbc'), + ('\u0fc6', '\u0fc6'), ('\u1000', '\u102a'), + ('\u102b', '\u102c'), ('\u102d', '\u1030'), + ('\u1031', '\u1031'), ('\u1032', '\u1037'), + ('\u1038', '\u1038'), ('\u1039', '\u103a'), + ('\u103b', '\u103c'), ('\u103d', '\u103e'), + ('\u103f', '\u103f'), ('\u1040', '\u1049'), + ('\u1050', '\u1055'), ('\u1056', '\u1057'), + ('\u1058', '\u1059'), ('\u105a', '\u105d'), + ('\u105e', '\u1060'), ('\u1061', '\u1061'), + ('\u1062', '\u1064'), ('\u1065', '\u1066'), + ('\u1067', '\u106d'), ('\u106e', '\u1070'), + ('\u1071', '\u1074'), ('\u1075', '\u1081'), + ('\u1082', '\u1082'), ('\u1083', '\u1084'), + ('\u1085', '\u1086'), ('\u1087', '\u108c'), + ('\u108d', '\u108d'), ('\u108e', '\u108e'), + ('\u108f', '\u108f'), ('\u1090', '\u1099'), + ('\u109a', '\u109c'), ('\u109d', '\u109d'), + ('\u10a0', '\u10c5'), ('\u10c7', '\u10c7'), + ('\u10cd', '\u10cd'), ('\u10d0', '\u10fa'), + ('\u10fc', '\u10fc'), ('\u10fd', '\u1248'), + ('\u124a', '\u124d'), ('\u1250', '\u1256'), + ('\u1258', '\u1258'), ('\u125a', '\u125d'), + ('\u1260', '\u1288'), ('\u128a', '\u128d'), + ('\u1290', '\u12b0'), ('\u12b2', '\u12b5'), + ('\u12b8', '\u12be'), ('\u12c0', '\u12c0'), + ('\u12c2', '\u12c5'), ('\u12c8', '\u12d6'), + ('\u12d8', '\u1310'), ('\u1312', '\u1315'), + ('\u1318', '\u135a'), ('\u135d', '\u135f'), + ('\u1369', '\u1371'), ('\u1380', '\u138f'), + ('\u13a0', '\u13f4'), ('\u1401', '\u166c'), + ('\u166f', '\u167f'), ('\u1681', '\u169a'), + ('\u16a0', '\u16ea'), ('\u16ee', '\u16f0'), + ('\u1700', '\u170c'), ('\u170e', '\u1711'), + ('\u1712', '\u1714'), ('\u1720', '\u1731'), + ('\u1732', '\u1734'), ('\u1740', '\u1751'), + ('\u1752', '\u1753'), ('\u1760', '\u176c'), + ('\u176e', '\u1770'), ('\u1772', '\u1773'), + ('\u1780', '\u17b3'), ('\u17b4', '\u17b5'), + ('\u17b6', '\u17b6'), ('\u17b7', '\u17bd'), + ('\u17be', '\u17c5'), ('\u17c6', '\u17c6'), + ('\u17c7', '\u17c8'), ('\u17c9', '\u17d3'), + ('\u17d7', '\u17d7'), ('\u17dc', '\u17dc'), + ('\u17dd', '\u17dd'), ('\u17e0', '\u17e9'), + ('\u180b', '\u180d'), ('\u1810', '\u1819'), + ('\u1820', '\u1842'), ('\u1843', '\u1843'), + ('\u1844', '\u1877'), ('\u1880', '\u18a8'), + ('\u18a9', '\u18a9'), ('\u18aa', '\u18aa'), + ('\u18b0', '\u18f5'), ('\u1900', '\u191c'), + ('\u1920', '\u1922'), ('\u1923', '\u1926'), + ('\u1927', '\u1928'), ('\u1929', '\u192b'), + ('\u1930', '\u1931'), ('\u1932', '\u1932'), + ('\u1933', '\u1938'), ('\u1939', '\u193b'), + ('\u1946', '\u194f'), ('\u1950', '\u196d'), + ('\u1970', '\u1974'), ('\u1980', '\u19ab'), + ('\u19b0', '\u19c0'), ('\u19c1', '\u19c7'), + ('\u19c8', '\u19c9'), ('\u19d0', '\u19d9'), + ('\u19da', '\u19da'), ('\u1a00', '\u1a16'), + ('\u1a17', '\u1a18'), ('\u1a19', '\u1a1a'), + ('\u1a1b', '\u1a1b'), ('\u1a20', '\u1a54'), + ('\u1a55', '\u1a55'), ('\u1a56', '\u1a56'), + ('\u1a57', '\u1a57'), ('\u1a58', '\u1a5e'), + ('\u1a60', '\u1a60'), ('\u1a61', '\u1a61'), + ('\u1a62', '\u1a62'), ('\u1a63', '\u1a64'), + ('\u1a65', '\u1a6c'), ('\u1a6d', '\u1a72'), + ('\u1a73', '\u1a7c'), ('\u1a7f', '\u1a7f'), + ('\u1a80', '\u1a89'), ('\u1a90', '\u1a99'), + ('\u1aa7', '\u1aa7'), ('\u1b00', '\u1b03'), + ('\u1b04', '\u1b04'), ('\u1b05', '\u1b33'), + ('\u1b34', '\u1b34'), ('\u1b35', '\u1b35'), + ('\u1b36', '\u1b3a'), ('\u1b3b', '\u1b3b'), + ('\u1b3c', '\u1b3c'), ('\u1b3d', '\u1b41'), + ('\u1b42', '\u1b42'), ('\u1b43', '\u1b44'), + ('\u1b45', '\u1b4b'), ('\u1b50', '\u1b59'), + ('\u1b6b', '\u1b73'), ('\u1b80', '\u1b81'), + ('\u1b82', '\u1b82'), ('\u1b83', '\u1ba0'), + ('\u1ba1', '\u1ba1'), ('\u1ba2', '\u1ba5'), + ('\u1ba6', '\u1ba7'), ('\u1ba8', '\u1ba9'), + ('\u1baa', '\u1baa'), ('\u1bab', '\u1bab'), + ('\u1bac', '\u1bad'), ('\u1bae', '\u1baf'), + ('\u1bb0', '\u1bb9'), ('\u1bba', '\u1be5'), + ('\u1be6', '\u1be6'), ('\u1be7', '\u1be7'), + ('\u1be8', '\u1be9'), ('\u1bea', '\u1bec'), + ('\u1bed', '\u1bed'), ('\u1bee', '\u1bee'), + ('\u1bef', '\u1bf1'), ('\u1bf2', '\u1bf3'), + ('\u1c00', '\u1c23'), ('\u1c24', '\u1c2b'), + ('\u1c2c', '\u1c33'), ('\u1c34', '\u1c35'), + ('\u1c36', '\u1c37'), ('\u1c40', '\u1c49'), + ('\u1c4d', '\u1c4f'), ('\u1c50', '\u1c59'), + ('\u1c5a', '\u1c77'), ('\u1c78', '\u1c7d'), + ('\u1cd0', '\u1cd2'), ('\u1cd4', '\u1ce0'), + ('\u1ce1', '\u1ce1'), ('\u1ce2', '\u1ce8'), + ('\u1ce9', '\u1cec'), ('\u1ced', '\u1ced'), + ('\u1cee', '\u1cf1'), ('\u1cf2', '\u1cf3'), + ('\u1cf4', '\u1cf4'), ('\u1cf5', '\u1cf6'), + ('\u1d00', '\u1d2b'), ('\u1d2c', '\u1d6a'), + ('\u1d6b', '\u1d77'), ('\u1d78', '\u1d78'), + ('\u1d79', '\u1d9a'), ('\u1d9b', '\u1dbf'), + ('\u1dc0', '\u1de6'), ('\u1dfc', '\u1dff'), + ('\u1e00', '\u1f15'), ('\u1f18', '\u1f1d'), + ('\u1f20', '\u1f45'), ('\u1f48', '\u1f4d'), + ('\u1f50', '\u1f57'), ('\u1f59', '\u1f59'), + ('\u1f5b', '\u1f5b'), ('\u1f5d', '\u1f5d'), + ('\u1f5f', '\u1f7d'), ('\u1f80', '\u1fb4'), + ('\u1fb6', '\u1fbc'), ('\u1fbe', '\u1fbe'), + ('\u1fc2', '\u1fc4'), ('\u1fc6', '\u1fcc'), + ('\u1fd0', '\u1fd3'), ('\u1fd6', '\u1fdb'), + ('\u1fe0', '\u1fec'), ('\u1ff2', '\u1ff4'), + ('\u1ff6', '\u1ffc'), ('\u203f', '\u2040'), + ('\u2054', '\u2054'), ('\u2071', '\u2071'), + ('\u207f', '\u207f'), ('\u2090', '\u209c'), + ('\u20d0', '\u20dc'), ('\u20e1', '\u20e1'), + ('\u20e5', '\u20f0'), ('\u2102', '\u2102'), + ('\u2107', '\u2107'), ('\u210a', '\u2113'), + ('\u2115', '\u2115'), ('\u2118', '\u2118'), + ('\u2119', '\u211d'), ('\u2124', '\u2124'), + ('\u2126', '\u2126'), ('\u2128', '\u2128'), + ('\u212a', '\u212d'), ('\u212e', '\u212e'), + ('\u212f', '\u2134'), ('\u2135', '\u2138'), + ('\u2139', '\u2139'), ('\u213c', '\u213f'), + ('\u2145', '\u2149'), ('\u214e', '\u214e'), + ('\u2160', '\u2182'), ('\u2183', '\u2184'), + ('\u2185', '\u2188'), ('\u2c00', '\u2c2e'), + ('\u2c30', '\u2c5e'), ('\u2c60', '\u2c7b'), + ('\u2c7c', '\u2c7d'), ('\u2c7e', '\u2ce4'), + ('\u2ceb', '\u2cee'), ('\u2cef', '\u2cf1'), + ('\u2cf2', '\u2cf3'), ('\u2d00', '\u2d25'), + ('\u2d27', '\u2d27'), ('\u2d2d', '\u2d2d'), + ('\u2d30', '\u2d67'), ('\u2d6f', '\u2d6f'), + ('\u2d7f', '\u2d7f'), ('\u2d80', '\u2d96'), + ('\u2da0', '\u2da6'), ('\u2da8', '\u2dae'), + ('\u2db0', '\u2db6'), ('\u2db8', '\u2dbe'), + ('\u2dc0', '\u2dc6'), ('\u2dc8', '\u2dce'), + ('\u2dd0', '\u2dd6'), ('\u2dd8', '\u2dde'), + ('\u2de0', '\u2dff'), ('\u3005', '\u3005'), + ('\u3006', '\u3006'), ('\u3007', '\u3007'), + ('\u3021', '\u3029'), ('\u302a', '\u302d'), + ('\u302e', '\u302f'), ('\u3031', '\u3035'), + ('\u3038', '\u303a'), ('\u303b', '\u303b'), + ('\u303c', '\u303c'), ('\u3041', '\u3096'), + ('\u3099', '\u309a'), ('\u309d', '\u309e'), + ('\u309f', '\u309f'), ('\u30a1', '\u30fa'), + ('\u30fc', '\u30fe'), ('\u30ff', '\u30ff'), + ('\u3105', '\u312d'), ('\u3131', '\u318e'), + ('\u31a0', '\u31ba'), ('\u31f0', '\u31ff'), + ('\u3400', '\u4db5'), ('\u4e00', '\u9fcc'), + ('\ua000', '\ua014'), ('\ua015', '\ua015'), + ('\ua016', '\ua48c'), ('\ua4d0', '\ua4f7'), + ('\ua4f8', '\ua4fd'), ('\ua500', '\ua60b'), + ('\ua60c', '\ua60c'), ('\ua610', '\ua61f'), + ('\ua620', '\ua629'), ('\ua62a', '\ua62b'), + ('\ua640', '\ua66d'), ('\ua66e', '\ua66e'), + ('\ua66f', '\ua66f'), ('\ua674', '\ua67d'), + ('\ua67f', '\ua67f'), ('\ua680', '\ua697'), + ('\ua69f', '\ua69f'), ('\ua6a0', '\ua6e5'), + ('\ua6e6', '\ua6ef'), ('\ua6f0', '\ua6f1'), + ('\ua717', '\ua71f'), ('\ua722', '\ua76f'), + ('\ua770', '\ua770'), ('\ua771', '\ua787'), + ('\ua788', '\ua788'), ('\ua78b', '\ua78e'), + ('\ua790', '\ua793'), ('\ua7a0', '\ua7aa'), + ('\ua7f8', '\ua7f9'), ('\ua7fa', '\ua7fa'), + ('\ua7fb', '\ua801'), ('\ua802', '\ua802'), + ('\ua803', '\ua805'), ('\ua806', '\ua806'), + ('\ua807', '\ua80a'), ('\ua80b', '\ua80b'), + ('\ua80c', '\ua822'), ('\ua823', '\ua824'), + ('\ua825', '\ua826'), ('\ua827', '\ua827'), + ('\ua840', '\ua873'), ('\ua880', '\ua881'), + ('\ua882', '\ua8b3'), ('\ua8b4', '\ua8c3'), + ('\ua8c4', '\ua8c4'), ('\ua8d0', '\ua8d9'), + ('\ua8e0', '\ua8f1'), ('\ua8f2', '\ua8f7'), + ('\ua8fb', '\ua8fb'), ('\ua900', '\ua909'), + ('\ua90a', '\ua925'), ('\ua926', '\ua92d'), + ('\ua930', '\ua946'), ('\ua947', '\ua951'), + ('\ua952', '\ua953'), ('\ua960', '\ua97c'), + ('\ua980', '\ua982'), ('\ua983', '\ua983'), + ('\ua984', '\ua9b2'), ('\ua9b3', '\ua9b3'), + ('\ua9b4', '\ua9b5'), ('\ua9b6', '\ua9b9'), + ('\ua9ba', '\ua9bb'), ('\ua9bc', '\ua9bc'), + ('\ua9bd', '\ua9c0'), ('\ua9cf', '\ua9cf'), + ('\ua9d0', '\ua9d9'), ('\uaa00', '\uaa28'), + ('\uaa29', '\uaa2e'), ('\uaa2f', '\uaa30'), + ('\uaa31', '\uaa32'), ('\uaa33', '\uaa34'), + ('\uaa35', '\uaa36'), ('\uaa40', '\uaa42'), + ('\uaa43', '\uaa43'), ('\uaa44', '\uaa4b'), + ('\uaa4c', '\uaa4c'), ('\uaa4d', '\uaa4d'), + ('\uaa50', '\uaa59'), ('\uaa60', '\uaa6f'), + ('\uaa70', '\uaa70'), ('\uaa71', '\uaa76'), + ('\uaa7a', '\uaa7a'), ('\uaa7b', '\uaa7b'), + ('\uaa80', '\uaaaf'), ('\uaab0', '\uaab0'), + ('\uaab1', '\uaab1'), ('\uaab2', '\uaab4'), + ('\uaab5', '\uaab6'), ('\uaab7', '\uaab8'), + ('\uaab9', '\uaabd'), ('\uaabe', '\uaabf'), + ('\uaac0', '\uaac0'), ('\uaac1', '\uaac1'), + ('\uaac2', '\uaac2'), ('\uaadb', '\uaadc'), + ('\uaadd', '\uaadd'), ('\uaae0', '\uaaea'), + ('\uaaeb', '\uaaeb'), ('\uaaec', '\uaaed'), + ('\uaaee', '\uaaef'), ('\uaaf2', '\uaaf2'), + ('\uaaf3', '\uaaf4'), ('\uaaf5', '\uaaf5'), + ('\uaaf6', '\uaaf6'), ('\uab01', '\uab06'), + ('\uab09', '\uab0e'), ('\uab11', '\uab16'), + ('\uab20', '\uab26'), ('\uab28', '\uab2e'), + ('\uabc0', '\uabe2'), ('\uabe3', '\uabe4'), + ('\uabe5', '\uabe5'), ('\uabe6', '\uabe7'), + ('\uabe8', '\uabe8'), ('\uabe9', '\uabea'), + ('\uabec', '\uabec'), ('\uabed', '\uabed'), + ('\uabf0', '\uabf9'), ('\uac00', '\ud7a3'), + ('\ud7b0', '\ud7c6'), ('\ud7cb', '\ud7fb'), + ('\uf900', '\ufa6d'), ('\ufa70', '\ufad9'), + ('\ufb00', '\ufb06'), ('\ufb13', '\ufb17'), + ('\ufb1d', '\ufb1d'), ('\ufb1e', '\ufb1e'), + ('\ufb1f', '\ufb28'), ('\ufb2a', '\ufb36'), + ('\ufb38', '\ufb3c'), ('\ufb3e', '\ufb3e'), + ('\ufb40', '\ufb41'), ('\ufb43', '\ufb44'), + ('\ufb46', '\ufbb1'), ('\ufbd3', '\ufc5d'), + ('\ufc64', '\ufd3d'), ('\ufd50', '\ufd8f'), + ('\ufd92', '\ufdc7'), ('\ufdf0', '\ufdf9'), + ('\ufe00', '\ufe0f'), ('\ufe20', '\ufe26'), + ('\ufe33', '\ufe34'), ('\ufe4d', '\ufe4f'), + ('\ufe71', '\ufe71'), ('\ufe73', '\ufe73'), + ('\ufe77', '\ufe77'), ('\ufe79', '\ufe79'), + ('\ufe7b', '\ufe7b'), ('\ufe7d', '\ufe7d'), + ('\ufe7f', '\ufefc'), ('\uff10', '\uff19'), + ('\uff21', '\uff3a'), ('\uff3f', '\uff3f'), + ('\uff41', '\uff5a'), ('\uff66', '\uff6f'), + ('\uff70', '\uff70'), ('\uff71', '\uff9d'), + ('\uff9e', '\uff9f'), ('\uffa0', '\uffbe'), + ('\uffc2', '\uffc7'), ('\uffca', '\uffcf'), + ('\uffd2', '\uffd7'), ('\uffda', '\uffdc'), + ('\U00010000', '\U0001000b'), ('\U0001000d', '\U00010026'), + ('\U00010028', '\U0001003a'), ('\U0001003c', '\U0001003d'), + ('\U0001003f', '\U0001004d'), ('\U00010050', '\U0001005d'), + ('\U00010080', '\U000100fa'), ('\U00010140', '\U00010174'), + ('\U000101fd', '\U000101fd'), ('\U00010280', '\U0001029c'), + ('\U000102a0', '\U000102d0'), ('\U00010300', '\U0001031e'), + ('\U00010330', '\U00010340'), ('\U00010341', '\U00010341'), + ('\U00010342', '\U00010349'), ('\U0001034a', '\U0001034a'), + ('\U00010380', '\U0001039d'), ('\U000103a0', '\U000103c3'), + ('\U000103c8', '\U000103cf'), ('\U000103d1', '\U000103d5'), + ('\U00010400', '\U0001044f'), ('\U00010450', '\U0001049d'), + ('\U000104a0', '\U000104a9'), ('\U00010800', '\U00010805'), + ('\U00010808', '\U00010808'), ('\U0001080a', '\U00010835'), + ('\U00010837', '\U00010838'), ('\U0001083c', '\U0001083c'), + ('\U0001083f', '\U00010855'), ('\U00010900', '\U00010915'), + ('\U00010920', '\U00010939'), ('\U00010980', '\U000109b7'), + ('\U000109be', '\U000109bf'), ('\U00010a00', '\U00010a00'), + ('\U00010a01', '\U00010a03'), ('\U00010a05', '\U00010a06'), + ('\U00010a0c', '\U00010a0f'), ('\U00010a10', '\U00010a13'), + ('\U00010a15', '\U00010a17'), ('\U00010a19', '\U00010a33'), + ('\U00010a38', '\U00010a3a'), ('\U00010a3f', '\U00010a3f'), + ('\U00010a60', '\U00010a7c'), ('\U00010b00', '\U00010b35'), + ('\U00010b40', '\U00010b55'), ('\U00010b60', '\U00010b72'), + ('\U00010c00', '\U00010c48'), ('\U00011000', '\U00011000'), + ('\U00011001', '\U00011001'), ('\U00011002', '\U00011002'), + ('\U00011003', '\U00011037'), ('\U00011038', '\U00011046'), + ('\U00011066', '\U0001106f'), ('\U00011080', '\U00011081'), + ('\U00011082', '\U00011082'), ('\U00011083', '\U000110af'), + ('\U000110b0', '\U000110b2'), ('\U000110b3', '\U000110b6'), + ('\U000110b7', '\U000110b8'), ('\U000110b9', '\U000110ba'), + ('\U000110d0', '\U000110e8'), ('\U000110f0', '\U000110f9'), + ('\U00011100', '\U00011102'), ('\U00011103', '\U00011126'), + ('\U00011127', '\U0001112b'), ('\U0001112c', '\U0001112c'), + ('\U0001112d', '\U00011134'), ('\U00011136', '\U0001113f'), + ('\U00011180', '\U00011181'), ('\U00011182', '\U00011182'), + ('\U00011183', '\U000111b2'), ('\U000111b3', '\U000111b5'), + ('\U000111b6', '\U000111be'), ('\U000111bf', '\U000111c0'), + ('\U000111c1', '\U000111c4'), ('\U000111d0', '\U000111d9'), + ('\U00011680', '\U000116aa'), ('\U000116ab', '\U000116ab'), + ('\U000116ac', '\U000116ac'), ('\U000116ad', '\U000116ad'), + ('\U000116ae', '\U000116af'), ('\U000116b0', '\U000116b5'), + ('\U000116b6', '\U000116b6'), ('\U000116b7', '\U000116b7'), + ('\U000116c0', '\U000116c9'), ('\U00012000', '\U0001236e'), + ('\U00012400', '\U00012462'), ('\U00013000', '\U0001342e'), + ('\U00016800', '\U00016a38'), ('\U00016f00', '\U00016f44'), + ('\U00016f50', '\U00016f50'), ('\U00016f51', '\U00016f7e'), + ('\U00016f8f', '\U00016f92'), ('\U00016f93', '\U00016f9f'), + ('\U0001b000', '\U0001b001'), ('\U0001d165', '\U0001d166'), + ('\U0001d167', '\U0001d169'), ('\U0001d16d', '\U0001d172'), + ('\U0001d17b', '\U0001d182'), ('\U0001d185', '\U0001d18b'), + ('\U0001d1aa', '\U0001d1ad'), ('\U0001d242', '\U0001d244'), + ('\U0001d400', '\U0001d454'), ('\U0001d456', '\U0001d49c'), + ('\U0001d49e', '\U0001d49f'), ('\U0001d4a2', '\U0001d4a2'), + ('\U0001d4a5', '\U0001d4a6'), ('\U0001d4a9', '\U0001d4ac'), + ('\U0001d4ae', '\U0001d4b9'), ('\U0001d4bb', '\U0001d4bb'), + ('\U0001d4bd', '\U0001d4c3'), ('\U0001d4c5', '\U0001d505'), + ('\U0001d507', '\U0001d50a'), ('\U0001d50d', '\U0001d514'), + ('\U0001d516', '\U0001d51c'), ('\U0001d51e', '\U0001d539'), + ('\U0001d53b', '\U0001d53e'), ('\U0001d540', '\U0001d544'), + ('\U0001d546', '\U0001d546'), ('\U0001d54a', '\U0001d550'), + ('\U0001d552', '\U0001d6a5'), ('\U0001d6a8', '\U0001d6c0'), + ('\U0001d6c2', '\U0001d6da'), ('\U0001d6dc', '\U0001d6fa'), + ('\U0001d6fc', '\U0001d714'), ('\U0001d716', '\U0001d734'), + ('\U0001d736', '\U0001d74e'), ('\U0001d750', '\U0001d76e'), + ('\U0001d770', '\U0001d788'), ('\U0001d78a', '\U0001d7a8'), + ('\U0001d7aa', '\U0001d7c2'), ('\U0001d7c4', '\U0001d7cb'), + ('\U0001d7ce', '\U0001d7ff'), ('\U0001ee00', '\U0001ee03'), + ('\U0001ee05', '\U0001ee1f'), ('\U0001ee21', '\U0001ee22'), + ('\U0001ee24', '\U0001ee24'), ('\U0001ee27', '\U0001ee27'), + ('\U0001ee29', '\U0001ee32'), ('\U0001ee34', '\U0001ee37'), + ('\U0001ee39', '\U0001ee39'), ('\U0001ee3b', '\U0001ee3b'), + ('\U0001ee42', '\U0001ee42'), ('\U0001ee47', '\U0001ee47'), + ('\U0001ee49', '\U0001ee49'), ('\U0001ee4b', '\U0001ee4b'), + ('\U0001ee4d', '\U0001ee4f'), ('\U0001ee51', '\U0001ee52'), + ('\U0001ee54', '\U0001ee54'), ('\U0001ee57', '\U0001ee57'), + ('\U0001ee59', '\U0001ee59'), ('\U0001ee5b', '\U0001ee5b'), + ('\U0001ee5d', '\U0001ee5d'), ('\U0001ee5f', '\U0001ee5f'), + ('\U0001ee61', '\U0001ee62'), ('\U0001ee64', '\U0001ee64'), + ('\U0001ee67', '\U0001ee6a'), ('\U0001ee6c', '\U0001ee72'), + ('\U0001ee74', '\U0001ee77'), ('\U0001ee79', '\U0001ee7c'), + ('\U0001ee7e', '\U0001ee7e'), ('\U0001ee80', '\U0001ee89'), + ('\U0001ee8b', '\U0001ee9b'), ('\U0001eea1', '\U0001eea3'), + ('\U0001eea5', '\U0001eea9'), ('\U0001eeab', '\U0001eebb'), + ('\U00020000', '\U0002a6d6'), ('\U0002a700', '\U0002b734'), + ('\U0002b740', '\U0002b81d'), ('\U0002f800', '\U0002fa1d'), + ('\U000e0100', '\U000e01ef') + ]; + + pub fn XID_Continue(c: char) -> bool { + super::bsearch_range_table(c, XID_Continue_table) + } + + static XID_Start_table : &'static [(char,char)] = &[ + ('\x41', '\x5a'), ('\x61', '\x7a'), + ('\xaa', '\xaa'), ('\xb5', '\xb5'), + ('\xba', '\xba'), ('\xc0', '\xd6'), + ('\xd8', '\xf6'), ('\xf8', '\u01ba'), + ('\u01bb', '\u01bb'), ('\u01bc', '\u01bf'), + ('\u01c0', '\u01c3'), ('\u01c4', '\u0293'), + ('\u0294', '\u0294'), ('\u0295', '\u02af'), + ('\u02b0', '\u02c1'), ('\u02c6', '\u02d1'), + ('\u02e0', '\u02e4'), ('\u02ec', '\u02ec'), + ('\u02ee', '\u02ee'), ('\u0370', '\u0373'), + ('\u0374', '\u0374'), ('\u0376', '\u0377'), + ('\u037b', '\u037d'), ('\u0386', '\u0386'), + ('\u0388', '\u038a'), ('\u038c', '\u038c'), + ('\u038e', '\u03a1'), ('\u03a3', '\u03f5'), + ('\u03f7', '\u0481'), ('\u048a', '\u0527'), + ('\u0531', '\u0556'), ('\u0559', '\u0559'), + ('\u0561', '\u0587'), ('\u05d0', '\u05ea'), + ('\u05f0', '\u05f2'), ('\u0620', '\u063f'), + ('\u0640', '\u0640'), ('\u0641', '\u064a'), + ('\u066e', '\u066f'), ('\u0671', '\u06d3'), + ('\u06d5', '\u06d5'), ('\u06e5', '\u06e6'), + ('\u06ee', '\u06ef'), ('\u06fa', '\u06fc'), + ('\u06ff', '\u06ff'), ('\u0710', '\u0710'), + ('\u0712', '\u072f'), ('\u074d', '\u07a5'), + ('\u07b1', '\u07b1'), ('\u07ca', '\u07ea'), + ('\u07f4', '\u07f5'), ('\u07fa', '\u07fa'), + ('\u0800', '\u0815'), ('\u081a', '\u081a'), + ('\u0824', '\u0824'), ('\u0828', '\u0828'), + ('\u0840', '\u0858'), ('\u08a0', '\u08a0'), + ('\u08a2', '\u08ac'), ('\u0904', '\u0939'), + ('\u093d', '\u093d'), ('\u0950', '\u0950'), + ('\u0958', '\u0961'), ('\u0971', '\u0971'), + ('\u0972', '\u0977'), ('\u0979', '\u097f'), + ('\u0985', '\u098c'), ('\u098f', '\u0990'), + ('\u0993', '\u09a8'), ('\u09aa', '\u09b0'), + ('\u09b2', '\u09b2'), ('\u09b6', '\u09b9'), + ('\u09bd', '\u09bd'), ('\u09ce', '\u09ce'), + ('\u09dc', '\u09dd'), ('\u09df', '\u09e1'), + ('\u09f0', '\u09f1'), ('\u0a05', '\u0a0a'), + ('\u0a0f', '\u0a10'), ('\u0a13', '\u0a28'), + ('\u0a2a', '\u0a30'), ('\u0a32', '\u0a33'), + ('\u0a35', '\u0a36'), ('\u0a38', '\u0a39'), + ('\u0a59', '\u0a5c'), ('\u0a5e', '\u0a5e'), + ('\u0a72', '\u0a74'), ('\u0a85', '\u0a8d'), + ('\u0a8f', '\u0a91'), ('\u0a93', '\u0aa8'), + ('\u0aaa', '\u0ab0'), ('\u0ab2', '\u0ab3'), + ('\u0ab5', '\u0ab9'), ('\u0abd', '\u0abd'), + ('\u0ad0', '\u0ad0'), ('\u0ae0', '\u0ae1'), + ('\u0b05', '\u0b0c'), ('\u0b0f', '\u0b10'), + ('\u0b13', '\u0b28'), ('\u0b2a', '\u0b30'), + ('\u0b32', '\u0b33'), ('\u0b35', '\u0b39'), + ('\u0b3d', '\u0b3d'), ('\u0b5c', '\u0b5d'), + ('\u0b5f', '\u0b61'), ('\u0b71', '\u0b71'), + ('\u0b83', '\u0b83'), ('\u0b85', '\u0b8a'), + ('\u0b8e', '\u0b90'), ('\u0b92', '\u0b95'), + ('\u0b99', '\u0b9a'), ('\u0b9c', '\u0b9c'), + ('\u0b9e', '\u0b9f'), ('\u0ba3', '\u0ba4'), + ('\u0ba8', '\u0baa'), ('\u0bae', '\u0bb9'), + ('\u0bd0', '\u0bd0'), ('\u0c05', '\u0c0c'), + ('\u0c0e', '\u0c10'), ('\u0c12', '\u0c28'), + ('\u0c2a', '\u0c33'), ('\u0c35', '\u0c39'), + ('\u0c3d', '\u0c3d'), ('\u0c58', '\u0c59'), + ('\u0c60', '\u0c61'), ('\u0c85', '\u0c8c'), + ('\u0c8e', '\u0c90'), ('\u0c92', '\u0ca8'), + ('\u0caa', '\u0cb3'), ('\u0cb5', '\u0cb9'), + ('\u0cbd', '\u0cbd'), ('\u0cde', '\u0cde'), + ('\u0ce0', '\u0ce1'), ('\u0cf1', '\u0cf2'), + ('\u0d05', '\u0d0c'), ('\u0d0e', '\u0d10'), + ('\u0d12', '\u0d3a'), ('\u0d3d', '\u0d3d'), + ('\u0d4e', '\u0d4e'), ('\u0d60', '\u0d61'), + ('\u0d7a', '\u0d7f'), ('\u0d85', '\u0d96'), + ('\u0d9a', '\u0db1'), ('\u0db3', '\u0dbb'), + ('\u0dbd', '\u0dbd'), ('\u0dc0', '\u0dc6'), + ('\u0e01', '\u0e30'), ('\u0e32', '\u0e32'), + ('\u0e40', '\u0e45'), ('\u0e46', '\u0e46'), + ('\u0e81', '\u0e82'), ('\u0e84', '\u0e84'), + ('\u0e87', '\u0e88'), ('\u0e8a', '\u0e8a'), + ('\u0e8d', '\u0e8d'), ('\u0e94', '\u0e97'), + ('\u0e99', '\u0e9f'), ('\u0ea1', '\u0ea3'), + ('\u0ea5', '\u0ea5'), ('\u0ea7', '\u0ea7'), + ('\u0eaa', '\u0eab'), ('\u0ead', '\u0eb0'), + ('\u0eb2', '\u0eb2'), ('\u0ebd', '\u0ebd'), + ('\u0ec0', '\u0ec4'), ('\u0ec6', '\u0ec6'), + ('\u0edc', '\u0edf'), ('\u0f00', '\u0f00'), + ('\u0f40', '\u0f47'), ('\u0f49', '\u0f6c'), + ('\u0f88', '\u0f8c'), ('\u1000', '\u102a'), + ('\u103f', '\u103f'), ('\u1050', '\u1055'), + ('\u105a', '\u105d'), ('\u1061', '\u1061'), + ('\u1065', '\u1066'), ('\u106e', '\u1070'), + ('\u1075', '\u1081'), ('\u108e', '\u108e'), + ('\u10a0', '\u10c5'), ('\u10c7', '\u10c7'), + ('\u10cd', '\u10cd'), ('\u10d0', '\u10fa'), + ('\u10fc', '\u10fc'), ('\u10fd', '\u1248'), + ('\u124a', '\u124d'), ('\u1250', '\u1256'), + ('\u1258', '\u1258'), ('\u125a', '\u125d'), + ('\u1260', '\u1288'), ('\u128a', '\u128d'), + ('\u1290', '\u12b0'), ('\u12b2', '\u12b5'), + ('\u12b8', '\u12be'), ('\u12c0', '\u12c0'), + ('\u12c2', '\u12c5'), ('\u12c8', '\u12d6'), + ('\u12d8', '\u1310'), ('\u1312', '\u1315'), + ('\u1318', '\u135a'), ('\u1380', '\u138f'), + ('\u13a0', '\u13f4'), ('\u1401', '\u166c'), + ('\u166f', '\u167f'), ('\u1681', '\u169a'), + ('\u16a0', '\u16ea'), ('\u16ee', '\u16f0'), + ('\u1700', '\u170c'), ('\u170e', '\u1711'), + ('\u1720', '\u1731'), ('\u1740', '\u1751'), + ('\u1760', '\u176c'), ('\u176e', '\u1770'), + ('\u1780', '\u17b3'), ('\u17d7', '\u17d7'), + ('\u17dc', '\u17dc'), ('\u1820', '\u1842'), + ('\u1843', '\u1843'), ('\u1844', '\u1877'), + ('\u1880', '\u18a8'), ('\u18aa', '\u18aa'), + ('\u18b0', '\u18f5'), ('\u1900', '\u191c'), + ('\u1950', '\u196d'), ('\u1970', '\u1974'), + ('\u1980', '\u19ab'), ('\u19c1', '\u19c7'), + ('\u1a00', '\u1a16'), ('\u1a20', '\u1a54'), + ('\u1aa7', '\u1aa7'), ('\u1b05', '\u1b33'), + ('\u1b45', '\u1b4b'), ('\u1b83', '\u1ba0'), + ('\u1bae', '\u1baf'), ('\u1bba', '\u1be5'), + ('\u1c00', '\u1c23'), ('\u1c4d', '\u1c4f'), + ('\u1c5a', '\u1c77'), ('\u1c78', '\u1c7d'), + ('\u1ce9', '\u1cec'), ('\u1cee', '\u1cf1'), + ('\u1cf5', '\u1cf6'), ('\u1d00', '\u1d2b'), + ('\u1d2c', '\u1d6a'), ('\u1d6b', '\u1d77'), + ('\u1d78', '\u1d78'), ('\u1d79', '\u1d9a'), + ('\u1d9b', '\u1dbf'), ('\u1e00', '\u1f15'), + ('\u1f18', '\u1f1d'), ('\u1f20', '\u1f45'), + ('\u1f48', '\u1f4d'), ('\u1f50', '\u1f57'), + ('\u1f59', '\u1f59'), ('\u1f5b', '\u1f5b'), + ('\u1f5d', '\u1f5d'), ('\u1f5f', '\u1f7d'), + ('\u1f80', '\u1fb4'), ('\u1fb6', '\u1fbc'), + ('\u1fbe', '\u1fbe'), ('\u1fc2', '\u1fc4'), + ('\u1fc6', '\u1fcc'), ('\u1fd0', '\u1fd3'), + ('\u1fd6', '\u1fdb'), ('\u1fe0', '\u1fec'), + ('\u1ff2', '\u1ff4'), ('\u1ff6', '\u1ffc'), + ('\u2071', '\u2071'), ('\u207f', '\u207f'), + ('\u2090', '\u209c'), ('\u2102', '\u2102'), + ('\u2107', '\u2107'), ('\u210a', '\u2113'), + ('\u2115', '\u2115'), ('\u2118', '\u2118'), + ('\u2119', '\u211d'), ('\u2124', '\u2124'), + ('\u2126', '\u2126'), ('\u2128', '\u2128'), + ('\u212a', '\u212d'), ('\u212e', '\u212e'), + ('\u212f', '\u2134'), ('\u2135', '\u2138'), + ('\u2139', '\u2139'), ('\u213c', '\u213f'), + ('\u2145', '\u2149'), ('\u214e', '\u214e'), + ('\u2160', '\u2182'), ('\u2183', '\u2184'), + ('\u2185', '\u2188'), ('\u2c00', '\u2c2e'), + ('\u2c30', '\u2c5e'), ('\u2c60', '\u2c7b'), + ('\u2c7c', '\u2c7d'), ('\u2c7e', '\u2ce4'), + ('\u2ceb', '\u2cee'), ('\u2cf2', '\u2cf3'), + ('\u2d00', '\u2d25'), ('\u2d27', '\u2d27'), + ('\u2d2d', '\u2d2d'), ('\u2d30', '\u2d67'), + ('\u2d6f', '\u2d6f'), ('\u2d80', '\u2d96'), + ('\u2da0', '\u2da6'), ('\u2da8', '\u2dae'), + ('\u2db0', '\u2db6'), ('\u2db8', '\u2dbe'), + ('\u2dc0', '\u2dc6'), ('\u2dc8', '\u2dce'), + ('\u2dd0', '\u2dd6'), ('\u2dd8', '\u2dde'), + ('\u3005', '\u3005'), ('\u3006', '\u3006'), + ('\u3007', '\u3007'), ('\u3021', '\u3029'), + ('\u3031', '\u3035'), ('\u3038', '\u303a'), + ('\u303b', '\u303b'), ('\u303c', '\u303c'), + ('\u3041', '\u3096'), ('\u309d', '\u309e'), + ('\u309f', '\u309f'), ('\u30a1', '\u30fa'), + ('\u30fc', '\u30fe'), ('\u30ff', '\u30ff'), + ('\u3105', '\u312d'), ('\u3131', '\u318e'), + ('\u31a0', '\u31ba'), ('\u31f0', '\u31ff'), + ('\u3400', '\u4db5'), ('\u4e00', '\u9fcc'), + ('\ua000', '\ua014'), ('\ua015', '\ua015'), + ('\ua016', '\ua48c'), ('\ua4d0', '\ua4f7'), + ('\ua4f8', '\ua4fd'), ('\ua500', '\ua60b'), + ('\ua60c', '\ua60c'), ('\ua610', '\ua61f'), + ('\ua62a', '\ua62b'), ('\ua640', '\ua66d'), + ('\ua66e', '\ua66e'), ('\ua67f', '\ua67f'), + ('\ua680', '\ua697'), ('\ua6a0', '\ua6e5'), + ('\ua6e6', '\ua6ef'), ('\ua717', '\ua71f'), + ('\ua722', '\ua76f'), ('\ua770', '\ua770'), + ('\ua771', '\ua787'), ('\ua788', '\ua788'), + ('\ua78b', '\ua78e'), ('\ua790', '\ua793'), + ('\ua7a0', '\ua7aa'), ('\ua7f8', '\ua7f9'), + ('\ua7fa', '\ua7fa'), ('\ua7fb', '\ua801'), + ('\ua803', '\ua805'), ('\ua807', '\ua80a'), + ('\ua80c', '\ua822'), ('\ua840', '\ua873'), + ('\ua882', '\ua8b3'), ('\ua8f2', '\ua8f7'), + ('\ua8fb', '\ua8fb'), ('\ua90a', '\ua925'), + ('\ua930', '\ua946'), ('\ua960', '\ua97c'), + ('\ua984', '\ua9b2'), ('\ua9cf', '\ua9cf'), + ('\uaa00', '\uaa28'), ('\uaa40', '\uaa42'), + ('\uaa44', '\uaa4b'), ('\uaa60', '\uaa6f'), + ('\uaa70', '\uaa70'), ('\uaa71', '\uaa76'), + ('\uaa7a', '\uaa7a'), ('\uaa80', '\uaaaf'), + ('\uaab1', '\uaab1'), ('\uaab5', '\uaab6'), + ('\uaab9', '\uaabd'), ('\uaac0', '\uaac0'), + ('\uaac2', '\uaac2'), ('\uaadb', '\uaadc'), + ('\uaadd', '\uaadd'), ('\uaae0', '\uaaea'), + ('\uaaf2', '\uaaf2'), ('\uaaf3', '\uaaf4'), + ('\uab01', '\uab06'), ('\uab09', '\uab0e'), + ('\uab11', '\uab16'), ('\uab20', '\uab26'), + ('\uab28', '\uab2e'), ('\uabc0', '\uabe2'), + ('\uac00', '\ud7a3'), ('\ud7b0', '\ud7c6'), + ('\ud7cb', '\ud7fb'), ('\uf900', '\ufa6d'), + ('\ufa70', '\ufad9'), ('\ufb00', '\ufb06'), + ('\ufb13', '\ufb17'), ('\ufb1d', '\ufb1d'), + ('\ufb1f', '\ufb28'), ('\ufb2a', '\ufb36'), + ('\ufb38', '\ufb3c'), ('\ufb3e', '\ufb3e'), + ('\ufb40', '\ufb41'), ('\ufb43', '\ufb44'), + ('\ufb46', '\ufbb1'), ('\ufbd3', '\ufc5d'), + ('\ufc64', '\ufd3d'), ('\ufd50', '\ufd8f'), + ('\ufd92', '\ufdc7'), ('\ufdf0', '\ufdf9'), + ('\ufe71', '\ufe71'), ('\ufe73', '\ufe73'), + ('\ufe77', '\ufe77'), ('\ufe79', '\ufe79'), + ('\ufe7b', '\ufe7b'), ('\ufe7d', '\ufe7d'), + ('\ufe7f', '\ufefc'), ('\uff21', '\uff3a'), + ('\uff41', '\uff5a'), ('\uff66', '\uff6f'), + ('\uff70', '\uff70'), ('\uff71', '\uff9d'), + ('\uffa0', '\uffbe'), ('\uffc2', '\uffc7'), + ('\uffca', '\uffcf'), ('\uffd2', '\uffd7'), + ('\uffda', '\uffdc'), ('\U00010000', '\U0001000b'), + ('\U0001000d', '\U00010026'), ('\U00010028', '\U0001003a'), + ('\U0001003c', '\U0001003d'), ('\U0001003f', '\U0001004d'), + ('\U00010050', '\U0001005d'), ('\U00010080', '\U000100fa'), + ('\U00010140', '\U00010174'), ('\U00010280', '\U0001029c'), + ('\U000102a0', '\U000102d0'), ('\U00010300', '\U0001031e'), + ('\U00010330', '\U00010340'), ('\U00010341', '\U00010341'), + ('\U00010342', '\U00010349'), ('\U0001034a', '\U0001034a'), + ('\U00010380', '\U0001039d'), ('\U000103a0', '\U000103c3'), + ('\U000103c8', '\U000103cf'), ('\U000103d1', '\U000103d5'), + ('\U00010400', '\U0001044f'), ('\U00010450', '\U0001049d'), + ('\U00010800', '\U00010805'), ('\U00010808', '\U00010808'), + ('\U0001080a', '\U00010835'), ('\U00010837', '\U00010838'), + ('\U0001083c', '\U0001083c'), ('\U0001083f', '\U00010855'), + ('\U00010900', '\U00010915'), ('\U00010920', '\U00010939'), + ('\U00010980', '\U000109b7'), ('\U000109be', '\U000109bf'), + ('\U00010a00', '\U00010a00'), ('\U00010a10', '\U00010a13'), + ('\U00010a15', '\U00010a17'), ('\U00010a19', '\U00010a33'), + ('\U00010a60', '\U00010a7c'), ('\U00010b00', '\U00010b35'), + ('\U00010b40', '\U00010b55'), ('\U00010b60', '\U00010b72'), + ('\U00010c00', '\U00010c48'), ('\U00011003', '\U00011037'), + ('\U00011083', '\U000110af'), ('\U000110d0', '\U000110e8'), + ('\U00011103', '\U00011126'), ('\U00011183', '\U000111b2'), + ('\U000111c1', '\U000111c4'), ('\U00011680', '\U000116aa'), + ('\U00012000', '\U0001236e'), ('\U00012400', '\U00012462'), + ('\U00013000', '\U0001342e'), ('\U00016800', '\U00016a38'), + ('\U00016f00', '\U00016f44'), ('\U00016f50', '\U00016f50'), + ('\U00016f93', '\U00016f9f'), ('\U0001b000', '\U0001b001'), + ('\U0001d400', '\U0001d454'), ('\U0001d456', '\U0001d49c'), + ('\U0001d49e', '\U0001d49f'), ('\U0001d4a2', '\U0001d4a2'), + ('\U0001d4a5', '\U0001d4a6'), ('\U0001d4a9', '\U0001d4ac'), + ('\U0001d4ae', '\U0001d4b9'), ('\U0001d4bb', '\U0001d4bb'), + ('\U0001d4bd', '\U0001d4c3'), ('\U0001d4c5', '\U0001d505'), + ('\U0001d507', '\U0001d50a'), ('\U0001d50d', '\U0001d514'), + ('\U0001d516', '\U0001d51c'), ('\U0001d51e', '\U0001d539'), + ('\U0001d53b', '\U0001d53e'), ('\U0001d540', '\U0001d544'), + ('\U0001d546', '\U0001d546'), ('\U0001d54a', '\U0001d550'), + ('\U0001d552', '\U0001d6a5'), ('\U0001d6a8', '\U0001d6c0'), + ('\U0001d6c2', '\U0001d6da'), ('\U0001d6dc', '\U0001d6fa'), + ('\U0001d6fc', '\U0001d714'), ('\U0001d716', '\U0001d734'), + ('\U0001d736', '\U0001d74e'), ('\U0001d750', '\U0001d76e'), + ('\U0001d770', '\U0001d788'), ('\U0001d78a', '\U0001d7a8'), + ('\U0001d7aa', '\U0001d7c2'), ('\U0001d7c4', '\U0001d7cb'), + ('\U0001ee00', '\U0001ee03'), ('\U0001ee05', '\U0001ee1f'), + ('\U0001ee21', '\U0001ee22'), ('\U0001ee24', '\U0001ee24'), + ('\U0001ee27', '\U0001ee27'), ('\U0001ee29', '\U0001ee32'), + ('\U0001ee34', '\U0001ee37'), ('\U0001ee39', '\U0001ee39'), + ('\U0001ee3b', '\U0001ee3b'), ('\U0001ee42', '\U0001ee42'), + ('\U0001ee47', '\U0001ee47'), ('\U0001ee49', '\U0001ee49'), + ('\U0001ee4b', '\U0001ee4b'), ('\U0001ee4d', '\U0001ee4f'), + ('\U0001ee51', '\U0001ee52'), ('\U0001ee54', '\U0001ee54'), + ('\U0001ee57', '\U0001ee57'), ('\U0001ee59', '\U0001ee59'), + ('\U0001ee5b', '\U0001ee5b'), ('\U0001ee5d', '\U0001ee5d'), + ('\U0001ee5f', '\U0001ee5f'), ('\U0001ee61', '\U0001ee62'), + ('\U0001ee64', '\U0001ee64'), ('\U0001ee67', '\U0001ee6a'), + ('\U0001ee6c', '\U0001ee72'), ('\U0001ee74', '\U0001ee77'), + ('\U0001ee79', '\U0001ee7c'), ('\U0001ee7e', '\U0001ee7e'), + ('\U0001ee80', '\U0001ee89'), ('\U0001ee8b', '\U0001ee9b'), + ('\U0001eea1', '\U0001eea3'), ('\U0001eea5', '\U0001eea9'), + ('\U0001eeab', '\U0001eebb'), ('\U00020000', '\U0002a6d6'), + ('\U0002a700', '\U0002b734'), ('\U0002b740', '\U0002b81d'), + ('\U0002f800', '\U0002fa1d') + ]; + + pub fn XID_Start(c: char) -> bool { + super::bsearch_range_table(c, XID_Start_table) + } +} + +pub mod property { + static White_Space_table : &'static [(char,char)] = &[ + ('\x09', '\x0d'), ('\x20', '\x20'), + ('\x85', '\x85'), ('\xa0', '\xa0'), + ('\u1680', '\u1680'), ('\u2000', '\u200a'), + ('\u2028', '\u2028'), ('\u2029', '\u2029'), + ('\u202f', '\u202f'), ('\u205f', '\u205f'), + ('\u3000', '\u3000') + ]; + + pub fn White_Space(c: char) -> bool { + super::bsearch_range_table(c, White_Space_table) + } +} + +pub mod conversions { + use cmp::{Equal, Less, Greater}; + use slice::ImmutableVector; + use tuple::Tuple2; + use option::{Option, Some, None}; + + pub fn to_lower(c: char) -> char { + match bsearch_case_table(c, LuLl_table) { + None => c, + Some(index) => LuLl_table[index].val1() + } + } + + pub fn to_upper(c: char) -> char { + match bsearch_case_table(c, LlLu_table) { + None => c, + Some(index) => LlLu_table[index].val1() + } + } + + fn bsearch_case_table(c: char, table: &'static [(char, char)]) -> Option { + table.bsearch(|&(key, _)| { + if c == key { Equal } + else if key < c { Less } + else { Greater } + }) + } + + static LuLl_table : &'static [(char, char)] = &[ + ('\x41', '\x61'), ('\x42', '\x62'), + ('\x43', '\x63'), ('\x44', '\x64'), + ('\x45', '\x65'), ('\x46', '\x66'), + ('\x47', '\x67'), ('\x48', '\x68'), + ('\x49', '\x69'), ('\x4a', '\x6a'), + ('\x4b', '\x6b'), ('\x4c', '\x6c'), + ('\x4d', '\x6d'), ('\x4e', '\x6e'), + ('\x4f', '\x6f'), ('\x50', '\x70'), + ('\x51', '\x71'), ('\x52', '\x72'), + ('\x53', '\x73'), ('\x54', '\x74'), + ('\x55', '\x75'), ('\x56', '\x76'), + ('\x57', '\x77'), ('\x58', '\x78'), + ('\x59', '\x79'), ('\x5a', '\x7a'), + ('\xc0', '\xe0'), ('\xc1', '\xe1'), + ('\xc2', '\xe2'), ('\xc3', '\xe3'), + ('\xc4', '\xe4'), ('\xc5', '\xe5'), + ('\xc6', '\xe6'), ('\xc7', '\xe7'), + ('\xc8', '\xe8'), ('\xc9', '\xe9'), + ('\xca', '\xea'), ('\xcb', '\xeb'), + ('\xcc', '\xec'), ('\xcd', '\xed'), + ('\xce', '\xee'), ('\xcf', '\xef'), + ('\xd0', '\xf0'), ('\xd1', '\xf1'), + ('\xd2', '\xf2'), ('\xd3', '\xf3'), + ('\xd4', '\xf4'), ('\xd5', '\xf5'), + ('\xd6', '\xf6'), ('\xd8', '\xf8'), + ('\xd9', '\xf9'), ('\xda', '\xfa'), + ('\xdb', '\xfb'), ('\xdc', '\xfc'), + ('\xdd', '\xfd'), ('\xde', '\xfe'), + ('\u0100', '\u0101'), ('\u0102', '\u0103'), + ('\u0104', '\u0105'), ('\u0106', '\u0107'), + ('\u0108', '\u0109'), ('\u010a', '\u010b'), + ('\u010c', '\u010d'), ('\u010e', '\u010f'), + ('\u0110', '\u0111'), ('\u0112', '\u0113'), + ('\u0114', '\u0115'), ('\u0116', '\u0117'), + ('\u0118', '\u0119'), ('\u011a', '\u011b'), + ('\u011c', '\u011d'), ('\u011e', '\u011f'), + ('\u0120', '\u0121'), ('\u0122', '\u0123'), + ('\u0124', '\u0125'), ('\u0126', '\u0127'), + ('\u0128', '\u0129'), ('\u012a', '\u012b'), + ('\u012c', '\u012d'), ('\u012e', '\u012f'), + ('\u0130', '\x69'), ('\u0132', '\u0133'), + ('\u0134', '\u0135'), ('\u0136', '\u0137'), + ('\u0139', '\u013a'), ('\u013b', '\u013c'), + ('\u013d', '\u013e'), ('\u013f', '\u0140'), + ('\u0141', '\u0142'), ('\u0143', '\u0144'), + ('\u0145', '\u0146'), ('\u0147', '\u0148'), + ('\u014a', '\u014b'), ('\u014c', '\u014d'), + ('\u014e', '\u014f'), ('\u0150', '\u0151'), + ('\u0152', '\u0153'), ('\u0154', '\u0155'), + ('\u0156', '\u0157'), ('\u0158', '\u0159'), + ('\u015a', '\u015b'), ('\u015c', '\u015d'), + ('\u015e', '\u015f'), ('\u0160', '\u0161'), + ('\u0162', '\u0163'), ('\u0164', '\u0165'), + ('\u0166', '\u0167'), ('\u0168', '\u0169'), + ('\u016a', '\u016b'), ('\u016c', '\u016d'), + ('\u016e', '\u016f'), ('\u0170', '\u0171'), + ('\u0172', '\u0173'), ('\u0174', '\u0175'), + ('\u0176', '\u0177'), ('\u0178', '\xff'), + ('\u0179', '\u017a'), ('\u017b', '\u017c'), + ('\u017d', '\u017e'), ('\u0181', '\u0253'), + ('\u0182', '\u0183'), ('\u0184', '\u0185'), + ('\u0186', '\u0254'), ('\u0187', '\u0188'), + ('\u0189', '\u0256'), ('\u018a', '\u0257'), + ('\u018b', '\u018c'), ('\u018e', '\u01dd'), + ('\u018f', '\u0259'), ('\u0190', '\u025b'), + ('\u0191', '\u0192'), ('\u0193', '\u0260'), + ('\u0194', '\u0263'), ('\u0196', '\u0269'), + ('\u0197', '\u0268'), ('\u0198', '\u0199'), + ('\u019c', '\u026f'), ('\u019d', '\u0272'), + ('\u019f', '\u0275'), ('\u01a0', '\u01a1'), + ('\u01a2', '\u01a3'), ('\u01a4', '\u01a5'), + ('\u01a6', '\u0280'), ('\u01a7', '\u01a8'), + ('\u01a9', '\u0283'), ('\u01ac', '\u01ad'), + ('\u01ae', '\u0288'), ('\u01af', '\u01b0'), + ('\u01b1', '\u028a'), ('\u01b2', '\u028b'), + ('\u01b3', '\u01b4'), ('\u01b5', '\u01b6'), + ('\u01b7', '\u0292'), ('\u01b8', '\u01b9'), + ('\u01bc', '\u01bd'), ('\u01c4', '\u01c6'), + ('\u01c7', '\u01c9'), ('\u01ca', '\u01cc'), + ('\u01cd', '\u01ce'), ('\u01cf', '\u01d0'), + ('\u01d1', '\u01d2'), ('\u01d3', '\u01d4'), + ('\u01d5', '\u01d6'), ('\u01d7', '\u01d8'), + ('\u01d9', '\u01da'), ('\u01db', '\u01dc'), + ('\u01de', '\u01df'), ('\u01e0', '\u01e1'), + ('\u01e2', '\u01e3'), ('\u01e4', '\u01e5'), + ('\u01e6', '\u01e7'), ('\u01e8', '\u01e9'), + ('\u01ea', '\u01eb'), ('\u01ec', '\u01ed'), + ('\u01ee', '\u01ef'), ('\u01f1', '\u01f3'), + ('\u01f4', '\u01f5'), ('\u01f6', '\u0195'), + ('\u01f7', '\u01bf'), ('\u01f8', '\u01f9'), + ('\u01fa', '\u01fb'), ('\u01fc', '\u01fd'), + ('\u01fe', '\u01ff'), ('\u0200', '\u0201'), + ('\u0202', '\u0203'), ('\u0204', '\u0205'), + ('\u0206', '\u0207'), ('\u0208', '\u0209'), + ('\u020a', '\u020b'), ('\u020c', '\u020d'), + ('\u020e', '\u020f'), ('\u0210', '\u0211'), + ('\u0212', '\u0213'), ('\u0214', '\u0215'), + ('\u0216', '\u0217'), ('\u0218', '\u0219'), + ('\u021a', '\u021b'), ('\u021c', '\u021d'), + ('\u021e', '\u021f'), ('\u0220', '\u019e'), + ('\u0222', '\u0223'), ('\u0224', '\u0225'), + ('\u0226', '\u0227'), ('\u0228', '\u0229'), + ('\u022a', '\u022b'), ('\u022c', '\u022d'), + ('\u022e', '\u022f'), ('\u0230', '\u0231'), + ('\u0232', '\u0233'), ('\u023a', '\u2c65'), + ('\u023b', '\u023c'), ('\u023d', '\u019a'), + ('\u023e', '\u2c66'), ('\u0241', '\u0242'), + ('\u0243', '\u0180'), ('\u0244', '\u0289'), + ('\u0245', '\u028c'), ('\u0246', '\u0247'), + ('\u0248', '\u0249'), ('\u024a', '\u024b'), + ('\u024c', '\u024d'), ('\u024e', '\u024f'), + ('\u0370', '\u0371'), ('\u0372', '\u0373'), + ('\u0376', '\u0377'), ('\u0386', '\u03ac'), + ('\u0388', '\u03ad'), ('\u0389', '\u03ae'), + ('\u038a', '\u03af'), ('\u038c', '\u03cc'), + ('\u038e', '\u03cd'), ('\u038f', '\u03ce'), + ('\u0391', '\u03b1'), ('\u0392', '\u03b2'), + ('\u0393', '\u03b3'), ('\u0394', '\u03b4'), + ('\u0395', '\u03b5'), ('\u0396', '\u03b6'), + ('\u0397', '\u03b7'), ('\u0398', '\u03b8'), + ('\u0399', '\u03b9'), ('\u039a', '\u03ba'), + ('\u039b', '\u03bb'), ('\u039c', '\u03bc'), + ('\u039d', '\u03bd'), ('\u039e', '\u03be'), + ('\u039f', '\u03bf'), ('\u03a0', '\u03c0'), + ('\u03a1', '\u03c1'), ('\u03a3', '\u03c3'), + ('\u03a4', '\u03c4'), ('\u03a5', '\u03c5'), + ('\u03a6', '\u03c6'), ('\u03a7', '\u03c7'), + ('\u03a8', '\u03c8'), ('\u03a9', '\u03c9'), + ('\u03aa', '\u03ca'), ('\u03ab', '\u03cb'), + ('\u03cf', '\u03d7'), ('\u03d8', '\u03d9'), + ('\u03da', '\u03db'), ('\u03dc', '\u03dd'), + ('\u03de', '\u03df'), ('\u03e0', '\u03e1'), + ('\u03e2', '\u03e3'), ('\u03e4', '\u03e5'), + ('\u03e6', '\u03e7'), ('\u03e8', '\u03e9'), + ('\u03ea', '\u03eb'), ('\u03ec', '\u03ed'), + ('\u03ee', '\u03ef'), ('\u03f4', '\u03b8'), + ('\u03f7', '\u03f8'), ('\u03f9', '\u03f2'), + ('\u03fa', '\u03fb'), ('\u03fd', '\u037b'), + ('\u03fe', '\u037c'), ('\u03ff', '\u037d'), + ('\u0400', '\u0450'), ('\u0401', '\u0451'), + ('\u0402', '\u0452'), ('\u0403', '\u0453'), + ('\u0404', '\u0454'), ('\u0405', '\u0455'), + ('\u0406', '\u0456'), ('\u0407', '\u0457'), + ('\u0408', '\u0458'), ('\u0409', '\u0459'), + ('\u040a', '\u045a'), ('\u040b', '\u045b'), + ('\u040c', '\u045c'), ('\u040d', '\u045d'), + ('\u040e', '\u045e'), ('\u040f', '\u045f'), + ('\u0410', '\u0430'), ('\u0411', '\u0431'), + ('\u0412', '\u0432'), ('\u0413', '\u0433'), + ('\u0414', '\u0434'), ('\u0415', '\u0435'), + ('\u0416', '\u0436'), ('\u0417', '\u0437'), + ('\u0418', '\u0438'), ('\u0419', '\u0439'), + ('\u041a', '\u043a'), ('\u041b', '\u043b'), + ('\u041c', '\u043c'), ('\u041d', '\u043d'), + ('\u041e', '\u043e'), ('\u041f', '\u043f'), + ('\u0420', '\u0440'), ('\u0421', '\u0441'), + ('\u0422', '\u0442'), ('\u0423', '\u0443'), + ('\u0424', '\u0444'), ('\u0425', '\u0445'), + ('\u0426', '\u0446'), ('\u0427', '\u0447'), + ('\u0428', '\u0448'), ('\u0429', '\u0449'), + ('\u042a', '\u044a'), ('\u042b', '\u044b'), + ('\u042c', '\u044c'), ('\u042d', '\u044d'), + ('\u042e', '\u044e'), ('\u042f', '\u044f'), + ('\u0460', '\u0461'), ('\u0462', '\u0463'), + ('\u0464', '\u0465'), ('\u0466', '\u0467'), + ('\u0468', '\u0469'), ('\u046a', '\u046b'), + ('\u046c', '\u046d'), ('\u046e', '\u046f'), + ('\u0470', '\u0471'), ('\u0472', '\u0473'), + ('\u0474', '\u0475'), ('\u0476', '\u0477'), + ('\u0478', '\u0479'), ('\u047a', '\u047b'), + ('\u047c', '\u047d'), ('\u047e', '\u047f'), + ('\u0480', '\u0481'), ('\u048a', '\u048b'), + ('\u048c', '\u048d'), ('\u048e', '\u048f'), + ('\u0490', '\u0491'), ('\u0492', '\u0493'), + ('\u0494', '\u0495'), ('\u0496', '\u0497'), + ('\u0498', '\u0499'), ('\u049a', '\u049b'), + ('\u049c', '\u049d'), ('\u049e', '\u049f'), + ('\u04a0', '\u04a1'), ('\u04a2', '\u04a3'), + ('\u04a4', '\u04a5'), ('\u04a6', '\u04a7'), + ('\u04a8', '\u04a9'), ('\u04aa', '\u04ab'), + ('\u04ac', '\u04ad'), ('\u04ae', '\u04af'), + ('\u04b0', '\u04b1'), ('\u04b2', '\u04b3'), + ('\u04b4', '\u04b5'), ('\u04b6', '\u04b7'), + ('\u04b8', '\u04b9'), ('\u04ba', '\u04bb'), + ('\u04bc', '\u04bd'), ('\u04be', '\u04bf'), + ('\u04c0', '\u04cf'), ('\u04c1', '\u04c2'), + ('\u04c3', '\u04c4'), ('\u04c5', '\u04c6'), + ('\u04c7', '\u04c8'), ('\u04c9', '\u04ca'), + ('\u04cb', '\u04cc'), ('\u04cd', '\u04ce'), + ('\u04d0', '\u04d1'), ('\u04d2', '\u04d3'), + ('\u04d4', '\u04d5'), ('\u04d6', '\u04d7'), + ('\u04d8', '\u04d9'), ('\u04da', '\u04db'), + ('\u04dc', '\u04dd'), ('\u04de', '\u04df'), + ('\u04e0', '\u04e1'), ('\u04e2', '\u04e3'), + ('\u04e4', '\u04e5'), ('\u04e6', '\u04e7'), + ('\u04e8', '\u04e9'), ('\u04ea', '\u04eb'), + ('\u04ec', '\u04ed'), ('\u04ee', '\u04ef'), + ('\u04f0', '\u04f1'), ('\u04f2', '\u04f3'), + ('\u04f4', '\u04f5'), ('\u04f6', '\u04f7'), + ('\u04f8', '\u04f9'), ('\u04fa', '\u04fb'), + ('\u04fc', '\u04fd'), ('\u04fe', '\u04ff'), + ('\u0500', '\u0501'), ('\u0502', '\u0503'), + ('\u0504', '\u0505'), ('\u0506', '\u0507'), + ('\u0508', '\u0509'), ('\u050a', '\u050b'), + ('\u050c', '\u050d'), ('\u050e', '\u050f'), + ('\u0510', '\u0511'), ('\u0512', '\u0513'), + ('\u0514', '\u0515'), ('\u0516', '\u0517'), + ('\u0518', '\u0519'), ('\u051a', '\u051b'), + ('\u051c', '\u051d'), ('\u051e', '\u051f'), + ('\u0520', '\u0521'), ('\u0522', '\u0523'), + ('\u0524', '\u0525'), ('\u0526', '\u0527'), + ('\u0531', '\u0561'), ('\u0532', '\u0562'), + ('\u0533', '\u0563'), ('\u0534', '\u0564'), + ('\u0535', '\u0565'), ('\u0536', '\u0566'), + ('\u0537', '\u0567'), ('\u0538', '\u0568'), + ('\u0539', '\u0569'), ('\u053a', '\u056a'), + ('\u053b', '\u056b'), ('\u053c', '\u056c'), + ('\u053d', '\u056d'), ('\u053e', '\u056e'), + ('\u053f', '\u056f'), ('\u0540', '\u0570'), + ('\u0541', '\u0571'), ('\u0542', '\u0572'), + ('\u0543', '\u0573'), ('\u0544', '\u0574'), + ('\u0545', '\u0575'), ('\u0546', '\u0576'), + ('\u0547', '\u0577'), ('\u0548', '\u0578'), + ('\u0549', '\u0579'), ('\u054a', '\u057a'), + ('\u054b', '\u057b'), ('\u054c', '\u057c'), + ('\u054d', '\u057d'), ('\u054e', '\u057e'), + ('\u054f', '\u057f'), ('\u0550', '\u0580'), + ('\u0551', '\u0581'), ('\u0552', '\u0582'), + ('\u0553', '\u0583'), ('\u0554', '\u0584'), + ('\u0555', '\u0585'), ('\u0556', '\u0586'), + ('\u10a0', '\u2d00'), ('\u10a1', '\u2d01'), + ('\u10a2', '\u2d02'), ('\u10a3', '\u2d03'), + ('\u10a4', '\u2d04'), ('\u10a5', '\u2d05'), + ('\u10a6', '\u2d06'), ('\u10a7', '\u2d07'), + ('\u10a8', '\u2d08'), ('\u10a9', '\u2d09'), + ('\u10aa', '\u2d0a'), ('\u10ab', '\u2d0b'), + ('\u10ac', '\u2d0c'), ('\u10ad', '\u2d0d'), + ('\u10ae', '\u2d0e'), ('\u10af', '\u2d0f'), + ('\u10b0', '\u2d10'), ('\u10b1', '\u2d11'), + ('\u10b2', '\u2d12'), ('\u10b3', '\u2d13'), + ('\u10b4', '\u2d14'), ('\u10b5', '\u2d15'), + ('\u10b6', '\u2d16'), ('\u10b7', '\u2d17'), + ('\u10b8', '\u2d18'), ('\u10b9', '\u2d19'), + ('\u10ba', '\u2d1a'), ('\u10bb', '\u2d1b'), + ('\u10bc', '\u2d1c'), ('\u10bd', '\u2d1d'), + ('\u10be', '\u2d1e'), ('\u10bf', '\u2d1f'), + ('\u10c0', '\u2d20'), ('\u10c1', '\u2d21'), + ('\u10c2', '\u2d22'), ('\u10c3', '\u2d23'), + ('\u10c4', '\u2d24'), ('\u10c5', '\u2d25'), + ('\u10c7', '\u2d27'), ('\u10cd', '\u2d2d'), + ('\u1e00', '\u1e01'), ('\u1e02', '\u1e03'), + ('\u1e04', '\u1e05'), ('\u1e06', '\u1e07'), + ('\u1e08', '\u1e09'), ('\u1e0a', '\u1e0b'), + ('\u1e0c', '\u1e0d'), ('\u1e0e', '\u1e0f'), + ('\u1e10', '\u1e11'), ('\u1e12', '\u1e13'), + ('\u1e14', '\u1e15'), ('\u1e16', '\u1e17'), + ('\u1e18', '\u1e19'), ('\u1e1a', '\u1e1b'), + ('\u1e1c', '\u1e1d'), ('\u1e1e', '\u1e1f'), + ('\u1e20', '\u1e21'), ('\u1e22', '\u1e23'), + ('\u1e24', '\u1e25'), ('\u1e26', '\u1e27'), + ('\u1e28', '\u1e29'), ('\u1e2a', '\u1e2b'), + ('\u1e2c', '\u1e2d'), ('\u1e2e', '\u1e2f'), + ('\u1e30', '\u1e31'), ('\u1e32', '\u1e33'), + ('\u1e34', '\u1e35'), ('\u1e36', '\u1e37'), + ('\u1e38', '\u1e39'), ('\u1e3a', '\u1e3b'), + ('\u1e3c', '\u1e3d'), ('\u1e3e', '\u1e3f'), + ('\u1e40', '\u1e41'), ('\u1e42', '\u1e43'), + ('\u1e44', '\u1e45'), ('\u1e46', '\u1e47'), + ('\u1e48', '\u1e49'), ('\u1e4a', '\u1e4b'), + ('\u1e4c', '\u1e4d'), ('\u1e4e', '\u1e4f'), + ('\u1e50', '\u1e51'), ('\u1e52', '\u1e53'), + ('\u1e54', '\u1e55'), ('\u1e56', '\u1e57'), + ('\u1e58', '\u1e59'), ('\u1e5a', '\u1e5b'), + ('\u1e5c', '\u1e5d'), ('\u1e5e', '\u1e5f'), + ('\u1e60', '\u1e61'), ('\u1e62', '\u1e63'), + ('\u1e64', '\u1e65'), ('\u1e66', '\u1e67'), + ('\u1e68', '\u1e69'), ('\u1e6a', '\u1e6b'), + ('\u1e6c', '\u1e6d'), ('\u1e6e', '\u1e6f'), + ('\u1e70', '\u1e71'), ('\u1e72', '\u1e73'), + ('\u1e74', '\u1e75'), ('\u1e76', '\u1e77'), + ('\u1e78', '\u1e79'), ('\u1e7a', '\u1e7b'), + ('\u1e7c', '\u1e7d'), ('\u1e7e', '\u1e7f'), + ('\u1e80', '\u1e81'), ('\u1e82', '\u1e83'), + ('\u1e84', '\u1e85'), ('\u1e86', '\u1e87'), + ('\u1e88', '\u1e89'), ('\u1e8a', '\u1e8b'), + ('\u1e8c', '\u1e8d'), ('\u1e8e', '\u1e8f'), + ('\u1e90', '\u1e91'), ('\u1e92', '\u1e93'), + ('\u1e94', '\u1e95'), ('\u1e9e', '\xdf'), + ('\u1ea0', '\u1ea1'), ('\u1ea2', '\u1ea3'), + ('\u1ea4', '\u1ea5'), ('\u1ea6', '\u1ea7'), + ('\u1ea8', '\u1ea9'), ('\u1eaa', '\u1eab'), + ('\u1eac', '\u1ead'), ('\u1eae', '\u1eaf'), + ('\u1eb0', '\u1eb1'), ('\u1eb2', '\u1eb3'), + ('\u1eb4', '\u1eb5'), ('\u1eb6', '\u1eb7'), + ('\u1eb8', '\u1eb9'), ('\u1eba', '\u1ebb'), + ('\u1ebc', '\u1ebd'), ('\u1ebe', '\u1ebf'), + ('\u1ec0', '\u1ec1'), ('\u1ec2', '\u1ec3'), + ('\u1ec4', '\u1ec5'), ('\u1ec6', '\u1ec7'), + ('\u1ec8', '\u1ec9'), ('\u1eca', '\u1ecb'), + ('\u1ecc', '\u1ecd'), ('\u1ece', '\u1ecf'), + ('\u1ed0', '\u1ed1'), ('\u1ed2', '\u1ed3'), + ('\u1ed4', '\u1ed5'), ('\u1ed6', '\u1ed7'), + ('\u1ed8', '\u1ed9'), ('\u1eda', '\u1edb'), + ('\u1edc', '\u1edd'), ('\u1ede', '\u1edf'), + ('\u1ee0', '\u1ee1'), ('\u1ee2', '\u1ee3'), + ('\u1ee4', '\u1ee5'), ('\u1ee6', '\u1ee7'), + ('\u1ee8', '\u1ee9'), ('\u1eea', '\u1eeb'), + ('\u1eec', '\u1eed'), ('\u1eee', '\u1eef'), + ('\u1ef0', '\u1ef1'), ('\u1ef2', '\u1ef3'), + ('\u1ef4', '\u1ef5'), ('\u1ef6', '\u1ef7'), + ('\u1ef8', '\u1ef9'), ('\u1efa', '\u1efb'), + ('\u1efc', '\u1efd'), ('\u1efe', '\u1eff'), + ('\u1f08', '\u1f00'), ('\u1f09', '\u1f01'), + ('\u1f0a', '\u1f02'), ('\u1f0b', '\u1f03'), + ('\u1f0c', '\u1f04'), ('\u1f0d', '\u1f05'), + ('\u1f0e', '\u1f06'), ('\u1f0f', '\u1f07'), + ('\u1f18', '\u1f10'), ('\u1f19', '\u1f11'), + ('\u1f1a', '\u1f12'), ('\u1f1b', '\u1f13'), + ('\u1f1c', '\u1f14'), ('\u1f1d', '\u1f15'), + ('\u1f28', '\u1f20'), ('\u1f29', '\u1f21'), + ('\u1f2a', '\u1f22'), ('\u1f2b', '\u1f23'), + ('\u1f2c', '\u1f24'), ('\u1f2d', '\u1f25'), + ('\u1f2e', '\u1f26'), ('\u1f2f', '\u1f27'), + ('\u1f38', '\u1f30'), ('\u1f39', '\u1f31'), + ('\u1f3a', '\u1f32'), ('\u1f3b', '\u1f33'), + ('\u1f3c', '\u1f34'), ('\u1f3d', '\u1f35'), + ('\u1f3e', '\u1f36'), ('\u1f3f', '\u1f37'), + ('\u1f48', '\u1f40'), ('\u1f49', '\u1f41'), + ('\u1f4a', '\u1f42'), ('\u1f4b', '\u1f43'), + ('\u1f4c', '\u1f44'), ('\u1f4d', '\u1f45'), + ('\u1f59', '\u1f51'), ('\u1f5b', '\u1f53'), + ('\u1f5d', '\u1f55'), ('\u1f5f', '\u1f57'), + ('\u1f68', '\u1f60'), ('\u1f69', '\u1f61'), + ('\u1f6a', '\u1f62'), ('\u1f6b', '\u1f63'), + ('\u1f6c', '\u1f64'), ('\u1f6d', '\u1f65'), + ('\u1f6e', '\u1f66'), ('\u1f6f', '\u1f67'), + ('\u1fb8', '\u1fb0'), ('\u1fb9', '\u1fb1'), + ('\u1fba', '\u1f70'), ('\u1fbb', '\u1f71'), + ('\u1fc8', '\u1f72'), ('\u1fc9', '\u1f73'), + ('\u1fca', '\u1f74'), ('\u1fcb', '\u1f75'), + ('\u1fd8', '\u1fd0'), ('\u1fd9', '\u1fd1'), + ('\u1fda', '\u1f76'), ('\u1fdb', '\u1f77'), + ('\u1fe8', '\u1fe0'), ('\u1fe9', '\u1fe1'), + ('\u1fea', '\u1f7a'), ('\u1feb', '\u1f7b'), + ('\u1fec', '\u1fe5'), ('\u1ff8', '\u1f78'), + ('\u1ff9', '\u1f79'), ('\u1ffa', '\u1f7c'), + ('\u1ffb', '\u1f7d'), ('\u2126', '\u03c9'), + ('\u212a', '\x6b'), ('\u212b', '\xe5'), + ('\u2132', '\u214e'), ('\u2183', '\u2184'), + ('\u2c00', '\u2c30'), ('\u2c01', '\u2c31'), + ('\u2c02', '\u2c32'), ('\u2c03', '\u2c33'), + ('\u2c04', '\u2c34'), ('\u2c05', '\u2c35'), + ('\u2c06', '\u2c36'), ('\u2c07', '\u2c37'), + ('\u2c08', '\u2c38'), ('\u2c09', '\u2c39'), + ('\u2c0a', '\u2c3a'), ('\u2c0b', '\u2c3b'), + ('\u2c0c', '\u2c3c'), ('\u2c0d', '\u2c3d'), + ('\u2c0e', '\u2c3e'), ('\u2c0f', '\u2c3f'), + ('\u2c10', '\u2c40'), ('\u2c11', '\u2c41'), + ('\u2c12', '\u2c42'), ('\u2c13', '\u2c43'), + ('\u2c14', '\u2c44'), ('\u2c15', '\u2c45'), + ('\u2c16', '\u2c46'), ('\u2c17', '\u2c47'), + ('\u2c18', '\u2c48'), ('\u2c19', '\u2c49'), + ('\u2c1a', '\u2c4a'), ('\u2c1b', '\u2c4b'), + ('\u2c1c', '\u2c4c'), ('\u2c1d', '\u2c4d'), + ('\u2c1e', '\u2c4e'), ('\u2c1f', '\u2c4f'), + ('\u2c20', '\u2c50'), ('\u2c21', '\u2c51'), + ('\u2c22', '\u2c52'), ('\u2c23', '\u2c53'), + ('\u2c24', '\u2c54'), ('\u2c25', '\u2c55'), + ('\u2c26', '\u2c56'), ('\u2c27', '\u2c57'), + ('\u2c28', '\u2c58'), ('\u2c29', '\u2c59'), + ('\u2c2a', '\u2c5a'), ('\u2c2b', '\u2c5b'), + ('\u2c2c', '\u2c5c'), ('\u2c2d', '\u2c5d'), + ('\u2c2e', '\u2c5e'), ('\u2c60', '\u2c61'), + ('\u2c62', '\u026b'), ('\u2c63', '\u1d7d'), + ('\u2c64', '\u027d'), ('\u2c67', '\u2c68'), + ('\u2c69', '\u2c6a'), ('\u2c6b', '\u2c6c'), + ('\u2c6d', '\u0251'), ('\u2c6e', '\u0271'), + ('\u2c6f', '\u0250'), ('\u2c70', '\u0252'), + ('\u2c72', '\u2c73'), ('\u2c75', '\u2c76'), + ('\u2c7e', '\u023f'), ('\u2c7f', '\u0240'), + ('\u2c80', '\u2c81'), ('\u2c82', '\u2c83'), + ('\u2c84', '\u2c85'), ('\u2c86', '\u2c87'), + ('\u2c88', '\u2c89'), ('\u2c8a', '\u2c8b'), + ('\u2c8c', '\u2c8d'), ('\u2c8e', '\u2c8f'), + ('\u2c90', '\u2c91'), ('\u2c92', '\u2c93'), + ('\u2c94', '\u2c95'), ('\u2c96', '\u2c97'), + ('\u2c98', '\u2c99'), ('\u2c9a', '\u2c9b'), + ('\u2c9c', '\u2c9d'), ('\u2c9e', '\u2c9f'), + ('\u2ca0', '\u2ca1'), ('\u2ca2', '\u2ca3'), + ('\u2ca4', '\u2ca5'), ('\u2ca6', '\u2ca7'), + ('\u2ca8', '\u2ca9'), ('\u2caa', '\u2cab'), + ('\u2cac', '\u2cad'), ('\u2cae', '\u2caf'), + ('\u2cb0', '\u2cb1'), ('\u2cb2', '\u2cb3'), + ('\u2cb4', '\u2cb5'), ('\u2cb6', '\u2cb7'), + ('\u2cb8', '\u2cb9'), ('\u2cba', '\u2cbb'), + ('\u2cbc', '\u2cbd'), ('\u2cbe', '\u2cbf'), + ('\u2cc0', '\u2cc1'), ('\u2cc2', '\u2cc3'), + ('\u2cc4', '\u2cc5'), ('\u2cc6', '\u2cc7'), + ('\u2cc8', '\u2cc9'), ('\u2cca', '\u2ccb'), + ('\u2ccc', '\u2ccd'), ('\u2cce', '\u2ccf'), + ('\u2cd0', '\u2cd1'), ('\u2cd2', '\u2cd3'), + ('\u2cd4', '\u2cd5'), ('\u2cd6', '\u2cd7'), + ('\u2cd8', '\u2cd9'), ('\u2cda', '\u2cdb'), + ('\u2cdc', '\u2cdd'), ('\u2cde', '\u2cdf'), + ('\u2ce0', '\u2ce1'), ('\u2ce2', '\u2ce3'), + ('\u2ceb', '\u2cec'), ('\u2ced', '\u2cee'), + ('\u2cf2', '\u2cf3'), ('\ua640', '\ua641'), + ('\ua642', '\ua643'), ('\ua644', '\ua645'), + ('\ua646', '\ua647'), ('\ua648', '\ua649'), + ('\ua64a', '\ua64b'), ('\ua64c', '\ua64d'), + ('\ua64e', '\ua64f'), ('\ua650', '\ua651'), + ('\ua652', '\ua653'), ('\ua654', '\ua655'), + ('\ua656', '\ua657'), ('\ua658', '\ua659'), + ('\ua65a', '\ua65b'), ('\ua65c', '\ua65d'), + ('\ua65e', '\ua65f'), ('\ua660', '\ua661'), + ('\ua662', '\ua663'), ('\ua664', '\ua665'), + ('\ua666', '\ua667'), ('\ua668', '\ua669'), + ('\ua66a', '\ua66b'), ('\ua66c', '\ua66d'), + ('\ua680', '\ua681'), ('\ua682', '\ua683'), + ('\ua684', '\ua685'), ('\ua686', '\ua687'), + ('\ua688', '\ua689'), ('\ua68a', '\ua68b'), + ('\ua68c', '\ua68d'), ('\ua68e', '\ua68f'), + ('\ua690', '\ua691'), ('\ua692', '\ua693'), + ('\ua694', '\ua695'), ('\ua696', '\ua697'), + ('\ua722', '\ua723'), ('\ua724', '\ua725'), + ('\ua726', '\ua727'), ('\ua728', '\ua729'), + ('\ua72a', '\ua72b'), ('\ua72c', '\ua72d'), + ('\ua72e', '\ua72f'), ('\ua732', '\ua733'), + ('\ua734', '\ua735'), ('\ua736', '\ua737'), + ('\ua738', '\ua739'), ('\ua73a', '\ua73b'), + ('\ua73c', '\ua73d'), ('\ua73e', '\ua73f'), + ('\ua740', '\ua741'), ('\ua742', '\ua743'), + ('\ua744', '\ua745'), ('\ua746', '\ua747'), + ('\ua748', '\ua749'), ('\ua74a', '\ua74b'), + ('\ua74c', '\ua74d'), ('\ua74e', '\ua74f'), + ('\ua750', '\ua751'), ('\ua752', '\ua753'), + ('\ua754', '\ua755'), ('\ua756', '\ua757'), + ('\ua758', '\ua759'), ('\ua75a', '\ua75b'), + ('\ua75c', '\ua75d'), ('\ua75e', '\ua75f'), + ('\ua760', '\ua761'), ('\ua762', '\ua763'), + ('\ua764', '\ua765'), ('\ua766', '\ua767'), + ('\ua768', '\ua769'), ('\ua76a', '\ua76b'), + ('\ua76c', '\ua76d'), ('\ua76e', '\ua76f'), + ('\ua779', '\ua77a'), ('\ua77b', '\ua77c'), + ('\ua77d', '\u1d79'), ('\ua77e', '\ua77f'), + ('\ua780', '\ua781'), ('\ua782', '\ua783'), + ('\ua784', '\ua785'), ('\ua786', '\ua787'), + ('\ua78b', '\ua78c'), ('\ua78d', '\u0265'), + ('\ua790', '\ua791'), ('\ua792', '\ua793'), + ('\ua7a0', '\ua7a1'), ('\ua7a2', '\ua7a3'), + ('\ua7a4', '\ua7a5'), ('\ua7a6', '\ua7a7'), + ('\ua7a8', '\ua7a9'), ('\ua7aa', '\u0266'), + ('\uff21', '\uff41'), ('\uff22', '\uff42'), + ('\uff23', '\uff43'), ('\uff24', '\uff44'), + ('\uff25', '\uff45'), ('\uff26', '\uff46'), + ('\uff27', '\uff47'), ('\uff28', '\uff48'), + ('\uff29', '\uff49'), ('\uff2a', '\uff4a'), + ('\uff2b', '\uff4b'), ('\uff2c', '\uff4c'), + ('\uff2d', '\uff4d'), ('\uff2e', '\uff4e'), + ('\uff2f', '\uff4f'), ('\uff30', '\uff50'), + ('\uff31', '\uff51'), ('\uff32', '\uff52'), + ('\uff33', '\uff53'), ('\uff34', '\uff54'), + ('\uff35', '\uff55'), ('\uff36', '\uff56'), + ('\uff37', '\uff57'), ('\uff38', '\uff58'), + ('\uff39', '\uff59'), ('\uff3a', '\uff5a'), + ('\U00010400', '\U00010428'), ('\U00010401', '\U00010429'), + ('\U00010402', '\U0001042a'), ('\U00010403', '\U0001042b'), + ('\U00010404', '\U0001042c'), ('\U00010405', '\U0001042d'), + ('\U00010406', '\U0001042e'), ('\U00010407', '\U0001042f'), + ('\U00010408', '\U00010430'), ('\U00010409', '\U00010431'), + ('\U0001040a', '\U00010432'), ('\U0001040b', '\U00010433'), + ('\U0001040c', '\U00010434'), ('\U0001040d', '\U00010435'), + ('\U0001040e', '\U00010436'), ('\U0001040f', '\U00010437'), + ('\U00010410', '\U00010438'), ('\U00010411', '\U00010439'), + ('\U00010412', '\U0001043a'), ('\U00010413', '\U0001043b'), + ('\U00010414', '\U0001043c'), ('\U00010415', '\U0001043d'), + ('\U00010416', '\U0001043e'), ('\U00010417', '\U0001043f'), + ('\U00010418', '\U00010440'), ('\U00010419', '\U00010441'), + ('\U0001041a', '\U00010442'), ('\U0001041b', '\U00010443'), + ('\U0001041c', '\U00010444'), ('\U0001041d', '\U00010445'), + ('\U0001041e', '\U00010446'), ('\U0001041f', '\U00010447'), + ('\U00010420', '\U00010448'), ('\U00010421', '\U00010449'), + ('\U00010422', '\U0001044a'), ('\U00010423', '\U0001044b'), + ('\U00010424', '\U0001044c'), ('\U00010425', '\U0001044d'), + ('\U00010426', '\U0001044e'), ('\U00010427', '\U0001044f') + ]; + + static LlLu_table : &'static [(char, char)] = &[ + ('\x61', '\x41'), ('\x62', '\x42'), + ('\x63', '\x43'), ('\x64', '\x44'), + ('\x65', '\x45'), ('\x66', '\x46'), + ('\x67', '\x47'), ('\x68', '\x48'), + ('\x69', '\x49'), ('\x6a', '\x4a'), + ('\x6b', '\x4b'), ('\x6c', '\x4c'), + ('\x6d', '\x4d'), ('\x6e', '\x4e'), + ('\x6f', '\x4f'), ('\x70', '\x50'), + ('\x71', '\x51'), ('\x72', '\x52'), + ('\x73', '\x53'), ('\x74', '\x54'), + ('\x75', '\x55'), ('\x76', '\x56'), + ('\x77', '\x57'), ('\x78', '\x58'), + ('\x79', '\x59'), ('\x7a', '\x5a'), + ('\xb5', '\u039c'), ('\xe0', '\xc0'), + ('\xe1', '\xc1'), ('\xe2', '\xc2'), + ('\xe3', '\xc3'), ('\xe4', '\xc4'), + ('\xe5', '\xc5'), ('\xe6', '\xc6'), + ('\xe7', '\xc7'), ('\xe8', '\xc8'), + ('\xe9', '\xc9'), ('\xea', '\xca'), + ('\xeb', '\xcb'), ('\xec', '\xcc'), + ('\xed', '\xcd'), ('\xee', '\xce'), + ('\xef', '\xcf'), ('\xf0', '\xd0'), + ('\xf1', '\xd1'), ('\xf2', '\xd2'), + ('\xf3', '\xd3'), ('\xf4', '\xd4'), + ('\xf5', '\xd5'), ('\xf6', '\xd6'), + ('\xf8', '\xd8'), ('\xf9', '\xd9'), + ('\xfa', '\xda'), ('\xfb', '\xdb'), + ('\xfc', '\xdc'), ('\xfd', '\xdd'), + ('\xfe', '\xde'), ('\xff', '\u0178'), + ('\u0101', '\u0100'), ('\u0103', '\u0102'), + ('\u0105', '\u0104'), ('\u0107', '\u0106'), + ('\u0109', '\u0108'), ('\u010b', '\u010a'), + ('\u010d', '\u010c'), ('\u010f', '\u010e'), + ('\u0111', '\u0110'), ('\u0113', '\u0112'), + ('\u0115', '\u0114'), ('\u0117', '\u0116'), + ('\u0119', '\u0118'), ('\u011b', '\u011a'), + ('\u011d', '\u011c'), ('\u011f', '\u011e'), + ('\u0121', '\u0120'), ('\u0123', '\u0122'), + ('\u0125', '\u0124'), ('\u0127', '\u0126'), + ('\u0129', '\u0128'), ('\u012b', '\u012a'), + ('\u012d', '\u012c'), ('\u012f', '\u012e'), + ('\u0131', '\x49'), ('\u0133', '\u0132'), + ('\u0135', '\u0134'), ('\u0137', '\u0136'), + ('\u013a', '\u0139'), ('\u013c', '\u013b'), + ('\u013e', '\u013d'), ('\u0140', '\u013f'), + ('\u0142', '\u0141'), ('\u0144', '\u0143'), + ('\u0146', '\u0145'), ('\u0148', '\u0147'), + ('\u014b', '\u014a'), ('\u014d', '\u014c'), + ('\u014f', '\u014e'), ('\u0151', '\u0150'), + ('\u0153', '\u0152'), ('\u0155', '\u0154'), + ('\u0157', '\u0156'), ('\u0159', '\u0158'), + ('\u015b', '\u015a'), ('\u015d', '\u015c'), + ('\u015f', '\u015e'), ('\u0161', '\u0160'), + ('\u0163', '\u0162'), ('\u0165', '\u0164'), + ('\u0167', '\u0166'), ('\u0169', '\u0168'), + ('\u016b', '\u016a'), ('\u016d', '\u016c'), + ('\u016f', '\u016e'), ('\u0171', '\u0170'), + ('\u0173', '\u0172'), ('\u0175', '\u0174'), + ('\u0177', '\u0176'), ('\u017a', '\u0179'), + ('\u017c', '\u017b'), ('\u017e', '\u017d'), + ('\u017f', '\x53'), ('\u0180', '\u0243'), + ('\u0183', '\u0182'), ('\u0185', '\u0184'), + ('\u0188', '\u0187'), ('\u018c', '\u018b'), + ('\u0192', '\u0191'), ('\u0195', '\u01f6'), + ('\u0199', '\u0198'), ('\u019a', '\u023d'), + ('\u019e', '\u0220'), ('\u01a1', '\u01a0'), + ('\u01a3', '\u01a2'), ('\u01a5', '\u01a4'), + ('\u01a8', '\u01a7'), ('\u01ad', '\u01ac'), + ('\u01b0', '\u01af'), ('\u01b4', '\u01b3'), + ('\u01b6', '\u01b5'), ('\u01b9', '\u01b8'), + ('\u01bd', '\u01bc'), ('\u01bf', '\u01f7'), + ('\u01c6', '\u01c4'), ('\u01c9', '\u01c7'), + ('\u01cc', '\u01ca'), ('\u01ce', '\u01cd'), + ('\u01d0', '\u01cf'), ('\u01d2', '\u01d1'), + ('\u01d4', '\u01d3'), ('\u01d6', '\u01d5'), + ('\u01d8', '\u01d7'), ('\u01da', '\u01d9'), + ('\u01dc', '\u01db'), ('\u01dd', '\u018e'), + ('\u01df', '\u01de'), ('\u01e1', '\u01e0'), + ('\u01e3', '\u01e2'), ('\u01e5', '\u01e4'), + ('\u01e7', '\u01e6'), ('\u01e9', '\u01e8'), + ('\u01eb', '\u01ea'), ('\u01ed', '\u01ec'), + ('\u01ef', '\u01ee'), ('\u01f3', '\u01f1'), + ('\u01f5', '\u01f4'), ('\u01f9', '\u01f8'), + ('\u01fb', '\u01fa'), ('\u01fd', '\u01fc'), + ('\u01ff', '\u01fe'), ('\u0201', '\u0200'), + ('\u0203', '\u0202'), ('\u0205', '\u0204'), + ('\u0207', '\u0206'), ('\u0209', '\u0208'), + ('\u020b', '\u020a'), ('\u020d', '\u020c'), + ('\u020f', '\u020e'), ('\u0211', '\u0210'), + ('\u0213', '\u0212'), ('\u0215', '\u0214'), + ('\u0217', '\u0216'), ('\u0219', '\u0218'), + ('\u021b', '\u021a'), ('\u021d', '\u021c'), + ('\u021f', '\u021e'), ('\u0223', '\u0222'), + ('\u0225', '\u0224'), ('\u0227', '\u0226'), + ('\u0229', '\u0228'), ('\u022b', '\u022a'), + ('\u022d', '\u022c'), ('\u022f', '\u022e'), + ('\u0231', '\u0230'), ('\u0233', '\u0232'), + ('\u023c', '\u023b'), ('\u023f', '\u2c7e'), + ('\u0240', '\u2c7f'), ('\u0242', '\u0241'), + ('\u0247', '\u0246'), ('\u0249', '\u0248'), + ('\u024b', '\u024a'), ('\u024d', '\u024c'), + ('\u024f', '\u024e'), ('\u0250', '\u2c6f'), + ('\u0251', '\u2c6d'), ('\u0252', '\u2c70'), + ('\u0253', '\u0181'), ('\u0254', '\u0186'), + ('\u0256', '\u0189'), ('\u0257', '\u018a'), + ('\u0259', '\u018f'), ('\u025b', '\u0190'), + ('\u0260', '\u0193'), ('\u0263', '\u0194'), + ('\u0265', '\ua78d'), ('\u0266', '\ua7aa'), + ('\u0268', '\u0197'), ('\u0269', '\u0196'), + ('\u026b', '\u2c62'), ('\u026f', '\u019c'), + ('\u0271', '\u2c6e'), ('\u0272', '\u019d'), + ('\u0275', '\u019f'), ('\u027d', '\u2c64'), + ('\u0280', '\u01a6'), ('\u0283', '\u01a9'), + ('\u0288', '\u01ae'), ('\u0289', '\u0244'), + ('\u028a', '\u01b1'), ('\u028b', '\u01b2'), + ('\u028c', '\u0245'), ('\u0292', '\u01b7'), + ('\u0371', '\u0370'), ('\u0373', '\u0372'), + ('\u0377', '\u0376'), ('\u037b', '\u03fd'), + ('\u037c', '\u03fe'), ('\u037d', '\u03ff'), + ('\u03ac', '\u0386'), ('\u03ad', '\u0388'), + ('\u03ae', '\u0389'), ('\u03af', '\u038a'), + ('\u03b1', '\u0391'), ('\u03b2', '\u0392'), + ('\u03b3', '\u0393'), ('\u03b4', '\u0394'), + ('\u03b5', '\u0395'), ('\u03b6', '\u0396'), + ('\u03b7', '\u0397'), ('\u03b8', '\u0398'), + ('\u03b9', '\u0399'), ('\u03ba', '\u039a'), + ('\u03bb', '\u039b'), ('\u03bc', '\u039c'), + ('\u03bd', '\u039d'), ('\u03be', '\u039e'), + ('\u03bf', '\u039f'), ('\u03c0', '\u03a0'), + ('\u03c1', '\u03a1'), ('\u03c2', '\u03a3'), + ('\u03c3', '\u03a3'), ('\u03c4', '\u03a4'), + ('\u03c5', '\u03a5'), ('\u03c6', '\u03a6'), + ('\u03c7', '\u03a7'), ('\u03c8', '\u03a8'), + ('\u03c9', '\u03a9'), ('\u03ca', '\u03aa'), + ('\u03cb', '\u03ab'), ('\u03cc', '\u038c'), + ('\u03cd', '\u038e'), ('\u03ce', '\u038f'), + ('\u03d0', '\u0392'), ('\u03d1', '\u0398'), + ('\u03d5', '\u03a6'), ('\u03d6', '\u03a0'), + ('\u03d7', '\u03cf'), ('\u03d9', '\u03d8'), + ('\u03db', '\u03da'), ('\u03dd', '\u03dc'), + ('\u03df', '\u03de'), ('\u03e1', '\u03e0'), + ('\u03e3', '\u03e2'), ('\u03e5', '\u03e4'), + ('\u03e7', '\u03e6'), ('\u03e9', '\u03e8'), + ('\u03eb', '\u03ea'), ('\u03ed', '\u03ec'), + ('\u03ef', '\u03ee'), ('\u03f0', '\u039a'), + ('\u03f1', '\u03a1'), ('\u03f2', '\u03f9'), + ('\u03f5', '\u0395'), ('\u03f8', '\u03f7'), + ('\u03fb', '\u03fa'), ('\u0430', '\u0410'), + ('\u0431', '\u0411'), ('\u0432', '\u0412'), + ('\u0433', '\u0413'), ('\u0434', '\u0414'), + ('\u0435', '\u0415'), ('\u0436', '\u0416'), + ('\u0437', '\u0417'), ('\u0438', '\u0418'), + ('\u0439', '\u0419'), ('\u043a', '\u041a'), + ('\u043b', '\u041b'), ('\u043c', '\u041c'), + ('\u043d', '\u041d'), ('\u043e', '\u041e'), + ('\u043f', '\u041f'), ('\u0440', '\u0420'), + ('\u0441', '\u0421'), ('\u0442', '\u0422'), + ('\u0443', '\u0423'), ('\u0444', '\u0424'), + ('\u0445', '\u0425'), ('\u0446', '\u0426'), + ('\u0447', '\u0427'), ('\u0448', '\u0428'), + ('\u0449', '\u0429'), ('\u044a', '\u042a'), + ('\u044b', '\u042b'), ('\u044c', '\u042c'), + ('\u044d', '\u042d'), ('\u044e', '\u042e'), + ('\u044f', '\u042f'), ('\u0450', '\u0400'), + ('\u0451', '\u0401'), ('\u0452', '\u0402'), + ('\u0453', '\u0403'), ('\u0454', '\u0404'), + ('\u0455', '\u0405'), ('\u0456', '\u0406'), + ('\u0457', '\u0407'), ('\u0458', '\u0408'), + ('\u0459', '\u0409'), ('\u045a', '\u040a'), + ('\u045b', '\u040b'), ('\u045c', '\u040c'), + ('\u045d', '\u040d'), ('\u045e', '\u040e'), + ('\u045f', '\u040f'), ('\u0461', '\u0460'), + ('\u0463', '\u0462'), ('\u0465', '\u0464'), + ('\u0467', '\u0466'), ('\u0469', '\u0468'), + ('\u046b', '\u046a'), ('\u046d', '\u046c'), + ('\u046f', '\u046e'), ('\u0471', '\u0470'), + ('\u0473', '\u0472'), ('\u0475', '\u0474'), + ('\u0477', '\u0476'), ('\u0479', '\u0478'), + ('\u047b', '\u047a'), ('\u047d', '\u047c'), + ('\u047f', '\u047e'), ('\u0481', '\u0480'), + ('\u048b', '\u048a'), ('\u048d', '\u048c'), + ('\u048f', '\u048e'), ('\u0491', '\u0490'), + ('\u0493', '\u0492'), ('\u0495', '\u0494'), + ('\u0497', '\u0496'), ('\u0499', '\u0498'), + ('\u049b', '\u049a'), ('\u049d', '\u049c'), + ('\u049f', '\u049e'), ('\u04a1', '\u04a0'), + ('\u04a3', '\u04a2'), ('\u04a5', '\u04a4'), + ('\u04a7', '\u04a6'), ('\u04a9', '\u04a8'), + ('\u04ab', '\u04aa'), ('\u04ad', '\u04ac'), + ('\u04af', '\u04ae'), ('\u04b1', '\u04b0'), + ('\u04b3', '\u04b2'), ('\u04b5', '\u04b4'), + ('\u04b7', '\u04b6'), ('\u04b9', '\u04b8'), + ('\u04bb', '\u04ba'), ('\u04bd', '\u04bc'), + ('\u04bf', '\u04be'), ('\u04c2', '\u04c1'), + ('\u04c4', '\u04c3'), ('\u04c6', '\u04c5'), + ('\u04c8', '\u04c7'), ('\u04ca', '\u04c9'), + ('\u04cc', '\u04cb'), ('\u04ce', '\u04cd'), + ('\u04cf', '\u04c0'), ('\u04d1', '\u04d0'), + ('\u04d3', '\u04d2'), ('\u04d5', '\u04d4'), + ('\u04d7', '\u04d6'), ('\u04d9', '\u04d8'), + ('\u04db', '\u04da'), ('\u04dd', '\u04dc'), + ('\u04df', '\u04de'), ('\u04e1', '\u04e0'), + ('\u04e3', '\u04e2'), ('\u04e5', '\u04e4'), + ('\u04e7', '\u04e6'), ('\u04e9', '\u04e8'), + ('\u04eb', '\u04ea'), ('\u04ed', '\u04ec'), + ('\u04ef', '\u04ee'), ('\u04f1', '\u04f0'), + ('\u04f3', '\u04f2'), ('\u04f5', '\u04f4'), + ('\u04f7', '\u04f6'), ('\u04f9', '\u04f8'), + ('\u04fb', '\u04fa'), ('\u04fd', '\u04fc'), + ('\u04ff', '\u04fe'), ('\u0501', '\u0500'), + ('\u0503', '\u0502'), ('\u0505', '\u0504'), + ('\u0507', '\u0506'), ('\u0509', '\u0508'), + ('\u050b', '\u050a'), ('\u050d', '\u050c'), + ('\u050f', '\u050e'), ('\u0511', '\u0510'), + ('\u0513', '\u0512'), ('\u0515', '\u0514'), + ('\u0517', '\u0516'), ('\u0519', '\u0518'), + ('\u051b', '\u051a'), ('\u051d', '\u051c'), + ('\u051f', '\u051e'), ('\u0521', '\u0520'), + ('\u0523', '\u0522'), ('\u0525', '\u0524'), + ('\u0527', '\u0526'), ('\u0561', '\u0531'), + ('\u0562', '\u0532'), ('\u0563', '\u0533'), + ('\u0564', '\u0534'), ('\u0565', '\u0535'), + ('\u0566', '\u0536'), ('\u0567', '\u0537'), + ('\u0568', '\u0538'), ('\u0569', '\u0539'), + ('\u056a', '\u053a'), ('\u056b', '\u053b'), + ('\u056c', '\u053c'), ('\u056d', '\u053d'), + ('\u056e', '\u053e'), ('\u056f', '\u053f'), + ('\u0570', '\u0540'), ('\u0571', '\u0541'), + ('\u0572', '\u0542'), ('\u0573', '\u0543'), + ('\u0574', '\u0544'), ('\u0575', '\u0545'), + ('\u0576', '\u0546'), ('\u0577', '\u0547'), + ('\u0578', '\u0548'), ('\u0579', '\u0549'), + ('\u057a', '\u054a'), ('\u057b', '\u054b'), + ('\u057c', '\u054c'), ('\u057d', '\u054d'), + ('\u057e', '\u054e'), ('\u057f', '\u054f'), + ('\u0580', '\u0550'), ('\u0581', '\u0551'), + ('\u0582', '\u0552'), ('\u0583', '\u0553'), + ('\u0584', '\u0554'), ('\u0585', '\u0555'), + ('\u0586', '\u0556'), ('\u1d79', '\ua77d'), + ('\u1d7d', '\u2c63'), ('\u1e01', '\u1e00'), + ('\u1e03', '\u1e02'), ('\u1e05', '\u1e04'), + ('\u1e07', '\u1e06'), ('\u1e09', '\u1e08'), + ('\u1e0b', '\u1e0a'), ('\u1e0d', '\u1e0c'), + ('\u1e0f', '\u1e0e'), ('\u1e11', '\u1e10'), + ('\u1e13', '\u1e12'), ('\u1e15', '\u1e14'), + ('\u1e17', '\u1e16'), ('\u1e19', '\u1e18'), + ('\u1e1b', '\u1e1a'), ('\u1e1d', '\u1e1c'), + ('\u1e1f', '\u1e1e'), ('\u1e21', '\u1e20'), + ('\u1e23', '\u1e22'), ('\u1e25', '\u1e24'), + ('\u1e27', '\u1e26'), ('\u1e29', '\u1e28'), + ('\u1e2b', '\u1e2a'), ('\u1e2d', '\u1e2c'), + ('\u1e2f', '\u1e2e'), ('\u1e31', '\u1e30'), + ('\u1e33', '\u1e32'), ('\u1e35', '\u1e34'), + ('\u1e37', '\u1e36'), ('\u1e39', '\u1e38'), + ('\u1e3b', '\u1e3a'), ('\u1e3d', '\u1e3c'), + ('\u1e3f', '\u1e3e'), ('\u1e41', '\u1e40'), + ('\u1e43', '\u1e42'), ('\u1e45', '\u1e44'), + ('\u1e47', '\u1e46'), ('\u1e49', '\u1e48'), + ('\u1e4b', '\u1e4a'), ('\u1e4d', '\u1e4c'), + ('\u1e4f', '\u1e4e'), ('\u1e51', '\u1e50'), + ('\u1e53', '\u1e52'), ('\u1e55', '\u1e54'), + ('\u1e57', '\u1e56'), ('\u1e59', '\u1e58'), + ('\u1e5b', '\u1e5a'), ('\u1e5d', '\u1e5c'), + ('\u1e5f', '\u1e5e'), ('\u1e61', '\u1e60'), + ('\u1e63', '\u1e62'), ('\u1e65', '\u1e64'), + ('\u1e67', '\u1e66'), ('\u1e69', '\u1e68'), + ('\u1e6b', '\u1e6a'), ('\u1e6d', '\u1e6c'), + ('\u1e6f', '\u1e6e'), ('\u1e71', '\u1e70'), + ('\u1e73', '\u1e72'), ('\u1e75', '\u1e74'), + ('\u1e77', '\u1e76'), ('\u1e79', '\u1e78'), + ('\u1e7b', '\u1e7a'), ('\u1e7d', '\u1e7c'), + ('\u1e7f', '\u1e7e'), ('\u1e81', '\u1e80'), + ('\u1e83', '\u1e82'), ('\u1e85', '\u1e84'), + ('\u1e87', '\u1e86'), ('\u1e89', '\u1e88'), + ('\u1e8b', '\u1e8a'), ('\u1e8d', '\u1e8c'), + ('\u1e8f', '\u1e8e'), ('\u1e91', '\u1e90'), + ('\u1e93', '\u1e92'), ('\u1e95', '\u1e94'), + ('\u1e9b', '\u1e60'), ('\u1ea1', '\u1ea0'), + ('\u1ea3', '\u1ea2'), ('\u1ea5', '\u1ea4'), + ('\u1ea7', '\u1ea6'), ('\u1ea9', '\u1ea8'), + ('\u1eab', '\u1eaa'), ('\u1ead', '\u1eac'), + ('\u1eaf', '\u1eae'), ('\u1eb1', '\u1eb0'), + ('\u1eb3', '\u1eb2'), ('\u1eb5', '\u1eb4'), + ('\u1eb7', '\u1eb6'), ('\u1eb9', '\u1eb8'), + ('\u1ebb', '\u1eba'), ('\u1ebd', '\u1ebc'), + ('\u1ebf', '\u1ebe'), ('\u1ec1', '\u1ec0'), + ('\u1ec3', '\u1ec2'), ('\u1ec5', '\u1ec4'), + ('\u1ec7', '\u1ec6'), ('\u1ec9', '\u1ec8'), + ('\u1ecb', '\u1eca'), ('\u1ecd', '\u1ecc'), + ('\u1ecf', '\u1ece'), ('\u1ed1', '\u1ed0'), + ('\u1ed3', '\u1ed2'), ('\u1ed5', '\u1ed4'), + ('\u1ed7', '\u1ed6'), ('\u1ed9', '\u1ed8'), + ('\u1edb', '\u1eda'), ('\u1edd', '\u1edc'), + ('\u1edf', '\u1ede'), ('\u1ee1', '\u1ee0'), + ('\u1ee3', '\u1ee2'), ('\u1ee5', '\u1ee4'), + ('\u1ee7', '\u1ee6'), ('\u1ee9', '\u1ee8'), + ('\u1eeb', '\u1eea'), ('\u1eed', '\u1eec'), + ('\u1eef', '\u1eee'), ('\u1ef1', '\u1ef0'), + ('\u1ef3', '\u1ef2'), ('\u1ef5', '\u1ef4'), + ('\u1ef7', '\u1ef6'), ('\u1ef9', '\u1ef8'), + ('\u1efb', '\u1efa'), ('\u1efd', '\u1efc'), + ('\u1eff', '\u1efe'), ('\u1f00', '\u1f08'), + ('\u1f01', '\u1f09'), ('\u1f02', '\u1f0a'), + ('\u1f03', '\u1f0b'), ('\u1f04', '\u1f0c'), + ('\u1f05', '\u1f0d'), ('\u1f06', '\u1f0e'), + ('\u1f07', '\u1f0f'), ('\u1f10', '\u1f18'), + ('\u1f11', '\u1f19'), ('\u1f12', '\u1f1a'), + ('\u1f13', '\u1f1b'), ('\u1f14', '\u1f1c'), + ('\u1f15', '\u1f1d'), ('\u1f20', '\u1f28'), + ('\u1f21', '\u1f29'), ('\u1f22', '\u1f2a'), + ('\u1f23', '\u1f2b'), ('\u1f24', '\u1f2c'), + ('\u1f25', '\u1f2d'), ('\u1f26', '\u1f2e'), + ('\u1f27', '\u1f2f'), ('\u1f30', '\u1f38'), + ('\u1f31', '\u1f39'), ('\u1f32', '\u1f3a'), + ('\u1f33', '\u1f3b'), ('\u1f34', '\u1f3c'), + ('\u1f35', '\u1f3d'), ('\u1f36', '\u1f3e'), + ('\u1f37', '\u1f3f'), ('\u1f40', '\u1f48'), + ('\u1f41', '\u1f49'), ('\u1f42', '\u1f4a'), + ('\u1f43', '\u1f4b'), ('\u1f44', '\u1f4c'), + ('\u1f45', '\u1f4d'), ('\u1f51', '\u1f59'), + ('\u1f53', '\u1f5b'), ('\u1f55', '\u1f5d'), + ('\u1f57', '\u1f5f'), ('\u1f60', '\u1f68'), + ('\u1f61', '\u1f69'), ('\u1f62', '\u1f6a'), + ('\u1f63', '\u1f6b'), ('\u1f64', '\u1f6c'), + ('\u1f65', '\u1f6d'), ('\u1f66', '\u1f6e'), + ('\u1f67', '\u1f6f'), ('\u1f70', '\u1fba'), + ('\u1f71', '\u1fbb'), ('\u1f72', '\u1fc8'), + ('\u1f73', '\u1fc9'), ('\u1f74', '\u1fca'), + ('\u1f75', '\u1fcb'), ('\u1f76', '\u1fda'), + ('\u1f77', '\u1fdb'), ('\u1f78', '\u1ff8'), + ('\u1f79', '\u1ff9'), ('\u1f7a', '\u1fea'), + ('\u1f7b', '\u1feb'), ('\u1f7c', '\u1ffa'), + ('\u1f7d', '\u1ffb'), ('\u1f80', '\u1f88'), + ('\u1f81', '\u1f89'), ('\u1f82', '\u1f8a'), + ('\u1f83', '\u1f8b'), ('\u1f84', '\u1f8c'), + ('\u1f85', '\u1f8d'), ('\u1f86', '\u1f8e'), + ('\u1f87', '\u1f8f'), ('\u1f90', '\u1f98'), + ('\u1f91', '\u1f99'), ('\u1f92', '\u1f9a'), + ('\u1f93', '\u1f9b'), ('\u1f94', '\u1f9c'), + ('\u1f95', '\u1f9d'), ('\u1f96', '\u1f9e'), + ('\u1f97', '\u1f9f'), ('\u1fa0', '\u1fa8'), + ('\u1fa1', '\u1fa9'), ('\u1fa2', '\u1faa'), + ('\u1fa3', '\u1fab'), ('\u1fa4', '\u1fac'), + ('\u1fa5', '\u1fad'), ('\u1fa6', '\u1fae'), + ('\u1fa7', '\u1faf'), ('\u1fb0', '\u1fb8'), + ('\u1fb1', '\u1fb9'), ('\u1fb3', '\u1fbc'), + ('\u1fbe', '\u0399'), ('\u1fc3', '\u1fcc'), + ('\u1fd0', '\u1fd8'), ('\u1fd1', '\u1fd9'), + ('\u1fe0', '\u1fe8'), ('\u1fe1', '\u1fe9'), + ('\u1fe5', '\u1fec'), ('\u1ff3', '\u1ffc'), + ('\u214e', '\u2132'), ('\u2184', '\u2183'), + ('\u2c30', '\u2c00'), ('\u2c31', '\u2c01'), + ('\u2c32', '\u2c02'), ('\u2c33', '\u2c03'), + ('\u2c34', '\u2c04'), ('\u2c35', '\u2c05'), + ('\u2c36', '\u2c06'), ('\u2c37', '\u2c07'), + ('\u2c38', '\u2c08'), ('\u2c39', '\u2c09'), + ('\u2c3a', '\u2c0a'), ('\u2c3b', '\u2c0b'), + ('\u2c3c', '\u2c0c'), ('\u2c3d', '\u2c0d'), + ('\u2c3e', '\u2c0e'), ('\u2c3f', '\u2c0f'), + ('\u2c40', '\u2c10'), ('\u2c41', '\u2c11'), + ('\u2c42', '\u2c12'), ('\u2c43', '\u2c13'), + ('\u2c44', '\u2c14'), ('\u2c45', '\u2c15'), + ('\u2c46', '\u2c16'), ('\u2c47', '\u2c17'), + ('\u2c48', '\u2c18'), ('\u2c49', '\u2c19'), + ('\u2c4a', '\u2c1a'), ('\u2c4b', '\u2c1b'), + ('\u2c4c', '\u2c1c'), ('\u2c4d', '\u2c1d'), + ('\u2c4e', '\u2c1e'), ('\u2c4f', '\u2c1f'), + ('\u2c50', '\u2c20'), ('\u2c51', '\u2c21'), + ('\u2c52', '\u2c22'), ('\u2c53', '\u2c23'), + ('\u2c54', '\u2c24'), ('\u2c55', '\u2c25'), + ('\u2c56', '\u2c26'), ('\u2c57', '\u2c27'), + ('\u2c58', '\u2c28'), ('\u2c59', '\u2c29'), + ('\u2c5a', '\u2c2a'), ('\u2c5b', '\u2c2b'), + ('\u2c5c', '\u2c2c'), ('\u2c5d', '\u2c2d'), + ('\u2c5e', '\u2c2e'), ('\u2c61', '\u2c60'), + ('\u2c65', '\u023a'), ('\u2c66', '\u023e'), + ('\u2c68', '\u2c67'), ('\u2c6a', '\u2c69'), + ('\u2c6c', '\u2c6b'), ('\u2c73', '\u2c72'), + ('\u2c76', '\u2c75'), ('\u2c81', '\u2c80'), + ('\u2c83', '\u2c82'), ('\u2c85', '\u2c84'), + ('\u2c87', '\u2c86'), ('\u2c89', '\u2c88'), + ('\u2c8b', '\u2c8a'), ('\u2c8d', '\u2c8c'), + ('\u2c8f', '\u2c8e'), ('\u2c91', '\u2c90'), + ('\u2c93', '\u2c92'), ('\u2c95', '\u2c94'), + ('\u2c97', '\u2c96'), ('\u2c99', '\u2c98'), + ('\u2c9b', '\u2c9a'), ('\u2c9d', '\u2c9c'), + ('\u2c9f', '\u2c9e'), ('\u2ca1', '\u2ca0'), + ('\u2ca3', '\u2ca2'), ('\u2ca5', '\u2ca4'), + ('\u2ca7', '\u2ca6'), ('\u2ca9', '\u2ca8'), + ('\u2cab', '\u2caa'), ('\u2cad', '\u2cac'), + ('\u2caf', '\u2cae'), ('\u2cb1', '\u2cb0'), + ('\u2cb3', '\u2cb2'), ('\u2cb5', '\u2cb4'), + ('\u2cb7', '\u2cb6'), ('\u2cb9', '\u2cb8'), + ('\u2cbb', '\u2cba'), ('\u2cbd', '\u2cbc'), + ('\u2cbf', '\u2cbe'), ('\u2cc1', '\u2cc0'), + ('\u2cc3', '\u2cc2'), ('\u2cc5', '\u2cc4'), + ('\u2cc7', '\u2cc6'), ('\u2cc9', '\u2cc8'), + ('\u2ccb', '\u2cca'), ('\u2ccd', '\u2ccc'), + ('\u2ccf', '\u2cce'), ('\u2cd1', '\u2cd0'), + ('\u2cd3', '\u2cd2'), ('\u2cd5', '\u2cd4'), + ('\u2cd7', '\u2cd6'), ('\u2cd9', '\u2cd8'), + ('\u2cdb', '\u2cda'), ('\u2cdd', '\u2cdc'), + ('\u2cdf', '\u2cde'), ('\u2ce1', '\u2ce0'), + ('\u2ce3', '\u2ce2'), ('\u2cec', '\u2ceb'), + ('\u2cee', '\u2ced'), ('\u2cf3', '\u2cf2'), + ('\u2d00', '\u10a0'), ('\u2d01', '\u10a1'), + ('\u2d02', '\u10a2'), ('\u2d03', '\u10a3'), + ('\u2d04', '\u10a4'), ('\u2d05', '\u10a5'), + ('\u2d06', '\u10a6'), ('\u2d07', '\u10a7'), + ('\u2d08', '\u10a8'), ('\u2d09', '\u10a9'), + ('\u2d0a', '\u10aa'), ('\u2d0b', '\u10ab'), + ('\u2d0c', '\u10ac'), ('\u2d0d', '\u10ad'), + ('\u2d0e', '\u10ae'), ('\u2d0f', '\u10af'), + ('\u2d10', '\u10b0'), ('\u2d11', '\u10b1'), + ('\u2d12', '\u10b2'), ('\u2d13', '\u10b3'), + ('\u2d14', '\u10b4'), ('\u2d15', '\u10b5'), + ('\u2d16', '\u10b6'), ('\u2d17', '\u10b7'), + ('\u2d18', '\u10b8'), ('\u2d19', '\u10b9'), + ('\u2d1a', '\u10ba'), ('\u2d1b', '\u10bb'), + ('\u2d1c', '\u10bc'), ('\u2d1d', '\u10bd'), + ('\u2d1e', '\u10be'), ('\u2d1f', '\u10bf'), + ('\u2d20', '\u10c0'), ('\u2d21', '\u10c1'), + ('\u2d22', '\u10c2'), ('\u2d23', '\u10c3'), + ('\u2d24', '\u10c4'), ('\u2d25', '\u10c5'), + ('\u2d27', '\u10c7'), ('\u2d2d', '\u10cd'), + ('\ua641', '\ua640'), ('\ua643', '\ua642'), + ('\ua645', '\ua644'), ('\ua647', '\ua646'), + ('\ua649', '\ua648'), ('\ua64b', '\ua64a'), + ('\ua64d', '\ua64c'), ('\ua64f', '\ua64e'), + ('\ua651', '\ua650'), ('\ua653', '\ua652'), + ('\ua655', '\ua654'), ('\ua657', '\ua656'), + ('\ua659', '\ua658'), ('\ua65b', '\ua65a'), + ('\ua65d', '\ua65c'), ('\ua65f', '\ua65e'), + ('\ua661', '\ua660'), ('\ua663', '\ua662'), + ('\ua665', '\ua664'), ('\ua667', '\ua666'), + ('\ua669', '\ua668'), ('\ua66b', '\ua66a'), + ('\ua66d', '\ua66c'), ('\ua681', '\ua680'), + ('\ua683', '\ua682'), ('\ua685', '\ua684'), + ('\ua687', '\ua686'), ('\ua689', '\ua688'), + ('\ua68b', '\ua68a'), ('\ua68d', '\ua68c'), + ('\ua68f', '\ua68e'), ('\ua691', '\ua690'), + ('\ua693', '\ua692'), ('\ua695', '\ua694'), + ('\ua697', '\ua696'), ('\ua723', '\ua722'), + ('\ua725', '\ua724'), ('\ua727', '\ua726'), + ('\ua729', '\ua728'), ('\ua72b', '\ua72a'), + ('\ua72d', '\ua72c'), ('\ua72f', '\ua72e'), + ('\ua733', '\ua732'), ('\ua735', '\ua734'), + ('\ua737', '\ua736'), ('\ua739', '\ua738'), + ('\ua73b', '\ua73a'), ('\ua73d', '\ua73c'), + ('\ua73f', '\ua73e'), ('\ua741', '\ua740'), + ('\ua743', '\ua742'), ('\ua745', '\ua744'), + ('\ua747', '\ua746'), ('\ua749', '\ua748'), + ('\ua74b', '\ua74a'), ('\ua74d', '\ua74c'), + ('\ua74f', '\ua74e'), ('\ua751', '\ua750'), + ('\ua753', '\ua752'), ('\ua755', '\ua754'), + ('\ua757', '\ua756'), ('\ua759', '\ua758'), + ('\ua75b', '\ua75a'), ('\ua75d', '\ua75c'), + ('\ua75f', '\ua75e'), ('\ua761', '\ua760'), + ('\ua763', '\ua762'), ('\ua765', '\ua764'), + ('\ua767', '\ua766'), ('\ua769', '\ua768'), + ('\ua76b', '\ua76a'), ('\ua76d', '\ua76c'), + ('\ua76f', '\ua76e'), ('\ua77a', '\ua779'), + ('\ua77c', '\ua77b'), ('\ua77f', '\ua77e'), + ('\ua781', '\ua780'), ('\ua783', '\ua782'), + ('\ua785', '\ua784'), ('\ua787', '\ua786'), + ('\ua78c', '\ua78b'), ('\ua791', '\ua790'), + ('\ua793', '\ua792'), ('\ua7a1', '\ua7a0'), + ('\ua7a3', '\ua7a2'), ('\ua7a5', '\ua7a4'), + ('\ua7a7', '\ua7a6'), ('\ua7a9', '\ua7a8'), + ('\uff41', '\uff21'), ('\uff42', '\uff22'), + ('\uff43', '\uff23'), ('\uff44', '\uff24'), + ('\uff45', '\uff25'), ('\uff46', '\uff26'), + ('\uff47', '\uff27'), ('\uff48', '\uff28'), + ('\uff49', '\uff29'), ('\uff4a', '\uff2a'), + ('\uff4b', '\uff2b'), ('\uff4c', '\uff2c'), + ('\uff4d', '\uff2d'), ('\uff4e', '\uff2e'), + ('\uff4f', '\uff2f'), ('\uff50', '\uff30'), + ('\uff51', '\uff31'), ('\uff52', '\uff32'), + ('\uff53', '\uff33'), ('\uff54', '\uff34'), + ('\uff55', '\uff35'), ('\uff56', '\uff36'), + ('\uff57', '\uff37'), ('\uff58', '\uff38'), + ('\uff59', '\uff39'), ('\uff5a', '\uff3a'), + ('\U00010428', '\U00010400'), ('\U00010429', '\U00010401'), + ('\U0001042a', '\U00010402'), ('\U0001042b', '\U00010403'), + ('\U0001042c', '\U00010404'), ('\U0001042d', '\U00010405'), + ('\U0001042e', '\U00010406'), ('\U0001042f', '\U00010407'), + ('\U00010430', '\U00010408'), ('\U00010431', '\U00010409'), + ('\U00010432', '\U0001040a'), ('\U00010433', '\U0001040b'), + ('\U00010434', '\U0001040c'), ('\U00010435', '\U0001040d'), + ('\U00010436', '\U0001040e'), ('\U00010437', '\U0001040f'), + ('\U00010438', '\U00010410'), ('\U00010439', '\U00010411'), + ('\U0001043a', '\U00010412'), ('\U0001043b', '\U00010413'), + ('\U0001043c', '\U00010414'), ('\U0001043d', '\U00010415'), + ('\U0001043e', '\U00010416'), ('\U0001043f', '\U00010417'), + ('\U00010440', '\U00010418'), ('\U00010441', '\U00010419'), + ('\U00010442', '\U0001041a'), ('\U00010443', '\U0001041b'), + ('\U00010444', '\U0001041c'), ('\U00010445', '\U0001041d'), + ('\U00010446', '\U0001041e'), ('\U00010447', '\U0001041f'), + ('\U00010448', '\U00010420'), ('\U00010449', '\U00010421'), + ('\U0001044a', '\U00010422'), ('\U0001044b', '\U00010423'), + ('\U0001044c', '\U00010424'), ('\U0001044d', '\U00010425'), + ('\U0001044e', '\U00010426'), ('\U0001044f', '\U00010427') + ]; + +} diff --git a/src/libstd/unit.rs b/src/libcore/unit.rs similarity index 90% rename from src/libstd/unit.rs rename to src/libcore/unit.rs index 38307f415ac..f55cb2d2236 100644 --- a/src/libstd/unit.rs +++ b/src/libcore/unit.rs @@ -14,7 +14,6 @@ use default::Default; #[cfg(not(test))] use cmp::{Eq, Equal, Ord, Ordering, TotalEq, TotalOrd}; -use fmt; #[cfg(not(test))] impl Eq for () { @@ -44,9 +43,3 @@ impl Default for () { #[inline] fn default() -> () { () } } - -impl fmt::Show for () { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - f.pad("()") - } -} diff --git a/src/libserialize/json.rs b/src/libserialize/json.rs index d1fe04bccf8..29315c45810 100644 --- a/src/libserialize/json.rs +++ b/src/libserialize/json.rs @@ -1398,7 +1398,6 @@ impl> Parser { 'n' => res.push_char('\n'), 'r' => res.push_char('\r'), 't' => res.push_char('\t'), -//<<<<<<< HEAD 'u' => match try!(self.decode_hex_escape()) { 0xDC00 .. 0xDFFF => return self.error(LoneLeadingSurrogateInHexEscape), diff --git a/src/libstd/comm/mod.rs b/src/libstd/comm/mod.rs index bd1def518f0..df0c6f3b8d3 100644 --- a/src/libstd/comm/mod.rs +++ b/src/libstd/comm/mod.rs @@ -981,7 +981,6 @@ mod test { use native; use os; - use owned::Box; use super::*; pub fn stress_factor() -> uint { @@ -1516,7 +1515,6 @@ mod test { mod sync_tests { use prelude::*; use os; - use owned::Box; pub fn stress_factor() -> uint { match os::getenv("RUST_TEST_STRESS") { diff --git a/src/libstd/fmt/mod.rs b/src/libstd/fmt/mod.rs index 38456e195e3..74ab874d319 100644 --- a/src/libstd/fmt/mod.rs +++ b/src/libstd/fmt/mod.rs @@ -485,20 +485,25 @@ will look like `"\\{"`. use any; use cast; +use cell::Cell; use char::Char; +use cmp; use container::Container; use io::MemWriter; use io; +use iter; use iter::{Iterator, range}; +use kinds::Copy; use num::Signed; -use option::{Option,Some,None}; +use option::{Option, Some, None}; use owned::Box; use repr; -use result::{Ok, Err}; -use str::StrSlice; +use result::{Ok, Err, ResultUnwrap}; +use str::{StrSlice, StrAllocating, UTF16Item, ScalarValue, LoneSurrogate}; use str; use slice::{Vector, ImmutableVector}; use slice; +use intrinsics::TypeId; pub use self::num::radix; pub use self::num::Radix; @@ -1241,5 +1246,144 @@ impl Show for *mut T { fn fmt(&self, f: &mut Formatter) -> Result { secret_pointer(self, f) } } +macro_rules! peel(($name:ident, $($other:ident,)*) => (tuple!($($other,)*))) + +macro_rules! tuple ( + () => (); + ( $($name:ident,)+ ) => ( + impl<$($name:Show),*> Show for ($($name,)*) { + #[allow(uppercase_variables, dead_assignment)] + fn fmt(&self, f: &mut Formatter) -> Result { + try!(write!(f.buf, "(")); + let ($(ref $name,)*) = *self; + let mut n = 0; + $( + if n > 0 { + try!(write!(f.buf, ", ")); + } + try!(write!(f.buf, "{}", *$name)); + n += 1; + )* + if n == 1 { + try!(write!(f.buf, ",")); + } + write!(f.buf, ")") + } + } + peel!($($name,)*) + ) +) + +tuple! { T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, } + +impl Show for Box { + fn fmt(&self, f: &mut Formatter) -> Result { f.pad("Box") } +} + +impl<'a> Show for &'a any::Any { + fn fmt(&self, f: &mut Formatter) -> Result { f.pad("&Any") } +} + +impl Show for Option { + fn fmt(&self, f: &mut Formatter) -> Result { + match *self { + Some(ref t) => write!(f.buf, "Some({})", *t), + None => write!(f.buf, "None"), + } + } +} + +impl Show for ::result::Result { + fn fmt(&self, f: &mut Formatter) -> Result { + match *self { + Ok(ref t) => write!(f.buf, "Ok({})", *t), + Err(ref t) => write!(f.buf, "Err({})", *t), + } + } +} + +impl<'a, T: Show> Show for &'a [T] { + fn fmt(&self, f: &mut Formatter) -> Result { + if f.flags & (1 << (parse::FlagAlternate as uint)) == 0 { + try!(write!(f.buf, "[")); + } + let mut is_first = true; + for x in self.iter() { + if is_first { + is_first = false; + } else { + try!(write!(f.buf, ", ")); + } + try!(write!(f.buf, "{}", *x)) + } + if f.flags & (1 << (parse::FlagAlternate as uint)) == 0 { + try!(write!(f.buf, "]")); + } + Ok(()) + } +} + +impl<'a, T: Show> Show for &'a mut [T] { + fn fmt(&self, f: &mut Formatter) -> Result { + secret_show(&self.as_slice(), f) + } +} + +impl Show for ~[T] { + fn fmt(&self, f: &mut Formatter) -> Result { + secret_show(&self.as_slice(), f) + } +} + +impl Show for () { + fn fmt(&self, f: &mut Formatter) -> Result { + f.pad("()") + } +} + +impl Show for TypeId { + fn fmt(&self, f: &mut Formatter) -> Result { + write!(f.buf, "TypeId \\{ {} \\}", self.hash()) + } +} + +impl Show for iter::MinMaxResult { + fn fmt(&self, f: &mut Formatter) -> Result { + match *self { + iter::NoElements => + write!(f.buf, "NoElements"), + iter::OneElement(ref t) => + write!(f.buf, "OneElement({})", *t), + iter::MinMax(ref t1, ref t2) => + write!(f.buf, "MinMax({}, {})", *t1, *t2), + } + } +} + +impl Show for cmp::Ordering { + fn fmt(&self, f: &mut Formatter) -> Result { + match *self { + cmp::Less => write!(f.buf, "Less"), + cmp::Greater => write!(f.buf, "Greater"), + cmp::Equal => write!(f.buf, "Equal"), + } + } +} + +impl Show for Cell { + fn fmt(&self, f: &mut Formatter) -> Result { + write!(f.buf, r"Cell \{ value: {} \}", self.get()) + } +} + +impl Show for UTF16Item { + fn fmt(&self, f: &mut Formatter) -> Result { + match *self { + ScalarValue(c) => write!(f.buf, "ScalarValue({})", c), + LoneSurrogate(u) => write!(f.buf, "LoneSurrogate({})", u), + } + } +} + // If you expected tests to be here, look instead at the run-pass/ifmt.rs test, // it's a lot easier than creating all of the rt::Piece structures here. diff --git a/src/libstd/fmt/num.rs b/src/libstd/fmt/num.rs index 2032a2a6b58..839b7407e55 100644 --- a/src/libstd/fmt/num.rs +++ b/src/libstd/fmt/num.rs @@ -194,7 +194,7 @@ mod tests { use fmt::radix; use super::{Binary, Octal, Decimal, LowerHex, UpperHex}; use super::{GenericRadix, Radix}; - use str::StrSlice; + use str::StrAllocating; #[test] fn test_radix_base() { @@ -400,6 +400,7 @@ mod bench { use super::test::Bencher; use fmt::radix; use rand::{XorShiftRng, Rng}; + use realstd::result::ResultUnwrap; #[bench] fn format_bin(b: &mut Bencher) { @@ -436,6 +437,7 @@ mod bench { use super::test::Bencher; use fmt::radix; use rand::{XorShiftRng, Rng}; + use realstd::result::ResultUnwrap; #[bench] fn format_bin(b: &mut Bencher) { diff --git a/src/libstd/from_str.rs b/src/libstd/from_str.rs index 289a5f11c4f..62bb8e4d969 100644 --- a/src/libstd/from_str.rs +++ b/src/libstd/from_str.rs @@ -10,7 +10,7 @@ //! The `FromStr` trait for types that can be created from strings -use option::Option; +use option::{Option, Some, None}; /// A trait to abstract the idea of creating a new instance of a type from a /// string. @@ -24,3 +24,37 @@ pub trait FromStr { pub fn from_str(s: &str) -> Option { FromStr::from_str(s) } + +impl FromStr for bool { + /// Parse a `bool` from a string. + /// + /// Yields an `Option`, because `s` may or may not actually be parseable. + /// + /// # Examples + /// + /// ```rust + /// assert_eq!(from_str::("true"), Some(true)); + /// assert_eq!(from_str::("false"), Some(false)); + /// assert_eq!(from_str::("not even a boolean"), None); + /// ``` + #[inline] + fn from_str(s: &str) -> Option { + match s { + "true" => Some(true), + "false" => Some(false), + _ => None, + } + } +} + +#[cfg(test)] +mod test { + use prelude::*; + + #[test] + fn test_bool_from_str() { + assert_eq!(from_str::("true"), Some(true)); + assert_eq!(from_str::("false"), Some(false)); + assert_eq!(from_str::("not even a boolean"), None); + } +} diff --git a/src/libstd/gc.rs b/src/libstd/gc.rs index 7387eff3dfc..9260d8d7ab2 100644 --- a/src/libstd/gc.rs +++ b/src/libstd/gc.rs @@ -20,7 +20,6 @@ collector is task-local so `Gc` is not sendable. use kinds::marker; use clone::Clone; -use managed; /// Immutable garbage-collected pointer type #[lang="gc"] @@ -55,7 +54,7 @@ impl Gc { /// Determine if two garbage-collected boxes point to the same object #[inline] pub fn ptr_eq(&self, other: &Gc) -> bool { - managed::ptr_eq(self.ptr, other.ptr) + self.borrow() as *T == other.borrow() as *T } } diff --git a/src/libstd/hash/mod.rs b/src/libstd/hash/mod.rs index 748cf0eeed9..c8207a4c37c 100644 --- a/src/libstd/hash/mod.rs +++ b/src/libstd/hash/mod.rs @@ -64,13 +64,15 @@ #![allow(unused_must_use)] use container::Container; +use intrinsics::TypeId; use io::Writer; use iter::Iterator; use option::{Option, Some, None}; use owned::Box; use rc::Rc; -use str::{Str, StrSlice}; +use result::{Result, Ok, Err}; use slice::{Vector, ImmutableVector}; +use str::{Str, StrSlice}; use vec::Vec; /// Reexport the `sip::hash` function as our default hasher. @@ -284,6 +286,23 @@ impl Hash for *mut T { } } +impl Hash for TypeId { + #[inline] + fn hash(&self, state: &mut S) { + self.hash().hash(state) + } +} + +impl, U: Hash> Hash for Result { + #[inline] + fn hash(&self, state: &mut S) { + match *self { + Ok(ref t) => { 1u.hash(state); t.hash(state); } + Err(ref t) => { 2u.hash(state); t.hash(state); } + } + } +} + ////////////////////////////////////////////////////////////////////////////// #[cfg(test)] diff --git a/src/libstd/hash/sip.rs b/src/libstd/hash/sip.rs index 3c1d5897e38..58e0f4c717d 100644 --- a/src/libstd/hash/sip.rs +++ b/src/libstd/hash/sip.rs @@ -362,7 +362,7 @@ mod tests { use prelude::*; use num::ToStrRadix; use option::{Some, None}; - use str::{Str,StrSlice}; + use str::Str; use strbuf::StrBuf; use slice::{Vector, ImmutableVector}; use self::test::Bencher; diff --git a/src/libstd/io/buffered.rs b/src/libstd/io/buffered.rs index 298e9df6d68..a8e7b324bd7 100644 --- a/src/libstd/io/buffered.rs +++ b/src/libstd/io/buffered.rs @@ -16,7 +16,7 @@ use io::{Reader, Writer, Stream, Buffer, DEFAULT_BUF_SIZE, IoResult}; use iter::ExactSize; use ops::Drop; use option::{Some, None, Option}; -use result::{Ok, Err}; +use result::{Ok, Err, ResultUnwrap}; use slice::{ImmutableVector, MutableVector}; use slice; use vec::Vec; diff --git a/src/libstd/io/fs.rs b/src/libstd/io/fs.rs index 3f66ecd5db3..125b4ddad88 100644 --- a/src/libstd/io/fs.rs +++ b/src/libstd/io/fs.rs @@ -1335,7 +1335,7 @@ mod test { use rand::{StdRng, Rng}; let mut bytes = [0, ..1024]; - StdRng::new().unwrap().fill_bytes(bytes); + StdRng::new().ok().unwrap().fill_bytes(bytes); let tmpdir = tmpdir(); diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index 59a8c6f3439..cd069ddc1ea 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -230,7 +230,7 @@ use option::{Option, Some, None}; use owned::Box; use path::Path; use result::{Ok, Err, Result}; -use str::StrSlice; +use str::{StrSlice, StrAllocating}; use str; use uint; use unstable::finally::try_finally; diff --git a/src/libstd/io/net/udp.rs b/src/libstd/io/net/udp.rs index b5b0cf7bede..b7636493dec 100644 --- a/src/libstd/io/net/udp.rs +++ b/src/libstd/io/net/udp.rs @@ -358,6 +358,8 @@ mod test { }) pub fn socket_name(addr: SocketAddr) { + use result::ResultUnwrap; + let server = UdpSocket::bind(addr); assert!(server.is_ok()); diff --git a/src/libstd/io/process.rs b/src/libstd/io/process.rs index 1471a049bf3..74f6944f102 100644 --- a/src/libstd/io/process.rs +++ b/src/libstd/io/process.rs @@ -428,7 +428,6 @@ impl Drop for Process { mod tests { use io::process::{ProcessConfig, Process}; use prelude::*; - use str::StrSlice; // FIXME(#10380) these tests should not all be ignored on android. diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs index 613e9f027a4..69ba0fb20ee 100644 --- a/src/libstd/io/stdio.rs +++ b/src/libstd/io/stdio.rs @@ -36,7 +36,7 @@ use mem::replace; use option::{Option, Some, None}; use owned::Box; use prelude::drop; -use result::{Ok, Err}; +use result::{Ok, Err, ResultUnwrap}; use rt; use rt::local::Local; use rt::rtio::{DontClose, IoFactory, LocalIo, RtioFileStream, RtioTTY}; diff --git a/src/libstd/io/tempfile.rs b/src/libstd/io/tempfile.rs index 4ff1c7faaec..8c28caa988a 100644 --- a/src/libstd/io/tempfile.rs +++ b/src/libstd/io/tempfile.rs @@ -18,7 +18,7 @@ use ops::Drop; use option::{Option, None, Some}; use os; use path::{Path, GenericPath}; -use result::{Ok, Err}; +use result::{Ok, Err, ResultUnwrap}; use sync::atomics; /// A wrapper for a path to temporary directory implementing automatic diff --git a/src/libstd/io/timer.rs b/src/libstd/io/timer.rs index 96c4083e7ed..5565918ef85 100644 --- a/src/libstd/io/timer.rs +++ b/src/libstd/io/timer.rs @@ -21,6 +21,7 @@ use comm::Receiver; use io::IoResult; use kinds::Send; use owned::Box; +use option::Expect; use rt::rtio::{IoFactory, LocalIo, RtioTimer}; /// A synchronous timer object diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index bf24bf405a0..72d41ae1dd2 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -122,8 +122,8 @@ // Make and rand accessible for benchmarking/testcases #[cfg(test)] extern crate rand; -// we wrap some libc stuff extern crate libc; +extern crate core; // Make std testable by not duplicating lang items. See #2912 #[cfg(test)] extern crate realstd = "std"; @@ -133,6 +133,27 @@ extern crate libc; #[cfg(test)] pub use ty = realstd::ty; #[cfg(test)] pub use owned = realstd::owned; +#[cfg(not(test))] pub use cmp = core::cmp; +#[cfg(not(test))] pub use kinds = core::kinds; +#[cfg(not(test))] pub use ops = core::ops; +#[cfg(not(test))] pub use owned = core::owned; +#[cfg(not(test))] pub use ty = core::ty; + +pub use core::any; +pub use core::bool; +pub use core::cast; +pub use core::cell; +pub use core::char; +pub use core::clone; +pub use core::container; +pub use core::default; +pub use core::intrinsics; +pub use core::iter; +pub use core::mem; +pub use core::ptr; +pub use core::raw; +pub use core::tuple; + // Run tests with libgreen instead of libnative. // // FIXME: This egregiously hacks around starting the test runner in a different @@ -176,11 +197,6 @@ pub mod prelude; #[path = "num/f32.rs"] pub mod f32; #[path = "num/f64.rs"] pub mod f64; -pub mod unit; -pub mod bool; -pub mod char; -pub mod tuple; - pub mod slice; pub mod vec; pub mod str; @@ -188,40 +204,20 @@ pub mod strbuf; pub mod ascii; -pub mod ptr; -mod managed; -mod reference; pub mod rc; pub mod gc; - -/* Core language traits */ - -#[cfg(not(test))] pub mod kinds; -#[cfg(not(test))] pub mod ops; -#[cfg(not(test))] pub mod cmp; -#[cfg(not(test))] pub mod ty; -#[cfg(not(test))] pub mod owned; - - /* Common traits */ pub mod from_str; pub mod num; -pub mod iter; pub mod to_str; -pub mod clone; pub mod hash; -pub mod container; -pub mod default; -pub mod any; /* Common data structures */ -pub mod option; pub mod result; -pub mod cell; - +pub mod option; /* Tasks and communication */ @@ -238,11 +234,8 @@ pub mod c_vec; pub mod os; pub mod io; pub mod path; -pub mod cast; pub mod fmt; pub mod cleanup; -pub mod mem; - /* Unsupported interfaces */ @@ -254,10 +247,6 @@ pub mod reflect; // Private APIs #[unstable] pub mod unstable; -#[experimental] -pub mod intrinsics; -#[experimental] -pub mod raw; /* For internal use, not exported */ diff --git a/src/libstd/local_data.rs b/src/libstd/local_data.rs index 9a029de8d6c..da738a387b2 100644 --- a/src/libstd/local_data.rs +++ b/src/libstd/local_data.rs @@ -357,7 +357,6 @@ mod tests { use super::*; use owned::Box; use task; - use str::StrSlice; #[test] fn test_tls_multitask() { diff --git a/src/libstd/managed.rs b/src/libstd/managed.rs deleted file mode 100644 index bf73c05440c..00000000000 --- a/src/libstd/managed.rs +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright 2012 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! Operations on managed box types - -#[cfg(not(test))] use cmp::*; - -/// Determine if two shared boxes point to the same object -#[inline] -pub fn ptr_eq(a: @T, b: @T) -> bool { - &*a as *T == &*b as *T -} - -#[cfg(not(test))] -impl Eq for @T { - #[inline] - fn eq(&self, other: &@T) -> bool { *(*self) == *(*other) } - #[inline] - fn ne(&self, other: &@T) -> bool { *(*self) != *(*other) } -} - -#[cfg(not(test))] -impl Ord for @T { - #[inline] - fn lt(&self, other: &@T) -> bool { *(*self) < *(*other) } - #[inline] - fn le(&self, other: &@T) -> bool { *(*self) <= *(*other) } - #[inline] - fn ge(&self, other: &@T) -> bool { *(*self) >= *(*other) } - #[inline] - fn gt(&self, other: &@T) -> bool { *(*self) > *(*other) } -} - -#[cfg(not(test))] -impl TotalOrd for @T { - #[inline] - fn cmp(&self, other: &@T) -> Ordering { (**self).cmp(*other) } -} - -#[cfg(not(test))] -impl TotalEq for @T {} - -#[test] -fn test() { - let x = @3; - let y = @3; - assert!((ptr_eq::(x, x))); - assert!((ptr_eq::(y, y))); - assert!((!ptr_eq::(x, y))); - assert!((!ptr_eq::(y, x))); -} diff --git a/src/libstd/num/f32.rs b/src/libstd/num/f32.rs index 672de0bf9e5..ea248b6d40d 100644 --- a/src/libstd/num/f32.rs +++ b/src/libstd/num/f32.rs @@ -16,14 +16,18 @@ use prelude::*; use cast; -use default::Default; use from_str::FromStr; -use libc::{c_int}; +use libc::c_int; use num::{FPCategory, FPNaN, FPInfinite , FPZero, FPSubnormal, FPNormal}; -use num::{Zero, One, Bounded, strconv}; +use num::strconv; use num; use intrinsics; +pub use core::f32::{RADIX, MANTISSA_DIGITS, DIGITS, EPSILON, MIN_VALUE}; +pub use core::f32::{MIN_POS_VALUE, MAX_VALUE, MIN_EXP, MAX_EXP, MIN_10_EXP}; +pub use core::f32::{MAX_10_EXP, NAN, INFINITY, NEG_INFINITY}; +pub use core::f32::consts; + #[allow(dead_code)] mod cmath { use libc::{c_float, c_int}; @@ -65,214 +69,6 @@ mod cmath { } } -pub static RADIX: uint = 2u; - -pub static MANTISSA_DIGITS: uint = 24u; -pub static DIGITS: uint = 6u; - -pub static EPSILON: f32 = 1.19209290e-07_f32; - -/// Smallest finite f32 value -pub static MIN_VALUE: f32 = -3.40282347e+38_f32; -/// Smallest positive, normalized f32 value -pub static MIN_POS_VALUE: f32 = 1.17549435e-38_f32; -/// Largest finite f32 value -pub static MAX_VALUE: f32 = 3.40282347e+38_f32; - -pub static MIN_EXP: int = -125; -pub static MAX_EXP: int = 128; - -pub static MIN_10_EXP: int = -37; -pub static MAX_10_EXP: int = 38; - -pub static NAN: f32 = 0.0_f32/0.0_f32; -pub static INFINITY: f32 = 1.0_f32/0.0_f32; -pub static NEG_INFINITY: f32 = -1.0_f32/0.0_f32; - -/// Various useful constants. -pub mod consts { - // FIXME: replace with mathematical constants from cmath. - - // FIXME(#5527): These constants should be deprecated once associated - // constants are implemented in favour of referencing the respective members - // of `Float`. - - /// Archimedes' constant - pub static PI: f32 = 3.14159265358979323846264338327950288_f32; - - /// pi * 2.0 - pub static PI_2: f32 = 6.28318530717958647692528676655900576_f32; - - /// pi/2.0 - pub static FRAC_PI_2: f32 = 1.57079632679489661923132169163975144_f32; - - /// pi/3.0 - pub static FRAC_PI_3: f32 = 1.04719755119659774615421446109316763_f32; - - /// pi/4.0 - pub static FRAC_PI_4: f32 = 0.785398163397448309615660845819875721_f32; - - /// pi/6.0 - pub static FRAC_PI_6: f32 = 0.52359877559829887307710723054658381_f32; - - /// pi/8.0 - pub static FRAC_PI_8: f32 = 0.39269908169872415480783042290993786_f32; - - /// 1.0/pi - pub static FRAC_1_PI: f32 = 0.318309886183790671537767526745028724_f32; - - /// 2.0/pi - pub static FRAC_2_PI: f32 = 0.636619772367581343075535053490057448_f32; - - /// 2.0/sqrt(pi) - pub static FRAC_2_SQRTPI: f32 = 1.12837916709551257389615890312154517_f32; - - /// sqrt(2.0) - pub static SQRT2: f32 = 1.41421356237309504880168872420969808_f32; - - /// 1.0/sqrt(2.0) - pub static FRAC_1_SQRT2: f32 = 0.707106781186547524400844362104849039_f32; - - /// Euler's number - pub static E: f32 = 2.71828182845904523536028747135266250_f32; - - /// log2(e) - pub static LOG2_E: f32 = 1.44269504088896340735992468100189214_f32; - - /// log10(e) - pub static LOG10_E: f32 = 0.434294481903251827651128918916605082_f32; - - /// ln(2.0) - pub static LN_2: f32 = 0.693147180559945309417232121458176568_f32; - - /// ln(10.0) - pub static LN_10: f32 = 2.30258509299404568401799145468436421_f32; -} - -impl Num for f32 {} - -#[cfg(not(test))] -impl Eq for f32 { - #[inline] - fn eq(&self, other: &f32) -> bool { (*self) == (*other) } -} - -#[cfg(not(test))] -impl Ord for f32 { - #[inline] - fn lt(&self, other: &f32) -> bool { (*self) < (*other) } - #[inline] - fn le(&self, other: &f32) -> bool { (*self) <= (*other) } - #[inline] - fn ge(&self, other: &f32) -> bool { (*self) >= (*other) } - #[inline] - fn gt(&self, other: &f32) -> bool { (*self) > (*other) } -} - -impl Default for f32 { - #[inline] - fn default() -> f32 { 0.0 } -} - -impl Zero for f32 { - #[inline] - fn zero() -> f32 { 0.0 } - - /// Returns true if the number is equal to either `0.0` or `-0.0` - #[inline] - fn is_zero(&self) -> bool { *self == 0.0 || *self == -0.0 } -} - -impl One for f32 { - #[inline] - fn one() -> f32 { 1.0 } -} - -#[cfg(not(test))] -impl Add for f32 { - #[inline] - fn add(&self, other: &f32) -> f32 { *self + *other } -} - -#[cfg(not(test))] -impl Sub for f32 { - #[inline] - fn sub(&self, other: &f32) -> f32 { *self - *other } -} - -#[cfg(not(test))] -impl Mul for f32 { - #[inline] - fn mul(&self, other: &f32) -> f32 { *self * *other } -} - -#[cfg(not(test))] -impl Div for f32 { - #[inline] - fn div(&self, other: &f32) -> f32 { *self / *other } -} - -#[cfg(not(test))] -impl Rem for f32 { - #[inline] - fn rem(&self, other: &f32) -> f32 { - unsafe { cmath::fmodf(*self, *other) } - } -} - -#[cfg(not(test))] -impl Neg for f32 { - #[inline] - fn neg(&self) -> f32 { -*self } -} - -impl Signed for f32 { - /// Computes the absolute value. Returns `NAN` if the number is `NAN`. - #[inline] - fn abs(&self) -> f32 { - unsafe { intrinsics::fabsf32(*self) } - } - - /// The positive difference of two numbers. Returns `0.0` if the number is - /// less than or equal to `other`, otherwise the difference between`self` - /// and `other` is returned. - #[inline] - fn abs_sub(&self, other: &f32) -> f32 { - unsafe { cmath::fdimf(*self, *other) } - } - - /// # Returns - /// - /// - `1.0` if the number is positive, `+0.0` or `INFINITY` - /// - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY` - /// - `NAN` if the number is NaN - #[inline] - fn signum(&self) -> f32 { - if self.is_nan() { NAN } else { - unsafe { intrinsics::copysignf32(1.0, *self) } - } - } - - /// Returns `true` if the number is positive, including `+0.0` and `INFINITY` - #[inline] - fn is_positive(&self) -> bool { *self > 0.0 || (1.0 / *self) == INFINITY } - - /// Returns `true` if the number is negative, including `-0.0` and `NEG_INFINITY` - #[inline] - fn is_negative(&self) -> bool { *self < 0.0 || (1.0 / *self) == NEG_INFINITY } -} - -impl Bounded for f32 { - // NOTE: this is the smallest non-infinite f32 value, *not* MIN_VALUE - #[inline] - fn min_value() -> f32 { -MAX_VALUE } - - #[inline] - fn max_value() -> f32 { MAX_VALUE } -} - -impl Primitive for f32 {} - impl Float for f32 { #[inline] fn nan() -> f32 { NAN } diff --git a/src/libstd/num/f64.rs b/src/libstd/num/f64.rs index 6523ac9e8a4..77171a00bef 100644 --- a/src/libstd/num/f64.rs +++ b/src/libstd/num/f64.rs @@ -15,14 +15,18 @@ use prelude::*; use cast; -use default::Default; use from_str::FromStr; use libc::{c_int}; use num::{FPCategory, FPNaN, FPInfinite , FPZero, FPSubnormal, FPNormal}; -use num::{Zero, One, Bounded, strconv}; +use num::{strconv}; use num; use intrinsics; +pub use core::f64::{RADIX, MANTISSA_DIGITS, DIGITS, EPSILON, MIN_VALUE}; +pub use core::f64::{MIN_POS_VALUE, MAX_VALUE, MIN_EXP, MAX_EXP, MIN_10_EXP}; +pub use core::f64::{MAX_10_EXP, NAN, INFINITY, NEG_INFINITY}; +pub use core::f64::consts; + #[allow(dead_code)] mod cmath { use libc::{c_double, c_int}; @@ -73,214 +77,6 @@ mod cmath { } } -// FIXME(#5527): These constants should be deprecated once associated -// constants are implemented in favour of referencing the respective -// members of `Bounded` and `Float`. - -pub static RADIX: uint = 2u; - -pub static MANTISSA_DIGITS: uint = 53u; -pub static DIGITS: uint = 15u; - -pub static EPSILON: f64 = 2.2204460492503131e-16_f64; - -/// Smallest finite f64 value -pub static MIN_VALUE: f64 = -1.7976931348623157e+308_f64; -/// Smallest positive, normalized f64 value -pub static MIN_POS_VALUE: f64 = 2.2250738585072014e-308_f64; -/// Largest finite f64 value -pub static MAX_VALUE: f64 = 1.7976931348623157e+308_f64; - -pub static MIN_EXP: int = -1021; -pub static MAX_EXP: int = 1024; - -pub static MIN_10_EXP: int = -307; -pub static MAX_10_EXP: int = 308; - -pub static NAN: f64 = 0.0_f64/0.0_f64; - -pub static INFINITY: f64 = 1.0_f64/0.0_f64; - -pub static NEG_INFINITY: f64 = -1.0_f64/0.0_f64; - -/// Various useful constants. -pub mod consts { - // FIXME: replace with mathematical constants from cmath. - - // FIXME(#5527): These constants should be deprecated once associated - // constants are implemented in favour of referencing the respective members - // of `Float`. - - /// Archimedes' constant - pub static PI: f64 = 3.14159265358979323846264338327950288_f64; - - /// pi * 2.0 - pub static PI_2: f64 = 6.28318530717958647692528676655900576_f64; - - /// pi/2.0 - pub static FRAC_PI_2: f64 = 1.57079632679489661923132169163975144_f64; - - /// pi/3.0 - pub static FRAC_PI_3: f64 = 1.04719755119659774615421446109316763_f64; - - /// pi/4.0 - pub static FRAC_PI_4: f64 = 0.785398163397448309615660845819875721_f64; - - /// pi/6.0 - pub static FRAC_PI_6: f64 = 0.52359877559829887307710723054658381_f64; - - /// pi/8.0 - pub static FRAC_PI_8: f64 = 0.39269908169872415480783042290993786_f64; - - /// 1.0/pi - pub static FRAC_1_PI: f64 = 0.318309886183790671537767526745028724_f64; - - /// 2.0/pi - pub static FRAC_2_PI: f64 = 0.636619772367581343075535053490057448_f64; - - /// 2.0/sqrt(pi) - pub static FRAC_2_SQRTPI: f64 = 1.12837916709551257389615890312154517_f64; - - /// sqrt(2.0) - pub static SQRT2: f64 = 1.41421356237309504880168872420969808_f64; - - /// 1.0/sqrt(2.0) - pub static FRAC_1_SQRT2: f64 = 0.707106781186547524400844362104849039_f64; - - /// Euler's number - pub static E: f64 = 2.71828182845904523536028747135266250_f64; - - /// log2(e) - pub static LOG2_E: f64 = 1.44269504088896340735992468100189214_f64; - - /// log10(e) - pub static LOG10_E: f64 = 0.434294481903251827651128918916605082_f64; - - /// ln(2.0) - pub static LN_2: f64 = 0.693147180559945309417232121458176568_f64; - - /// ln(10.0) - pub static LN_10: f64 = 2.30258509299404568401799145468436421_f64; -} - -impl Num for f64 {} - -#[cfg(not(test))] -impl Eq for f64 { - #[inline] - fn eq(&self, other: &f64) -> bool { (*self) == (*other) } -} - -#[cfg(not(test))] -impl Ord for f64 { - #[inline] - fn lt(&self, other: &f64) -> bool { (*self) < (*other) } - #[inline] - fn le(&self, other: &f64) -> bool { (*self) <= (*other) } - #[inline] - fn ge(&self, other: &f64) -> bool { (*self) >= (*other) } - #[inline] - fn gt(&self, other: &f64) -> bool { (*self) > (*other) } -} - -impl Default for f64 { - #[inline] - fn default() -> f64 { 0.0 } -} - -impl Zero for f64 { - #[inline] - fn zero() -> f64 { 0.0 } - - /// Returns true if the number is equal to either `0.0` or `-0.0` - #[inline] - fn is_zero(&self) -> bool { *self == 0.0 || *self == -0.0 } -} - -impl One for f64 { - #[inline] - fn one() -> f64 { 1.0 } -} - -#[cfg(not(test))] -impl Add for f64 { - #[inline] - fn add(&self, other: &f64) -> f64 { *self + *other } -} -#[cfg(not(test))] -impl Sub for f64 { - #[inline] - fn sub(&self, other: &f64) -> f64 { *self - *other } -} -#[cfg(not(test))] -impl Mul for f64 { - #[inline] - fn mul(&self, other: &f64) -> f64 { *self * *other } -} -#[cfg(not(test))] -impl Div for f64 { - #[inline] - fn div(&self, other: &f64) -> f64 { *self / *other } -} -#[cfg(not(test))] -impl Rem for f64 { - #[inline] - fn rem(&self, other: &f64) -> f64 { - unsafe { cmath::fmod(*self, *other) } - } -} -#[cfg(not(test))] -impl Neg for f64 { - #[inline] - fn neg(&self) -> f64 { -*self } -} - -impl Signed for f64 { - /// Computes the absolute value. Returns `NAN` if the number is `NAN`. - #[inline] - fn abs(&self) -> f64 { - unsafe { intrinsics::fabsf64(*self) } - } - - /// The positive difference of two numbers. Returns `0.0` if the number is less than or - /// equal to `other`, otherwise the difference between`self` and `other` is returned. - #[inline] - fn abs_sub(&self, other: &f64) -> f64 { - unsafe { cmath::fdim(*self, *other) } - } - - /// # Returns - /// - /// - `1.0` if the number is positive, `+0.0` or `INFINITY` - /// - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY` - /// - `NAN` if the number is NaN - #[inline] - fn signum(&self) -> f64 { - if self.is_nan() { NAN } else { - unsafe { intrinsics::copysignf64(1.0, *self) } - } - } - - /// Returns `true` if the number is positive, including `+0.0` and `INFINITY` - #[inline] - fn is_positive(&self) -> bool { *self > 0.0 || (1.0 / *self) == INFINITY } - - /// Returns `true` if the number is negative, including `-0.0` and `NEG_INFINITY` - #[inline] - fn is_negative(&self) -> bool { *self < 0.0 || (1.0 / *self) == NEG_INFINITY } -} - -impl Bounded for f64 { - // NOTE: this is the smallest non-infinite f32 value, *not* MIN_VALUE - #[inline] - fn min_value() -> f64 { -MAX_VALUE } - - #[inline] - fn max_value() -> f64 { MAX_VALUE } -} - -impl Primitive for f64 {} - impl Float for f64 { #[inline] fn nan() -> f64 { NAN } diff --git a/src/libstd/num/i16.rs b/src/libstd/num/i16.rs index 79827421f92..4bd2ba07634 100644 --- a/src/libstd/num/i16.rs +++ b/src/libstd/num/i16.rs @@ -10,63 +10,14 @@ //! Operations and constants for signed 16-bits integers (`i16` type) -#![allow(non_uppercase_statics)] - -use prelude::*; - -use default::Default; use from_str::FromStr; -use num::{Bitwise, Bounded, CheckedAdd, CheckedSub, CheckedMul}; -use num::{CheckedDiv, Zero, One, strconv}; +use iter::Iterator; use num::{ToStrRadix, FromStrRadix}; -use option::{Option, Some, None}; +use num::strconv; +use option::Option; +use slice::{ImmutableVector, OwnedVector}; use str; -use intrinsics; -int_module!(i16, 16) +pub use core::i16::{BITS, BYTES, MIN, MAX}; -impl Bitwise for i16 { - /// Returns the number of ones in the binary representation of the number. - #[inline] - fn count_ones(&self) -> i16 { unsafe { intrinsics::ctpop16(*self as u16) as i16 } } - - /// Returns the number of leading zeros in the in the binary representation - /// of the number. - #[inline] - fn leading_zeros(&self) -> i16 { unsafe { intrinsics::ctlz16(*self as u16) as i16 } } - - /// Returns the number of trailing zeros in the in the binary representation - /// of the number. - #[inline] - fn trailing_zeros(&self) -> i16 { unsafe { intrinsics::cttz16(*self as u16) as i16 } } -} - -impl CheckedAdd for i16 { - #[inline] - fn checked_add(&self, v: &i16) -> Option { - unsafe { - let (x, y) = intrinsics::i16_add_with_overflow(*self, *v); - if y { None } else { Some(x) } - } - } -} - -impl CheckedSub for i16 { - #[inline] - fn checked_sub(&self, v: &i16) -> Option { - unsafe { - let (x, y) = intrinsics::i16_sub_with_overflow(*self, *v); - if y { None } else { Some(x) } - } - } -} - -impl CheckedMul for i16 { - #[inline] - fn checked_mul(&self, v: &i16) -> Option { - unsafe { - let (x, y) = intrinsics::i16_mul_with_overflow(*self, *v); - if y { None } else { Some(x) } - } - } -} +int_module!(i16) diff --git a/src/libstd/num/i32.rs b/src/libstd/num/i32.rs index 97f03299b87..3c3acfae3c0 100644 --- a/src/libstd/num/i32.rs +++ b/src/libstd/num/i32.rs @@ -10,63 +10,14 @@ //! Operations and constants for signed 32-bits integers (`i32` type) -#![allow(non_uppercase_statics)] - -use prelude::*; - -use default::Default; use from_str::FromStr; -use num::{Bitwise, Bounded, CheckedAdd, CheckedSub, CheckedMul}; -use num::{CheckedDiv, Zero, One, strconv}; +use iter::Iterator; use num::{ToStrRadix, FromStrRadix}; -use option::{Option, Some, None}; +use num::strconv; +use option::Option; +use slice::{ImmutableVector, OwnedVector}; use str; -use intrinsics; -int_module!(i32, 32) +pub use core::i32::{BITS, BYTES, MIN, MAX}; -impl Bitwise for i32 { - /// Returns the number of ones in the binary representation of the number. - #[inline] - fn count_ones(&self) -> i32 { unsafe { intrinsics::ctpop32(*self as u32) as i32 } } - - /// Returns the number of leading zeros in the in the binary representation - /// of the number. - #[inline] - fn leading_zeros(&self) -> i32 { unsafe { intrinsics::ctlz32(*self as u32) as i32 } } - - /// Returns the number of trailing zeros in the in the binary representation - /// of the number. - #[inline] - fn trailing_zeros(&self) -> i32 { unsafe { intrinsics::cttz32(*self as u32) as i32 } } -} - -impl CheckedAdd for i32 { - #[inline] - fn checked_add(&self, v: &i32) -> Option { - unsafe { - let (x, y) = intrinsics::i32_add_with_overflow(*self, *v); - if y { None } else { Some(x) } - } - } -} - -impl CheckedSub for i32 { - #[inline] - fn checked_sub(&self, v: &i32) -> Option { - unsafe { - let (x, y) = intrinsics::i32_sub_with_overflow(*self, *v); - if y { None } else { Some(x) } - } - } -} - -impl CheckedMul for i32 { - #[inline] - fn checked_mul(&self, v: &i32) -> Option { - unsafe { - let (x, y) = intrinsics::i32_mul_with_overflow(*self, *v); - if y { None } else { Some(x) } - } - } -} +int_module!(i32) diff --git a/src/libstd/num/i64.rs b/src/libstd/num/i64.rs index 00823aa22c2..ad0fe1c08ef 100644 --- a/src/libstd/num/i64.rs +++ b/src/libstd/num/i64.rs @@ -10,64 +10,14 @@ //! Operations and constants for signed 64-bits integers (`i64` type) -#![allow(non_uppercase_statics)] - -use prelude::*; - -use default::Default; use from_str::FromStr; -#[cfg(target_word_size = "64")] -use num::CheckedMul; -use num::{Bitwise, Bounded, CheckedAdd, CheckedSub}; -use num::{CheckedDiv, Zero, One, strconv}; +use iter::Iterator; use num::{ToStrRadix, FromStrRadix}; -use option::{Option, Some, None}; +use num::strconv; +use option::Option; +use slice::{ImmutableVector, OwnedVector}; use str; -use intrinsics; -int_module!(i64, 64) +pub use core::i64::{BITS, BYTES, MIN, MAX}; -impl Bitwise for i64 { - /// Returns the number of ones in the binary representation of the number. - #[inline] - fn count_ones(&self) -> i64 { unsafe { intrinsics::ctpop64(*self as u64) as i64 } } - - /// Returns the number of leading zeros in the in the binary representation - /// of the number. - #[inline] - fn leading_zeros(&self) -> i64 { unsafe { intrinsics::ctlz64(*self as u64) as i64 } } - - /// Counts the number of trailing zeros. - #[inline] - fn trailing_zeros(&self) -> i64 { unsafe { intrinsics::cttz64(*self as u64) as i64 } } -} - -impl CheckedAdd for i64 { - #[inline] - fn checked_add(&self, v: &i64) -> Option { - unsafe { - let (x, y) = intrinsics::i64_add_with_overflow(*self, *v); - if y { None } else { Some(x) } - } - } -} - -impl CheckedSub for i64 { - #[inline] - fn checked_sub(&self, v: &i64) -> Option { - unsafe { - let (x, y) = intrinsics::i64_sub_with_overflow(*self, *v); - if y { None } else { Some(x) } - } - } -} - -impl CheckedMul for i64 { - #[inline] - fn checked_mul(&self, v: &i64) -> Option { - unsafe { - let (x, y) = intrinsics::i64_mul_with_overflow(*self, *v); - if y { None } else { Some(x) } - } - } -} +int_module!(i64) diff --git a/src/libstd/num/i8.rs b/src/libstd/num/i8.rs index 2d349fa7f4f..bd40a2c53b6 100644 --- a/src/libstd/num/i8.rs +++ b/src/libstd/num/i8.rs @@ -10,63 +10,14 @@ //! Operations and constants for signed 8-bits integers (`i8` type) -#![allow(non_uppercase_statics)] - -use prelude::*; - -use default::Default; use from_str::FromStr; -use num::{Bitwise, Bounded, CheckedAdd, CheckedSub, CheckedMul}; -use num::{CheckedDiv, Zero, One, strconv}; +use iter::Iterator; use num::{ToStrRadix, FromStrRadix}; -use option::{Option, Some, None}; +use num::strconv; +use option::Option; +use slice::{ImmutableVector, OwnedVector}; use str; -use intrinsics; -int_module!(i8, 8) +pub use core::i8::{BITS, BYTES, MIN, MAX}; -impl Bitwise for i8 { - /// Returns the number of ones in the binary representation of the number. - #[inline] - fn count_ones(&self) -> i8 { unsafe { intrinsics::ctpop8(*self as u8) as i8 } } - - /// Returns the number of leading zeros in the in the binary representation - /// of the number. - #[inline] - fn leading_zeros(&self) -> i8 { unsafe { intrinsics::ctlz8(*self as u8) as i8 } } - - /// Returns the number of trailing zeros in the in the binary representation - /// of the number. - #[inline] - fn trailing_zeros(&self) -> i8 { unsafe { intrinsics::cttz8(*self as u8) as i8 } } -} - -impl CheckedAdd for i8 { - #[inline] - fn checked_add(&self, v: &i8) -> Option { - unsafe { - let (x, y) = intrinsics::i8_add_with_overflow(*self, *v); - if y { None } else { Some(x) } - } - } -} - -impl CheckedSub for i8 { - #[inline] - fn checked_sub(&self, v: &i8) -> Option { - unsafe { - let (x, y) = intrinsics::i8_sub_with_overflow(*self, *v); - if y { None } else { Some(x) } - } - } -} - -impl CheckedMul for i8 { - #[inline] - fn checked_mul(&self, v: &i8) -> Option { - unsafe { - let (x, y) = intrinsics::i8_mul_with_overflow(*self, *v); - if y { None } else { Some(x) } - } - } -} +int_module!(i8) diff --git a/src/libstd/num/int.rs b/src/libstd/num/int.rs index 66b204ee8bd..d9552ee3340 100644 --- a/src/libstd/num/int.rs +++ b/src/libstd/num/int.rs @@ -10,118 +10,14 @@ //! Operations and constants for architecture-sized signed integers (`int` type) -#![allow(non_uppercase_statics)] - -use prelude::*; - -use default::Default; use from_str::FromStr; -use num::{Bitwise, Bounded, CheckedAdd, CheckedSub, CheckedMul}; -use num::{CheckedDiv, Zero, One, strconv}; +use iter::Iterator; use num::{ToStrRadix, FromStrRadix}; -use option::{Option, Some, None}; +use num::strconv; +use option::Option; +use slice::{ImmutableVector, OwnedVector}; use str; -use intrinsics; -#[cfg(target_word_size = "32")] int_module!(int, 32) -#[cfg(target_word_size = "64")] int_module!(int, 64) +pub use core::int::{BITS, BYTES, MIN, MAX}; -#[cfg(target_word_size = "32")] -impl Bitwise for int { - /// Returns the number of ones in the binary representation of the number. - #[inline] - fn count_ones(&self) -> int { (*self as i32).count_ones() as int } - - /// Returns the number of leading zeros in the in the binary representation - /// of the number. - #[inline] - fn leading_zeros(&self) -> int { (*self as i32).leading_zeros() as int } - - /// Returns the number of trailing zeros in the in the binary representation - /// of the number. - #[inline] - fn trailing_zeros(&self) -> int { (*self as i32).trailing_zeros() as int } -} - -#[cfg(target_word_size = "64")] -impl Bitwise for int { - /// Returns the number of ones in the binary representation of the number. - #[inline] - fn count_ones(&self) -> int { (*self as i64).count_ones() as int } - - /// Returns the number of leading zeros in the in the binary representation - /// of the number. - #[inline] - fn leading_zeros(&self) -> int { (*self as i64).leading_zeros() as int } - - /// Returns the number of trailing zeros in the in the binary representation - /// of the number. - #[inline] - fn trailing_zeros(&self) -> int { (*self as i64).trailing_zeros() as int } -} - -#[cfg(target_word_size = "32")] -impl CheckedAdd for int { - #[inline] - fn checked_add(&self, v: &int) -> Option { - unsafe { - let (x, y) = intrinsics::i32_add_with_overflow(*self as i32, *v as i32); - if y { None } else { Some(x as int) } - } - } -} - -#[cfg(target_word_size = "64")] -impl CheckedAdd for int { - #[inline] - fn checked_add(&self, v: &int) -> Option { - unsafe { - let (x, y) = intrinsics::i64_add_with_overflow(*self as i64, *v as i64); - if y { None } else { Some(x as int) } - } - } -} - -#[cfg(target_word_size = "32")] -impl CheckedSub for int { - #[inline] - fn checked_sub(&self, v: &int) -> Option { - unsafe { - let (x, y) = intrinsics::i32_sub_with_overflow(*self as i32, *v as i32); - if y { None } else { Some(x as int) } - } - } -} - -#[cfg(target_word_size = "64")] -impl CheckedSub for int { - #[inline] - fn checked_sub(&self, v: &int) -> Option { - unsafe { - let (x, y) = intrinsics::i64_sub_with_overflow(*self as i64, *v as i64); - if y { None } else { Some(x as int) } - } - } -} - -#[cfg(target_word_size = "32")] -impl CheckedMul for int { - #[inline] - fn checked_mul(&self, v: &int) -> Option { - unsafe { - let (x, y) = intrinsics::i32_mul_with_overflow(*self as i32, *v as i32); - if y { None } else { Some(x as int) } - } - } -} - -#[cfg(target_word_size = "64")] -impl CheckedMul for int { - #[inline] - fn checked_mul(&self, v: &int) -> Option { - unsafe { - let (x, y) = intrinsics::i64_mul_with_overflow(*self as i64, *v as i64); - if y { None } else { Some(x as int) } - } - } -} +int_module!(int) diff --git a/src/libstd/num/int_macros.rs b/src/libstd/num/int_macros.rs index c6a9924e4ec..8a7bea46585 100644 --- a/src/libstd/num/int_macros.rs +++ b/src/libstd/num/int_macros.rs @@ -11,226 +11,7 @@ #![macro_escape] #![doc(hidden)] -macro_rules! int_module (($T:ty, $bits:expr) => ( - -// FIXME(#11621): Should be deprecated once CTFE is implemented in favour of -// calling the `mem::size_of` function. -pub static BITS : uint = $bits; -// FIXME(#11621): Should be deprecated once CTFE is implemented in favour of -// calling the `mem::size_of` function. -pub static BYTES : uint = ($bits / 8); - -// FIXME(#11621): Should be deprecated once CTFE is implemented in favour of -// calling the `Bounded::min_value` function. -pub static MIN: $T = (-1 as $T) << (BITS - 1); -// FIXME(#9837): Compute MIN like this so the high bits that shouldn't exist are 0. -// FIXME(#11621): Should be deprecated once CTFE is implemented in favour of -// calling the `Bounded::max_value` function. -pub static MAX: $T = !MIN; - -impl CheckedDiv for $T { - #[inline] - fn checked_div(&self, v: &$T) -> Option<$T> { - if *v == 0 || (*self == MIN && *v == -1) { - None - } else { - Some(self / *v) - } - } -} - -impl Num for $T {} - -#[cfg(not(test))] -impl Ord for $T { - #[inline] - fn lt(&self, other: &$T) -> bool { return (*self) < (*other); } -} - -#[cfg(not(test))] -impl Eq for $T { - #[inline] - fn eq(&self, other: &$T) -> bool { return (*self) == (*other); } -} - -impl Default for $T { - #[inline] - fn default() -> $T { 0 } -} - -impl Zero for $T { - #[inline] - fn zero() -> $T { 0 } - - #[inline] - fn is_zero(&self) -> bool { *self == 0 } -} - -impl One for $T { - #[inline] - fn one() -> $T { 1 } -} - -#[cfg(not(test))] -impl Add<$T,$T> for $T { - #[inline] - fn add(&self, other: &$T) -> $T { *self + *other } -} - -#[cfg(not(test))] -impl Sub<$T,$T> for $T { - #[inline] - fn sub(&self, other: &$T) -> $T { *self - *other } -} - -#[cfg(not(test))] -impl Mul<$T,$T> for $T { - #[inline] - fn mul(&self, other: &$T) -> $T { *self * *other } -} - -#[cfg(not(test))] -impl Div<$T,$T> for $T { - /// Integer division, truncated towards 0. - /// - /// # Examples - /// - /// ~~~ - /// assert!( 8 / 3 == 2); - /// assert!( 8 / -3 == -2); - /// assert!(-8 / 3 == -2); - /// assert!(-8 / -3 == 2); - /// - /// assert!( 1 / 2 == 0); - /// assert!( 1 / -2 == 0); - /// assert!(-1 / 2 == 0); - /// assert!(-1 / -2 == 0); - /// ~~~ - #[inline] - fn div(&self, other: &$T) -> $T { *self / *other } -} - -#[cfg(not(test))] -impl Rem<$T,$T> for $T { - /// Returns the integer remainder after division, satisfying: - /// - /// ~~~ - /// # let n = 1; - /// # let d = 2; - /// assert!((n / d) * d + (n % d) == n) - /// ~~~ - /// - /// # Examples - /// - /// ~~~ - /// assert!( 8 % 3 == 2); - /// assert!( 8 % -3 == 2); - /// assert!(-8 % 3 == -2); - /// assert!(-8 % -3 == -2); - /// - /// assert!( 1 % 2 == 1); - /// assert!( 1 % -2 == 1); - /// assert!(-1 % 2 == -1); - /// assert!(-1 % -2 == -1); - /// ~~~ - #[inline] - fn rem(&self, other: &$T) -> $T { *self % *other } -} - -#[cfg(not(test))] -impl Neg<$T> for $T { - #[inline] - fn neg(&self) -> $T { -*self } -} - -impl Signed for $T { - /// Computes the absolute value - #[inline] - fn abs(&self) -> $T { - if self.is_negative() { -*self } else { *self } - } - - /// - /// The positive difference of two numbers. Returns `0` if the number is less than or - /// equal to `other`, otherwise the difference between`self` and `other` is returned. - /// - #[inline] - fn abs_sub(&self, other: &$T) -> $T { - if *self <= *other { 0 } else { *self - *other } - } - - /// - /// # Returns - /// - /// - `0` if the number is zero - /// - `1` if the number is positive - /// - `-1` if the number is negative - /// - #[inline] - fn signum(&self) -> $T { - match *self { - n if n > 0 => 1, - 0 => 0, - _ => -1, - } - } - - /// Returns true if the number is positive - #[inline] - fn is_positive(&self) -> bool { *self > 0 } - - /// Returns true if the number is negative - #[inline] - fn is_negative(&self) -> bool { *self < 0 } -} - -#[cfg(not(test))] -impl BitOr<$T,$T> for $T { - #[inline] - fn bitor(&self, other: &$T) -> $T { *self | *other } -} - -#[cfg(not(test))] -impl BitAnd<$T,$T> for $T { - #[inline] - fn bitand(&self, other: &$T) -> $T { *self & *other } -} - -#[cfg(not(test))] -impl BitXor<$T,$T> for $T { - #[inline] - fn bitxor(&self, other: &$T) -> $T { *self ^ *other } -} - -#[cfg(not(test))] -impl Shl<$T,$T> for $T { - #[inline] - fn shl(&self, other: &$T) -> $T { *self << *other } -} - -#[cfg(not(test))] -impl Shr<$T,$T> for $T { - #[inline] - fn shr(&self, other: &$T) -> $T { *self >> *other } -} - -#[cfg(not(test))] -impl Not<$T> for $T { - #[inline] - fn not(&self) -> $T { !*self } -} - -impl Bounded for $T { - #[inline] - fn min_value() -> $T { MIN } - - #[inline] - fn max_value() -> $T { MAX } -} - -impl Int for $T {} - -impl Primitive for $T {} +macro_rules! int_module (($T:ty) => ( // String conversion functions and impl str -> num @@ -296,7 +77,7 @@ impl ToStrRadix for $T { /// Convert to a string in a given base. #[inline] fn to_str_radix(&self, radix: uint) -> ~str { - let mut buf = Vec::new(); + let mut buf = ::vec::Vec::new(); strconv::int_to_str_bytes_common(*self, radix, strconv::SignNeg, |i| { buf.push(i); }); @@ -311,89 +92,10 @@ mod tests { use prelude::*; use super::*; - use int; use i32; - use num; - use num::Bitwise; - use num::CheckedDiv; use num::ToStrRadix; use str::StrSlice; - #[test] - fn test_overflows() { - assert!(MAX > 0); - assert!(MIN <= 0); - assert_eq!(MIN + MAX + 1, 0); - } - - #[test] - fn test_num() { - num::test_num(10 as $T, 2 as $T); - } - - #[test] - pub fn test_abs() { - assert_eq!((1 as $T).abs(), 1 as $T); - assert_eq!((0 as $T).abs(), 0 as $T); - assert_eq!((-1 as $T).abs(), 1 as $T); - } - - #[test] - fn test_abs_sub() { - assert_eq!((-1 as $T).abs_sub(&(1 as $T)), 0 as $T); - assert_eq!((1 as $T).abs_sub(&(1 as $T)), 0 as $T); - assert_eq!((1 as $T).abs_sub(&(0 as $T)), 1 as $T); - assert_eq!((1 as $T).abs_sub(&(-1 as $T)), 2 as $T); - } - - #[test] - fn test_signum() { - assert_eq!((1 as $T).signum(), 1 as $T); - assert_eq!((0 as $T).signum(), 0 as $T); - assert_eq!((-0 as $T).signum(), 0 as $T); - assert_eq!((-1 as $T).signum(), -1 as $T); - } - - #[test] - fn test_is_positive() { - assert!((1 as $T).is_positive()); - assert!(!(0 as $T).is_positive()); - assert!(!(-0 as $T).is_positive()); - assert!(!(-1 as $T).is_positive()); - } - - #[test] - fn test_is_negative() { - assert!(!(1 as $T).is_negative()); - assert!(!(0 as $T).is_negative()); - assert!(!(-0 as $T).is_negative()); - assert!((-1 as $T).is_negative()); - } - - #[test] - fn test_bitwise() { - assert_eq!(0b1110 as $T, (0b1100 as $T).bitor(&(0b1010 as $T))); - assert_eq!(0b1000 as $T, (0b1100 as $T).bitand(&(0b1010 as $T))); - assert_eq!(0b0110 as $T, (0b1100 as $T).bitxor(&(0b1010 as $T))); - assert_eq!(0b1110 as $T, (0b0111 as $T).shl(&(1 as $T))); - assert_eq!(0b0111 as $T, (0b1110 as $T).shr(&(1 as $T))); - assert_eq!(-(0b11 as $T) - (1 as $T), (0b11 as $T).not()); - } - - #[test] - fn test_count_ones() { - assert_eq!((0b0101100 as $T).count_ones(), 3); - assert_eq!((0b0100001 as $T).count_ones(), 2); - assert_eq!((0b1111001 as $T).count_ones(), 5); - } - - #[test] - fn test_count_zeros() { - assert_eq!((0b0101100 as $T).count_zeros(), BITS as $T - 3); - assert_eq!((0b0100001 as $T).count_zeros(), BITS as $T - 2); - assert_eq!((0b1111001 as $T).count_zeros(), BITS as $T - 5); - } - #[test] fn test_from_str() { assert_eq!(from_str::<$T>("0"), Some(0 as $T)); @@ -508,13 +210,6 @@ mod tests { assert_eq!(from_str::("-9223372036854775808"), Some(i64_val)); assert!(from_str::("-9223372036854775809").is_none()); } - - #[test] - fn test_signed_checked_div() { - assert_eq!(10i.checked_div(&2), Some(5)); - assert_eq!(5i.checked_div(&0), None); - assert_eq!(int::MIN.checked_div(&-1), None); - } } )) diff --git a/src/libstd/num/mod.rs b/src/libstd/num/mod.rs index 15269f6b86b..1efd7cad300 100644 --- a/src/libstd/num/mod.rs +++ b/src/libstd/num/mod.rs @@ -15,306 +15,24 @@ #![allow(missing_doc)] -use clone::Clone; -use cmp::{Eq, Ord}; -use kinds::Copy; -use mem::size_of; -use ops::{Add, Sub, Mul, Div, Rem, Neg}; -use ops::{Not, BitAnd, BitOr, BitXor, Shl, Shr}; -use option::{Option, Some, None}; -use fmt::{Show, Binary, Octal, LowerHex, UpperHex}; +use option::{Option}; + +#[cfg(test)] use fmt::Show; + +pub use core::num::{Num, div_rem, Zero, zero, One, one}; +pub use core::num::{Signed, abs, abs_sub, signum}; +pub use core::num::{Unsigned, pow, Bounded, Bitwise}; +pub use core::num::{Primitive, Int, Saturating}; +pub use core::num::{CheckedAdd, CheckedSub, CheckedMul, CheckedDiv}; +pub use core::num::{cast, FromPrimitive, NumCast, ToPrimitive}; +pub use core::num::{next_power_of_two, is_power_of_two}; +pub use core::num::{checked_next_power_of_two}; +pub use core::num::{from_int, from_i8, from_i16, from_i32, from_i64}; +pub use core::num::{from_uint, from_u8, from_u16, from_u32, from_u64}; +pub use core::num::{from_f32, from_f64}; pub mod strconv; -/// The base trait for numeric types -pub trait Num: Eq + Zero + One - + Neg - + Add - + Sub - + Mul - + Div - + Rem {} - -/// Simultaneous division and remainder -#[inline] -pub fn div_rem + Rem>(x: T, y: T) -> (T, T) { - (x / y, x % y) -} - -/// Defines an additive identity element for `Self`. -/// -/// # Deriving -/// -/// This trait can be automatically be derived using `#[deriving(Zero)]` -/// attribute. If you choose to use this, make sure that the laws outlined in -/// the documentation for `Zero::zero` still hold. -pub trait Zero: Add { - /// Returns the additive identity element of `Self`, `0`. - /// - /// # Laws - /// - /// ~~~notrust - /// a + 0 = a ∀ a ∈ Self - /// 0 + a = a ∀ a ∈ Self - /// ~~~ - /// - /// # Purity - /// - /// This function should return the same result at all times regardless of - /// external mutable state, for example values stored in TLS or in - /// `static mut`s. - // FIXME (#5527): This should be an associated constant - fn zero() -> Self; - - /// Returns `true` if `self` is equal to the additive identity. - fn is_zero(&self) -> bool; -} - -/// Returns the additive identity, `0`. -#[inline(always)] pub fn zero() -> T { Zero::zero() } - -/// Defines a multiplicative identity element for `Self`. -pub trait One: Mul { - /// Returns the multiplicative identity element of `Self`, `1`. - /// - /// # Laws - /// - /// ~~~notrust - /// a * 1 = a ∀ a ∈ Self - /// 1 * a = a ∀ a ∈ Self - /// ~~~ - /// - /// # Purity - /// - /// This function should return the same result at all times regardless of - /// external mutable state, for example values stored in TLS or in - /// `static mut`s. - // FIXME (#5527): This should be an associated constant - fn one() -> Self; -} - -/// Returns the multiplicative identity, `1`. -#[inline(always)] pub fn one() -> T { One::one() } - -/// Useful functions for signed numbers (i.e. numbers that can be negative). -pub trait Signed: Num + Neg { - /// Computes the absolute value. - /// - /// For float, f32, and f64, `NaN` will be returned if the number is `NaN`. - fn abs(&self) -> Self; - - /// The positive difference of two numbers. - /// - /// Returns `zero` if the number is less than or equal to `other`, otherwise the difference - /// between `self` and `other` is returned. - fn abs_sub(&self, other: &Self) -> Self; - - /// Returns the sign of the number. - /// - /// For `float`, `f32`, `f64`: - /// * `1.0` if the number is positive, `+0.0` or `INFINITY` - /// * `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY` - /// * `NaN` if the number is `NaN` - /// - /// For `int`: - /// * `0` if the number is zero - /// * `1` if the number is positive - /// * `-1` if the number is negative - fn signum(&self) -> Self; - - /// Returns true if the number is positive and false if the number is zero or negative. - fn is_positive(&self) -> bool; - - /// Returns true if the number is negative and false if the number is zero or positive. - fn is_negative(&self) -> bool; -} - -/// Computes the absolute value. -/// -/// For float, f32, and f64, `NaN` will be returned if the number is `NaN` -#[inline(always)] -pub fn abs(value: T) -> T { - value.abs() -} - -/// The positive difference of two numbers. -/// -/// Returns `zero` if the number is less than or equal to `other`, -/// otherwise the difference between `self` and `other` is returned. -#[inline(always)] -pub fn abs_sub(x: T, y: T) -> T { - x.abs_sub(&y) -} - -/// Returns the sign of the number. -/// -/// For float, f32, f64: -/// - `1.0` if the number is positive, `+0.0` or `INFINITY` -/// - `-1.0` if the number is negative, `-0.0` or `NEG_INFINITY` -/// - `NAN` if the number is `NAN` -/// -/// For int: -/// - `0` if the number is zero -/// - `1` if the number is positive -/// - `-1` if the number is negative -#[inline(always)] pub fn signum(value: T) -> T { value.signum() } - -/// A trait for values which cannot be negative -pub trait Unsigned: Num {} - -/// Raises a value to the power of exp, using exponentiation by squaring. -/// -/// # Example -/// -/// ```rust -/// use std::num; -/// -/// assert_eq!(num::pow(2, 4), 16); -/// ``` -#[inline] -pub fn pow>(mut base: T, mut exp: uint) -> T { - if exp == 1 { base } - else { - let mut acc = one::(); - while exp > 0 { - if (exp & 1) == 1 { - acc = acc * base; - } - base = base * base; - exp = exp >> 1; - } - acc - } -} - -/// Numbers which have upper and lower bounds -pub trait Bounded { - // FIXME (#5527): These should be associated constants - /// returns the smallest finite number this type can represent - fn min_value() -> Self; - /// returns the largest finite number this type can represent - fn max_value() -> Self; -} - -/// Numbers with a fixed binary representation. -pub trait Bitwise: Bounded - + Not - + BitAnd - + BitOr - + BitXor - + Shl - + Shr { - /// Returns the number of ones in the binary representation of the number. - /// - /// # Example - /// - /// ```rust - /// use std::num::Bitwise; - /// - /// let n = 0b01001100u8; - /// assert_eq!(n.count_ones(), 3); - /// ``` - fn count_ones(&self) -> Self; - - /// Returns the number of zeros in the binary representation of the number. - /// - /// # Example - /// - /// ```rust - /// use std::num::Bitwise; - /// - /// let n = 0b01001100u8; - /// assert_eq!(n.count_zeros(), 5); - /// ``` - #[inline] - fn count_zeros(&self) -> Self { - (!*self).count_ones() - } - - /// Returns the number of leading zeros in the in the binary representation - /// of the number. - /// - /// # Example - /// - /// ```rust - /// use std::num::Bitwise; - /// - /// let n = 0b0101000u16; - /// assert_eq!(n.leading_zeros(), 10); - /// ``` - fn leading_zeros(&self) -> Self; - - /// Returns the number of trailing zeros in the in the binary representation - /// of the number. - /// - /// # Example - /// - /// ```rust - /// use std::num::Bitwise; - /// - /// let n = 0b0101000u16; - /// assert_eq!(n.trailing_zeros(), 3); - /// ``` - fn trailing_zeros(&self) -> Self; -} - -/// Specifies the available operations common to all of Rust's core numeric primitives. -/// These may not always make sense from a purely mathematical point of view, but -/// may be useful for systems programming. -pub trait Primitive: Copy - + Clone - + Num - + NumCast - + Ord - + Bounded {} - -/// A collection of traits relevant to primitive signed and unsigned integers -pub trait Int: Primitive - + Bitwise - + CheckedAdd - + CheckedSub - + CheckedMul - + CheckedDiv - + Show - + Binary - + Octal - + LowerHex - + UpperHex {} - -/// Returns the smallest power of 2 greater than or equal to `n`. -#[inline] -pub fn next_power_of_two(n: T) -> T { - let halfbits: T = cast(size_of::() * 4).unwrap(); - let mut tmp: T = n - one(); - let mut shift: T = one(); - while shift <= halfbits { - tmp = tmp | (tmp >> shift); - shift = shift << one(); - } - tmp + one() -} - -// Returns `true` iff `n == 2^k` for some k. -#[inline] -pub fn is_power_of_two(n: T) -> bool { - (n - one()) & n == zero() -} - -/// Returns the smallest power of 2 greater than or equal to `n`. If the next -/// power of two is greater than the type's maximum value, `None` is returned, -/// otherwise the power of 2 is wrapped in `Some`. -#[inline] -pub fn checked_next_power_of_two(n: T) -> Option { - let halfbits: T = cast(size_of::() * 4).unwrap(); - let mut tmp: T = n - one(); - let mut shift: T = one(); - while shift <= halfbits { - tmp = tmp | (tmp >> shift); - shift = shift << one(); - } - tmp.checked_add(&one()) -} - /// Used for representing the classification of floating point numbers #[deriving(Eq, Show)] pub enum FPCategory { @@ -537,494 +255,6 @@ pub trait Float: Signed + Primitive { fn to_radians(self) -> Self; } -/// A generic trait for converting a value to a number. -pub trait ToPrimitive { - /// Converts the value of `self` to an `int`. - #[inline] - fn to_int(&self) -> Option { - self.to_i64().and_then(|x| x.to_int()) - } - - /// Converts the value of `self` to an `i8`. - #[inline] - fn to_i8(&self) -> Option { - self.to_i64().and_then(|x| x.to_i8()) - } - - /// Converts the value of `self` to an `i16`. - #[inline] - fn to_i16(&self) -> Option { - self.to_i64().and_then(|x| x.to_i16()) - } - - /// Converts the value of `self` to an `i32`. - #[inline] - fn to_i32(&self) -> Option { - self.to_i64().and_then(|x| x.to_i32()) - } - - /// Converts the value of `self` to an `i64`. - fn to_i64(&self) -> Option; - - /// Converts the value of `self` to an `uint`. - #[inline] - fn to_uint(&self) -> Option { - self.to_u64().and_then(|x| x.to_uint()) - } - - /// Converts the value of `self` to an `u8`. - #[inline] - fn to_u8(&self) -> Option { - self.to_u64().and_then(|x| x.to_u8()) - } - - /// Converts the value of `self` to an `u16`. - #[inline] - fn to_u16(&self) -> Option { - self.to_u64().and_then(|x| x.to_u16()) - } - - /// Converts the value of `self` to an `u32`. - #[inline] - fn to_u32(&self) -> Option { - self.to_u64().and_then(|x| x.to_u32()) - } - - /// Converts the value of `self` to an `u64`. - #[inline] - fn to_u64(&self) -> Option; - - /// Converts the value of `self` to an `f32`. - #[inline] - fn to_f32(&self) -> Option { - self.to_f64().and_then(|x| x.to_f32()) - } - - /// Converts the value of `self` to an `f64`. - #[inline] - fn to_f64(&self) -> Option { - self.to_i64().and_then(|x| x.to_f64()) - } -} - -macro_rules! impl_to_primitive_int_to_int( - ($SrcT:ty, $DstT:ty) => ( - { - if size_of::<$SrcT>() <= size_of::<$DstT>() { - Some(*self as $DstT) - } else { - let n = *self as i64; - let min_value: $DstT = Bounded::min_value(); - let max_value: $DstT = Bounded::max_value(); - if min_value as i64 <= n && n <= max_value as i64 { - Some(*self as $DstT) - } else { - None - } - } - } - ) -) - -macro_rules! impl_to_primitive_int_to_uint( - ($SrcT:ty, $DstT:ty) => ( - { - let zero: $SrcT = Zero::zero(); - let max_value: $DstT = Bounded::max_value(); - if zero <= *self && *self as u64 <= max_value as u64 { - Some(*self as $DstT) - } else { - None - } - } - ) -) - -macro_rules! impl_to_primitive_int( - ($T:ty) => ( - impl ToPrimitive for $T { - #[inline] - fn to_int(&self) -> Option { impl_to_primitive_int_to_int!($T, int) } - #[inline] - fn to_i8(&self) -> Option { impl_to_primitive_int_to_int!($T, i8) } - #[inline] - fn to_i16(&self) -> Option { impl_to_primitive_int_to_int!($T, i16) } - #[inline] - fn to_i32(&self) -> Option { impl_to_primitive_int_to_int!($T, i32) } - #[inline] - fn to_i64(&self) -> Option { impl_to_primitive_int_to_int!($T, i64) } - - #[inline] - fn to_uint(&self) -> Option { impl_to_primitive_int_to_uint!($T, uint) } - #[inline] - fn to_u8(&self) -> Option { impl_to_primitive_int_to_uint!($T, u8) } - #[inline] - fn to_u16(&self) -> Option { impl_to_primitive_int_to_uint!($T, u16) } - #[inline] - fn to_u32(&self) -> Option { impl_to_primitive_int_to_uint!($T, u32) } - #[inline] - fn to_u64(&self) -> Option { impl_to_primitive_int_to_uint!($T, u64) } - - #[inline] - fn to_f32(&self) -> Option { Some(*self as f32) } - #[inline] - fn to_f64(&self) -> Option { Some(*self as f64) } - } - ) -) - -impl_to_primitive_int!(int) -impl_to_primitive_int!(i8) -impl_to_primitive_int!(i16) -impl_to_primitive_int!(i32) -impl_to_primitive_int!(i64) - -macro_rules! impl_to_primitive_uint_to_int( - ($DstT:ty) => ( - { - let max_value: $DstT = Bounded::max_value(); - if *self as u64 <= max_value as u64 { - Some(*self as $DstT) - } else { - None - } - } - ) -) - -macro_rules! impl_to_primitive_uint_to_uint( - ($SrcT:ty, $DstT:ty) => ( - { - if size_of::<$SrcT>() <= size_of::<$DstT>() { - Some(*self as $DstT) - } else { - let zero: $SrcT = Zero::zero(); - let max_value: $DstT = Bounded::max_value(); - if zero <= *self && *self as u64 <= max_value as u64 { - Some(*self as $DstT) - } else { - None - } - } - } - ) -) - -macro_rules! impl_to_primitive_uint( - ($T:ty) => ( - impl ToPrimitive for $T { - #[inline] - fn to_int(&self) -> Option { impl_to_primitive_uint_to_int!(int) } - #[inline] - fn to_i8(&self) -> Option { impl_to_primitive_uint_to_int!(i8) } - #[inline] - fn to_i16(&self) -> Option { impl_to_primitive_uint_to_int!(i16) } - #[inline] - fn to_i32(&self) -> Option { impl_to_primitive_uint_to_int!(i32) } - #[inline] - fn to_i64(&self) -> Option { impl_to_primitive_uint_to_int!(i64) } - - #[inline] - fn to_uint(&self) -> Option { impl_to_primitive_uint_to_uint!($T, uint) } - #[inline] - fn to_u8(&self) -> Option { impl_to_primitive_uint_to_uint!($T, u8) } - #[inline] - fn to_u16(&self) -> Option { impl_to_primitive_uint_to_uint!($T, u16) } - #[inline] - fn to_u32(&self) -> Option { impl_to_primitive_uint_to_uint!($T, u32) } - #[inline] - fn to_u64(&self) -> Option { impl_to_primitive_uint_to_uint!($T, u64) } - - #[inline] - fn to_f32(&self) -> Option { Some(*self as f32) } - #[inline] - fn to_f64(&self) -> Option { Some(*self as f64) } - } - ) -) - -impl_to_primitive_uint!(uint) -impl_to_primitive_uint!(u8) -impl_to_primitive_uint!(u16) -impl_to_primitive_uint!(u32) -impl_to_primitive_uint!(u64) - -macro_rules! impl_to_primitive_float_to_float( - ($SrcT:ty, $DstT:ty) => ( - if size_of::<$SrcT>() <= size_of::<$DstT>() { - Some(*self as $DstT) - } else { - let n = *self as f64; - let max_value: $SrcT = Bounded::max_value(); - if -max_value as f64 <= n && n <= max_value as f64 { - Some(*self as $DstT) - } else { - None - } - } - ) -) - -macro_rules! impl_to_primitive_float( - ($T:ty) => ( - impl ToPrimitive for $T { - #[inline] - fn to_int(&self) -> Option { Some(*self as int) } - #[inline] - fn to_i8(&self) -> Option { Some(*self as i8) } - #[inline] - fn to_i16(&self) -> Option { Some(*self as i16) } - #[inline] - fn to_i32(&self) -> Option { Some(*self as i32) } - #[inline] - fn to_i64(&self) -> Option { Some(*self as i64) } - - #[inline] - fn to_uint(&self) -> Option { Some(*self as uint) } - #[inline] - fn to_u8(&self) -> Option { Some(*self as u8) } - #[inline] - fn to_u16(&self) -> Option { Some(*self as u16) } - #[inline] - fn to_u32(&self) -> Option { Some(*self as u32) } - #[inline] - fn to_u64(&self) -> Option { Some(*self as u64) } - - #[inline] - fn to_f32(&self) -> Option { impl_to_primitive_float_to_float!($T, f32) } - #[inline] - fn to_f64(&self) -> Option { impl_to_primitive_float_to_float!($T, f64) } - } - ) -) - -impl_to_primitive_float!(f32) -impl_to_primitive_float!(f64) - -/// A generic trait for converting a number to a value. -pub trait FromPrimitive { - /// Convert an `int` to return an optional value of this type. If the - /// value cannot be represented by this value, the `None` is returned. - #[inline] - fn from_int(n: int) -> Option { - FromPrimitive::from_i64(n as i64) - } - - /// Convert an `i8` to return an optional value of this type. If the - /// type cannot be represented by this value, the `None` is returned. - #[inline] - fn from_i8(n: i8) -> Option { - FromPrimitive::from_i64(n as i64) - } - - /// Convert an `i16` to return an optional value of this type. If the - /// type cannot be represented by this value, the `None` is returned. - #[inline] - fn from_i16(n: i16) -> Option { - FromPrimitive::from_i64(n as i64) - } - - /// Convert an `i32` to return an optional value of this type. If the - /// type cannot be represented by this value, the `None` is returned. - #[inline] - fn from_i32(n: i32) -> Option { - FromPrimitive::from_i64(n as i64) - } - - /// Convert an `i64` to return an optional value of this type. If the - /// type cannot be represented by this value, the `None` is returned. - fn from_i64(n: i64) -> Option; - - /// Convert an `uint` to return an optional value of this type. If the - /// type cannot be represented by this value, the `None` is returned. - #[inline] - fn from_uint(n: uint) -> Option { - FromPrimitive::from_u64(n as u64) - } - - /// Convert an `u8` to return an optional value of this type. If the - /// type cannot be represented by this value, the `None` is returned. - #[inline] - fn from_u8(n: u8) -> Option { - FromPrimitive::from_u64(n as u64) - } - - /// Convert an `u16` to return an optional value of this type. If the - /// type cannot be represented by this value, the `None` is returned. - #[inline] - fn from_u16(n: u16) -> Option { - FromPrimitive::from_u64(n as u64) - } - - /// Convert an `u32` to return an optional value of this type. If the - /// type cannot be represented by this value, the `None` is returned. - #[inline] - fn from_u32(n: u32) -> Option { - FromPrimitive::from_u64(n as u64) - } - - /// Convert an `u64` to return an optional value of this type. If the - /// type cannot be represented by this value, the `None` is returned. - fn from_u64(n: u64) -> Option; - - /// Convert a `f32` to return an optional value of this type. If the - /// type cannot be represented by this value, the `None` is returned. - #[inline] - fn from_f32(n: f32) -> Option { - FromPrimitive::from_f64(n as f64) - } - - /// Convert a `f64` to return an optional value of this type. If the - /// type cannot be represented by this value, the `None` is returned. - #[inline] - fn from_f64(n: f64) -> Option { - FromPrimitive::from_i64(n as i64) - } -} - -/// A utility function that just calls `FromPrimitive::from_int`. -pub fn from_int(n: int) -> Option { - FromPrimitive::from_int(n) -} - -/// A utility function that just calls `FromPrimitive::from_i8`. -pub fn from_i8(n: i8) -> Option { - FromPrimitive::from_i8(n) -} - -/// A utility function that just calls `FromPrimitive::from_i16`. -pub fn from_i16(n: i16) -> Option { - FromPrimitive::from_i16(n) -} - -/// A utility function that just calls `FromPrimitive::from_i32`. -pub fn from_i32(n: i32) -> Option { - FromPrimitive::from_i32(n) -} - -/// A utility function that just calls `FromPrimitive::from_i64`. -pub fn from_i64(n: i64) -> Option { - FromPrimitive::from_i64(n) -} - -/// A utility function that just calls `FromPrimitive::from_uint`. -pub fn from_uint(n: uint) -> Option { - FromPrimitive::from_uint(n) -} - -/// A utility function that just calls `FromPrimitive::from_u8`. -pub fn from_u8(n: u8) -> Option { - FromPrimitive::from_u8(n) -} - -/// A utility function that just calls `FromPrimitive::from_u16`. -pub fn from_u16(n: u16) -> Option { - FromPrimitive::from_u16(n) -} - -/// A utility function that just calls `FromPrimitive::from_u32`. -pub fn from_u32(n: u32) -> Option { - FromPrimitive::from_u32(n) -} - -/// A utility function that just calls `FromPrimitive::from_u64`. -pub fn from_u64(n: u64) -> Option { - FromPrimitive::from_u64(n) -} - -/// A utility function that just calls `FromPrimitive::from_f32`. -pub fn from_f32(n: f32) -> Option { - FromPrimitive::from_f32(n) -} - -/// A utility function that just calls `FromPrimitive::from_f64`. -pub fn from_f64(n: f64) -> Option { - FromPrimitive::from_f64(n) -} - -macro_rules! impl_from_primitive( - ($T:ty, $to_ty:expr) => ( - impl FromPrimitive for $T { - #[inline] fn from_int(n: int) -> Option<$T> { $to_ty } - #[inline] fn from_i8(n: i8) -> Option<$T> { $to_ty } - #[inline] fn from_i16(n: i16) -> Option<$T> { $to_ty } - #[inline] fn from_i32(n: i32) -> Option<$T> { $to_ty } - #[inline] fn from_i64(n: i64) -> Option<$T> { $to_ty } - - #[inline] fn from_uint(n: uint) -> Option<$T> { $to_ty } - #[inline] fn from_u8(n: u8) -> Option<$T> { $to_ty } - #[inline] fn from_u16(n: u16) -> Option<$T> { $to_ty } - #[inline] fn from_u32(n: u32) -> Option<$T> { $to_ty } - #[inline] fn from_u64(n: u64) -> Option<$T> { $to_ty } - - #[inline] fn from_f32(n: f32) -> Option<$T> { $to_ty } - #[inline] fn from_f64(n: f64) -> Option<$T> { $to_ty } - } - ) -) - -impl_from_primitive!(int, n.to_int()) -impl_from_primitive!(i8, n.to_i8()) -impl_from_primitive!(i16, n.to_i16()) -impl_from_primitive!(i32, n.to_i32()) -impl_from_primitive!(i64, n.to_i64()) -impl_from_primitive!(uint, n.to_uint()) -impl_from_primitive!(u8, n.to_u8()) -impl_from_primitive!(u16, n.to_u16()) -impl_from_primitive!(u32, n.to_u32()) -impl_from_primitive!(u64, n.to_u64()) -impl_from_primitive!(f32, n.to_f32()) -impl_from_primitive!(f64, n.to_f64()) - -/// Cast from one machine scalar to another. -/// -/// # Example -/// -/// ``` -/// use std::num; -/// -/// let twenty: f32 = num::cast(0x14).unwrap(); -/// assert_eq!(twenty, 20f32); -/// ``` -/// -#[inline] -pub fn cast(n: T) -> Option { - NumCast::from(n) -} - -/// An interface for casting between machine scalars. -pub trait NumCast: ToPrimitive { - /// Creates a number from another value that can be converted into a primitive via the - /// `ToPrimitive` trait. - fn from(n: T) -> Option; -} - -macro_rules! impl_num_cast( - ($T:ty, $conv:ident) => ( - impl NumCast for $T { - #[inline] - fn from(n: N) -> Option<$T> { - // `$conv` could be generated using `concat_idents!`, but that - // macro seems to be broken at the moment - n.$conv() - } - } - ) -) - -impl_num_cast!(u8, to_u8) -impl_num_cast!(u16, to_u16) -impl_num_cast!(u32, to_u32) -impl_num_cast!(u64, to_u64) -impl_num_cast!(uint, to_uint) -impl_num_cast!(i8, to_i8) -impl_num_cast!(i16, to_i16) -impl_num_cast!(i32, to_i32) -impl_num_cast!(i64, to_i64) -impl_num_cast!(int, to_int) -impl_num_cast!(f32, to_f32) -impl_num_cast!(f64, to_f64) - /// A generic trait for converting a value to a string with a radix (base) pub trait ToStrRadix { fn to_str_radix(&self, radix: uint) -> ~str; @@ -1040,70 +270,6 @@ pub fn from_str_radix(str: &str, radix: uint) -> Option { FromStrRadix::from_str_radix(str, radix) } -/// Saturating math operations -pub trait Saturating { - /// Saturating addition operator. - /// Returns a+b, saturating at the numeric bounds instead of overflowing. - fn saturating_add(self, v: Self) -> Self; - - /// Saturating subtraction operator. - /// Returns a-b, saturating at the numeric bounds instead of overflowing. - fn saturating_sub(self, v: Self) -> Self; -} - -impl Saturating for T { - #[inline] - fn saturating_add(self, v: T) -> T { - match self.checked_add(&v) { - Some(x) => x, - None => if v >= Zero::zero() { - Bounded::max_value() - } else { - Bounded::min_value() - } - } - } - - #[inline] - fn saturating_sub(self, v: T) -> T { - match self.checked_sub(&v) { - Some(x) => x, - None => if v >= Zero::zero() { - Bounded::min_value() - } else { - Bounded::max_value() - } - } - } -} - -/// Performs addition that returns `None` instead of wrapping around on overflow. -pub trait CheckedAdd: Add { - /// Adds two numbers, checking for overflow. If overflow happens, `None` is returned. - fn checked_add(&self, v: &Self) -> Option; -} - -/// Performs subtraction that returns `None` instead of wrapping around on underflow. -pub trait CheckedSub: Sub { - /// Subtracts two numbers, checking for underflow. If underflow happens, `None` is returned. - fn checked_sub(&self, v: &Self) -> Option; -} - -/// Performs multiplication that returns `None` instead of wrapping around on underflow or -/// overflow. -pub trait CheckedMul: Mul { - /// Multiplies two numbers, checking for underflow or overflow. If underflow or overflow - /// happens, `None` is returned. - fn checked_mul(&self, v: &Self) -> Option; -} - -/// Performs division that returns `None` instead of wrapping around on underflow or overflow. -pub trait CheckedDiv: Div { - /// Divides two numbers, checking for underflow or overflow. If underflow or overflow happens, - /// `None` is returned. - fn checked_div(&self, v: &Self) -> Option; -} - /// Helper function for testing numeric operations #[cfg(test)] pub fn test_num(ten: T, two: T) { diff --git a/src/libstd/num/strconv.rs b/src/libstd/num/strconv.rs index bb2fd2a4e25..8861597bb4c 100644 --- a/src/libstd/num/strconv.rs +++ b/src/libstd/num/strconv.rs @@ -820,6 +820,7 @@ mod bench { use super::test::Bencher; use rand::{XorShiftRng, Rng}; use num::ToStrRadix; + use realstd::result::ResultUnwrap; #[bench] fn to_str_bin(b: &mut Bencher) { @@ -856,6 +857,7 @@ mod bench { use super::test::Bencher; use rand::{XorShiftRng, Rng}; use num::ToStrRadix; + use realstd::result::ResultUnwrap; #[bench] fn to_str_bin(b: &mut Bencher) { @@ -892,6 +894,7 @@ mod bench { use super::test::Bencher; use rand::{XorShiftRng, Rng}; use f64; + use realstd::result::ResultUnwrap; #[bench] fn float_to_str(b: &mut Bencher) { diff --git a/src/libstd/num/u16.rs b/src/libstd/num/u16.rs index 14a432905b4..dd6a838df9b 100644 --- a/src/libstd/num/u16.rs +++ b/src/libstd/num/u16.rs @@ -10,49 +10,14 @@ //! Operations and constants for unsigned 16-bits integers (`u16` type) -#![allow(non_uppercase_statics)] -#![allow(unsigned_negate)] - -use prelude::*; - -use default::Default; use from_str::FromStr; -use num::{Bitwise, Bounded}; -use num::{CheckedAdd, CheckedSub, CheckedMul}; -use num::{CheckedDiv, Zero, One, strconv}; +use iter::Iterator; use num::{ToStrRadix, FromStrRadix}; -use option::{Option, Some, None}; +use num::strconv; +use option::Option; +use slice::{ImmutableVector, OwnedVector}; use str; -use intrinsics; -uint_module!(u16, i16, 16) +pub use core::u16::{BITS, BYTES, MIN, MAX}; -impl CheckedAdd for u16 { - #[inline] - fn checked_add(&self, v: &u16) -> Option { - unsafe { - let (x, y) = intrinsics::u16_add_with_overflow(*self, *v); - if y { None } else { Some(x) } - } - } -} - -impl CheckedSub for u16 { - #[inline] - fn checked_sub(&self, v: &u16) -> Option { - unsafe { - let (x, y) = intrinsics::u16_sub_with_overflow(*self, *v); - if y { None } else { Some(x) } - } - } -} - -impl CheckedMul for u16 { - #[inline] - fn checked_mul(&self, v: &u16) -> Option { - unsafe { - let (x, y) = intrinsics::u16_mul_with_overflow(*self, *v); - if y { None } else { Some(x) } - } - } -} +uint_module!(u16) diff --git a/src/libstd/num/u32.rs b/src/libstd/num/u32.rs index 87740dcb135..bb05938969d 100644 --- a/src/libstd/num/u32.rs +++ b/src/libstd/num/u32.rs @@ -10,49 +10,14 @@ //! Operations and constants for unsigned 32-bits integers (`u32` type) -#![allow(non_uppercase_statics)] -#![allow(unsigned_negate)] - -use prelude::*; - -use default::Default; use from_str::FromStr; -use num::{Bitwise, Bounded}; -use num::{CheckedAdd, CheckedSub, CheckedMul}; -use num::{CheckedDiv, Zero, One, strconv}; +use iter::Iterator; use num::{ToStrRadix, FromStrRadix}; -use option::{Option, Some, None}; +use num::strconv; +use option::Option; +use slice::{ImmutableVector, OwnedVector}; use str; -use intrinsics; -uint_module!(u32, i32, 32) +pub use core::u32::{BITS, BYTES, MIN, MAX}; -impl CheckedAdd for u32 { - #[inline] - fn checked_add(&self, v: &u32) -> Option { - unsafe { - let (x, y) = intrinsics::u32_add_with_overflow(*self, *v); - if y { None } else { Some(x) } - } - } -} - -impl CheckedSub for u32 { - #[inline] - fn checked_sub(&self, v: &u32) -> Option { - unsafe { - let (x, y) = intrinsics::u32_sub_with_overflow(*self, *v); - if y { None } else { Some(x) } - } - } -} - -impl CheckedMul for u32 { - #[inline] - fn checked_mul(&self, v: &u32) -> Option { - unsafe { - let (x, y) = intrinsics::u32_mul_with_overflow(*self, *v); - if y { None } else { Some(x) } - } - } -} +uint_module!(u32) diff --git a/src/libstd/num/u64.rs b/src/libstd/num/u64.rs index 15b2528e616..f38806e1527 100644 --- a/src/libstd/num/u64.rs +++ b/src/libstd/num/u64.rs @@ -10,51 +10,14 @@ //! Operations and constants for unsigned 64-bits integer (`u64` type) -#![allow(non_uppercase_statics)] -#![allow(unsigned_negate)] - -use prelude::*; - -use default::Default; use from_str::FromStr; -use num::{Bitwise, Bounded}; -#[cfg(target_word_size = "64")] -use num::CheckedMul; -use num::{CheckedAdd, CheckedSub}; -use num::{CheckedDiv, Zero, One, strconv}; +use iter::Iterator; use num::{ToStrRadix, FromStrRadix}; -use option::{Option, Some, None}; +use num::strconv; +use option::Option; +use slice::{ImmutableVector, OwnedVector}; use str; -use intrinsics; -uint_module!(u64, i64, 64) +pub use core::u64::{BITS, BYTES, MIN, MAX}; -impl CheckedAdd for u64 { - #[inline] - fn checked_add(&self, v: &u64) -> Option { - unsafe { - let (x, y) = intrinsics::u64_add_with_overflow(*self, *v); - if y { None } else { Some(x) } - } - } -} - -impl CheckedSub for u64 { - #[inline] - fn checked_sub(&self, v: &u64) -> Option { - unsafe { - let (x, y) = intrinsics::u64_sub_with_overflow(*self, *v); - if y { None } else { Some(x) } - } - } -} - -impl CheckedMul for u64 { - #[inline] - fn checked_mul(&self, v: &u64) -> Option { - unsafe { - let (x, y) = intrinsics::u64_mul_with_overflow(*self, *v); - if y { None } else { Some(x) } - } - } -} +uint_module!(u64) diff --git a/src/libstd/num/u8.rs b/src/libstd/num/u8.rs index f841a31ee13..87fed563a15 100644 --- a/src/libstd/num/u8.rs +++ b/src/libstd/num/u8.rs @@ -10,49 +10,14 @@ //! Operations and constants for unsigned 8-bits integers (`u8` type) -#![allow(non_uppercase_statics)] -#![allow(unsigned_negate)] - -use prelude::*; - -use default::Default; use from_str::FromStr; -use num::{Bitwise, Bounded}; -use num::{CheckedAdd, CheckedSub, CheckedMul}; -use num::{CheckedDiv, Zero, One, strconv}; +use iter::Iterator; use num::{ToStrRadix, FromStrRadix}; -use option::{Option, Some, None}; +use num::strconv; +use option::Option; +use slice::{ImmutableVector, OwnedVector}; use str; -use intrinsics; -uint_module!(u8, i8, 8) +pub use core::u8::{BITS, BYTES, MIN, MAX}; -impl CheckedAdd for u8 { - #[inline] - fn checked_add(&self, v: &u8) -> Option { - unsafe { - let (x, y) = intrinsics::u8_add_with_overflow(*self, *v); - if y { None } else { Some(x) } - } - } -} - -impl CheckedSub for u8 { - #[inline] - fn checked_sub(&self, v: &u8) -> Option { - unsafe { - let (x, y) = intrinsics::u8_sub_with_overflow(*self, *v); - if y { None } else { Some(x) } - } - } -} - -impl CheckedMul for u8 { - #[inline] - fn checked_mul(&self, v: &u8) -> Option { - unsafe { - let (x, y) = intrinsics::u8_mul_with_overflow(*self, *v); - if y { None } else { Some(x) } - } - } -} +uint_module!(u8) diff --git a/src/libstd/num/uint.rs b/src/libstd/num/uint.rs index 46cb4f44887..61ab97e86b8 100644 --- a/src/libstd/num/uint.rs +++ b/src/libstd/num/uint.rs @@ -10,85 +10,14 @@ //! Operations and constants for architecture-sized unsigned integers (`uint` type) -#![allow(non_uppercase_statics)] -#![allow(unsigned_negate)] - -use prelude::*; - -use default::Default; use from_str::FromStr; -use num::{Bitwise, Bounded}; -use num::{CheckedAdd, CheckedSub, CheckedMul}; -use num::{CheckedDiv, Zero, One, strconv}; +use iter::Iterator; use num::{ToStrRadix, FromStrRadix}; -use option::{Option, Some, None}; +use num::strconv; +use option::Option; +use slice::{ImmutableVector, OwnedVector}; use str; -use intrinsics; -uint_module!(uint, int, ::int::BITS) +pub use core::uint::{BITS, BYTES, MIN, MAX}; -#[cfg(target_word_size = "32")] -impl CheckedAdd for uint { - #[inline] - fn checked_add(&self, v: &uint) -> Option { - unsafe { - let (x, y) = intrinsics::u32_add_with_overflow(*self as u32, *v as u32); - if y { None } else { Some(x as uint) } - } - } -} - -#[cfg(target_word_size = "64")] -impl CheckedAdd for uint { - #[inline] - fn checked_add(&self, v: &uint) -> Option { - unsafe { - let (x, y) = intrinsics::u64_add_with_overflow(*self as u64, *v as u64); - if y { None } else { Some(x as uint) } - } - } -} - -#[cfg(target_word_size = "32")] -impl CheckedSub for uint { - #[inline] - fn checked_sub(&self, v: &uint) -> Option { - unsafe { - let (x, y) = intrinsics::u32_sub_with_overflow(*self as u32, *v as u32); - if y { None } else { Some(x as uint) } - } - } -} - -#[cfg(target_word_size = "64")] -impl CheckedSub for uint { - #[inline] - fn checked_sub(&self, v: &uint) -> Option { - unsafe { - let (x, y) = intrinsics::u64_sub_with_overflow(*self as u64, *v as u64); - if y { None } else { Some(x as uint) } - } - } -} - -#[cfg(target_word_size = "32")] -impl CheckedMul for uint { - #[inline] - fn checked_mul(&self, v: &uint) -> Option { - unsafe { - let (x, y) = intrinsics::u32_mul_with_overflow(*self as u32, *v as u32); - if y { None } else { Some(x as uint) } - } - } -} - -#[cfg(target_word_size = "64")] -impl CheckedMul for uint { - #[inline] - fn checked_mul(&self, v: &uint) -> Option { - unsafe { - let (x, y) = intrinsics::u64_mul_with_overflow(*self as u64, *v as u64); - if y { None } else { Some(x as uint) } - } - } -} +uint_module!(uint) diff --git a/src/libstd/num/uint_macros.rs b/src/libstd/num/uint_macros.rs index fac8736b929..3e64c171613 100644 --- a/src/libstd/num/uint_macros.rs +++ b/src/libstd/num/uint_macros.rs @@ -12,140 +12,7 @@ #![doc(hidden)] #![allow(unsigned_negate)] -macro_rules! uint_module (($T:ty, $T_SIGNED:ty, $bits:expr) => ( - -pub static BITS : uint = $bits; -pub static BYTES : uint = ($bits / 8); - -pub static MIN: $T = 0 as $T; -pub static MAX: $T = 0 as $T - 1 as $T; - -impl CheckedDiv for $T { - #[inline] - fn checked_div(&self, v: &$T) -> Option<$T> { - if *v == 0 { - None - } else { - Some(self / *v) - } - } -} - -impl Num for $T {} - -#[cfg(not(test))] -impl Ord for $T { - #[inline] - fn lt(&self, other: &$T) -> bool { (*self) < (*other) } -} - -#[cfg(not(test))] -impl Eq for $T { - #[inline] - fn eq(&self, other: &$T) -> bool { return (*self) == (*other); } -} - -impl Default for $T { - #[inline] - fn default() -> $T { 0 } -} - -impl Zero for $T { - #[inline] - fn zero() -> $T { 0 } - - #[inline] - fn is_zero(&self) -> bool { *self == 0 } -} - -impl One for $T { - #[inline] - fn one() -> $T { 1 } -} - -#[cfg(not(test))] -impl Add<$T,$T> for $T { - #[inline] - fn add(&self, other: &$T) -> $T { *self + *other } -} - -#[cfg(not(test))] -impl Sub<$T,$T> for $T { - #[inline] - fn sub(&self, other: &$T) -> $T { *self - *other } -} - -#[cfg(not(test))] -impl Mul<$T,$T> for $T { - #[inline] - fn mul(&self, other: &$T) -> $T { *self * *other } -} - -#[cfg(not(test))] -impl Div<$T,$T> for $T { - #[inline] - fn div(&self, other: &$T) -> $T { *self / *other } -} - -#[cfg(not(test))] -impl Rem<$T,$T> for $T { - #[inline] - fn rem(&self, other: &$T) -> $T { *self % *other } -} - -#[cfg(not(test))] -impl Neg<$T> for $T { - #[inline] - fn neg(&self) -> $T { -*self } -} - -impl Unsigned for $T {} - -#[cfg(not(test))] -impl BitOr<$T,$T> for $T { - #[inline] - fn bitor(&self, other: &$T) -> $T { *self | *other } -} - -#[cfg(not(test))] -impl BitAnd<$T,$T> for $T { - #[inline] - fn bitand(&self, other: &$T) -> $T { *self & *other } -} - -#[cfg(not(test))] -impl BitXor<$T,$T> for $T { - #[inline] - fn bitxor(&self, other: &$T) -> $T { *self ^ *other } -} - -#[cfg(not(test))] -impl Shl<$T,$T> for $T { - #[inline] - fn shl(&self, other: &$T) -> $T { *self << *other } -} - -#[cfg(not(test))] -impl Shr<$T,$T> for $T { - #[inline] - fn shr(&self, other: &$T) -> $T { *self >> *other } -} - -#[cfg(not(test))] -impl Not<$T> for $T { - #[inline] - fn not(&self) -> $T { !*self } -} - -impl Bounded for $T { - #[inline] - fn min_value() -> $T { MIN } - - #[inline] - fn max_value() -> $T { MAX } -} - -impl Int for $T {} +macro_rules! uint_module (($T:ty) => ( // String conversion functions and impl str -> num @@ -211,7 +78,7 @@ impl ToStrRadix for $T { /// Convert to a string in a given base. #[inline] fn to_str_radix(&self, radix: uint) -> ~str { - let mut buf = Vec::new(); + let mut buf = ::vec::Vec::new(); strconv::int_to_str_bytes_common(*self, radix, strconv::SignNone, |i| { buf.push(i); }); @@ -221,78 +88,15 @@ impl ToStrRadix for $T { } } -impl Primitive for $T {} - -impl Bitwise for $T { - /// Returns the number of ones in the binary representation of the number. - #[inline] - fn count_ones(&self) -> $T { - (*self as $T_SIGNED).count_ones() as $T - } - - /// Returns the number of leading zeros in the in the binary representation - /// of the number. - #[inline] - fn leading_zeros(&self) -> $T { - (*self as $T_SIGNED).leading_zeros() as $T - } - - /// Returns the number of trailing zeros in the in the binary representation - /// of the number. - #[inline] - fn trailing_zeros(&self) -> $T { - (*self as $T_SIGNED).trailing_zeros() as $T - } -} - #[cfg(test)] mod tests { use prelude::*; use super::*; - use num; - use num::CheckedDiv; - use num::Bitwise; use num::ToStrRadix; use str::StrSlice; use u16; - #[test] - fn test_overflows() { - assert!(MAX > 0); - assert!(MIN <= 0); - assert_eq!(MIN + MAX + 1, 0); - } - - #[test] - fn test_num() { - num::test_num(10 as $T, 2 as $T); - } - - #[test] - fn test_bitwise() { - assert_eq!(0b1110 as $T, (0b1100 as $T).bitor(&(0b1010 as $T))); - assert_eq!(0b1000 as $T, (0b1100 as $T).bitand(&(0b1010 as $T))); - assert_eq!(0b0110 as $T, (0b1100 as $T).bitxor(&(0b1010 as $T))); - assert_eq!(0b1110 as $T, (0b0111 as $T).shl(&(1 as $T))); - assert_eq!(0b0111 as $T, (0b1110 as $T).shr(&(1 as $T))); - assert_eq!(MAX - (0b1011 as $T), (0b1011 as $T).not()); - } - - #[test] - fn test_count_ones() { - assert_eq!((0b0101100 as $T).count_ones(), 3); - assert_eq!((0b0100001 as $T).count_ones(), 2); - assert_eq!((0b1111001 as $T).count_ones(), 5); - } - - #[test] - fn test_count_zeros() { - assert_eq!((0b0101100 as $T).count_zeros(), BITS as $T - 3); - assert_eq!((0b0100001 as $T).count_zeros(), BITS as $T - 2); - assert_eq!((0b1111001 as $T).count_zeros(), BITS as $T - 5); - } - #[test] pub fn test_to_str() { assert_eq!((0 as $T).to_str_radix(10u), "0".to_owned()); @@ -404,12 +208,6 @@ mod tests { pub fn to_str_radix37() { 100u.to_str_radix(37u); } - - #[test] - fn test_unsigned_checked_div() { - assert_eq!(10u.checked_div(&2), Some(5)); - assert_eq!(5u.checked_div(&0), None); - } } )) diff --git a/src/libstd/option.rs b/src/libstd/option.rs index fa7b5c94857..8fbcd529b63 100644 --- a/src/libstd/option.rs +++ b/src/libstd/option.rs @@ -1,4 +1,4 @@ -// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT // file at the top-level directory of this distribution and at // http://rust-lang.org/COPYRIGHT. // @@ -139,744 +139,29 @@ //! ``` use any::Any; -use clone::Clone; -use cmp::{Eq, TotalEq, TotalOrd}; -use default::Default; -use iter::{Iterator, DoubleEndedIterator, FromIterator, ExactSize}; use kinds::Send; -use mem; -use slice; -/// The `Option` -#[deriving(Clone, Eq, Ord, TotalEq, TotalOrd, Show)] -pub enum Option { - /// No value - None, - /// Some value `T` - Some(T) -} +pub use core::option::{Option, Some, None, Item, collect}; -///////////////////////////////////////////////////////////////////////////// -// Type implementation -///////////////////////////////////////////////////////////////////////////// - -impl Option { - ///////////////////////////////////////////////////////////////////////// - // Querying the contained values - ///////////////////////////////////////////////////////////////////////// - - /// Returns `true` if the option is a `Some` value - #[inline] - pub fn is_some(&self) -> bool { - match *self { - Some(_) => true, - None => false - } - } - - /// Returns `true` if the option is a `None` value - #[inline] - pub fn is_none(&self) -> bool { - !self.is_some() - } - - ///////////////////////////////////////////////////////////////////////// - // Adapter for working with references - ///////////////////////////////////////////////////////////////////////// - - /// Convert from `Option` to `Option<&T>` - /// - /// # Example - /// - /// Convert an `Option<~str>` into an `Option`, preserving the original. - /// The `map` method takes the `self` argument by value, consuming the original, - /// so this technique uses `as_ref` to first take an `Option` to a reference - /// to the value inside the original. - /// - /// ``` - /// let num_as_str: Option<~str> = Some("10".to_owned()); - /// // First, cast `Option<~str>` to `Option<&~str>` with `as_ref`, - /// // then consume *that* with `map`, leaving `num_as_str` on the stack. - /// let num_as_int: Option = num_as_str.as_ref().map(|n| n.len()); - /// println!("still can print num_as_str: {}", num_as_str); - /// ``` - #[inline] - pub fn as_ref<'r>(&'r self) -> Option<&'r T> { - match *self { Some(ref x) => Some(x), None => None } - } - - /// Convert from `Option` to `Option<&mut T>` - #[inline] - pub fn as_mut<'r>(&'r mut self) -> Option<&'r mut T> { - match *self { Some(ref mut x) => Some(x), None => None } - } - - /// Convert from `Option` to `&[T]` (without copying) - #[inline] - pub fn as_slice<'r>(&'r self) -> &'r [T] { - match *self { - Some(ref x) => slice::ref_slice(x), - None => &[] - } - } - - /// Convert from `Option` to `&mut [T]` (without copying) - #[inline] - pub fn as_mut_slice<'r>(&'r mut self) -> &'r mut [T] { - match *self { - Some(ref mut x) => slice::mut_ref_slice(x), - None => &mut [] - } - } - - ///////////////////////////////////////////////////////////////////////// - // Getting to contained values - ///////////////////////////////////////////////////////////////////////// +/// Extension trait for the `Option` type to add an `expect` method +// FIXME(#14008) should this trait even exist? +pub trait Expect { /// Unwraps an option, yielding the content of a `Some` /// /// # Failure /// - /// Fails if the value is a `None` with a custom failure message provided by `msg`. + /// Fails if the value is a `None` with a custom failure message provided by + /// `msg`. + fn expect(self, m: M) -> T; +} + +impl Expect for Option { #[inline] - pub fn expect(self, msg: M) -> T { + fn expect(self, msg: M) -> T { match self { Some(val) => val, None => fail!(msg), } } - - /// Moves a value out of an option type and returns it, consuming the `Option`. - /// - /// # Failure - /// - /// Fails if the self value equals `None`. - /// - /// # Safety note - /// - /// In general, because this function may fail, its use is discouraged. - /// Instead, prefer to use pattern matching and handle the `None` - /// case explicitly. - #[inline] - pub fn unwrap(self) -> T { - match self { - Some(val) => val, - None => fail!("called `Option::unwrap()` on a `None` value"), - } - } - - /// Returns the contained value or a default. - #[inline] - pub fn unwrap_or(self, def: T) -> T { - match self { - Some(x) => x, - None => def - } - } - - /// Returns the contained value or computes it from a closure. - #[inline] - pub fn unwrap_or_else(self, f: || -> T) -> T { - match self { - Some(x) => x, - None => f() - } - } - - ///////////////////////////////////////////////////////////////////////// - // Transforming contained values - ///////////////////////////////////////////////////////////////////////// - - /// Maps an `Option` to `Option` by applying a function to a contained value - /// - /// # Example - /// - /// Convert an `Option<~str>` into an `Option`, consuming the original: - /// - /// ``` - /// let num_as_str: Option<~str> = Some("10".to_owned()); - /// // `Option::map` takes self *by value*, consuming `num_as_str` - /// let num_as_int: Option = num_as_str.map(|n| n.len()); - /// ``` - #[inline] - pub fn map(self, f: |T| -> U) -> Option { - match self { Some(x) => Some(f(x)), None => None } - } - - /// Applies a function to the contained value or returns a default. - #[inline] - pub fn map_or(self, def: U, f: |T| -> U) -> U { - match self { None => def, Some(t) => f(t) } - } - - /// Applies a function to the contained value or does nothing. - /// Returns true if the contained value was mutated. - pub fn mutate(&mut self, f: |T| -> T) -> bool { - if self.is_some() { - *self = Some(f(self.take_unwrap())); - true - } else { false } - } - - /// Applies a function to the contained value or sets it to a default. - /// Returns true if the contained value was mutated, or false if set to the default. - pub fn mutate_or_set(&mut self, def: T, f: |T| -> T) -> bool { - if self.is_some() { - *self = Some(f(self.take_unwrap())); - true - } else { - *self = Some(def); - false - } - } - - ///////////////////////////////////////////////////////////////////////// - // Iterator constructors - ///////////////////////////////////////////////////////////////////////// - - /// Returns an iterator over the possibly contained value. - #[inline] - pub fn iter<'r>(&'r self) -> Item<&'r T> { - Item{opt: self.as_ref()} - } - - /// Returns a mutable iterator over the possibly contained value. - #[inline] - pub fn mut_iter<'r>(&'r mut self) -> Item<&'r mut T> { - Item{opt: self.as_mut()} - } - - /// Returns a consuming iterator over the possibly contained value. - #[inline] - pub fn move_iter(self) -> Item { - Item{opt: self} - } - - ///////////////////////////////////////////////////////////////////////// - // Boolean operations on the values, eager and lazy - ///////////////////////////////////////////////////////////////////////// - - /// Returns `None` if the option is `None`, otherwise returns `optb`. - #[inline] - pub fn and(self, optb: Option) -> Option { - match self { - Some(_) => optb, - None => None, - } - } - - /// Returns `None` if the option is `None`, otherwise calls `f` with the - /// wrapped value and returns the result. - #[inline] - pub fn and_then(self, f: |T| -> Option) -> Option { - match self { - Some(x) => f(x), - None => None, - } - } - - /// Returns the option if it contains a value, otherwise returns `optb`. - #[inline] - pub fn or(self, optb: Option) -> Option { - match self { - Some(_) => self, - None => optb - } - } - - /// Returns the option if it contains a value, otherwise calls `f` and - /// returns the result. - #[inline] - pub fn or_else(self, f: || -> Option) -> Option { - match self { - Some(_) => self, - None => f() - } - } - - ///////////////////////////////////////////////////////////////////////// - // Misc - ///////////////////////////////////////////////////////////////////////// - - /// Takes the value out of the option, leaving a `None` in its place. - #[inline] - pub fn take(&mut self) -> Option { - mem::replace(self, None) - } - - /// Filters an optional value using a given function. - #[inline(always)] - pub fn filtered(self, f: |t: &T| -> bool) -> Option { - match self { - Some(x) => if f(&x) { Some(x) } else { None }, - None => None - } - } - - /// Applies a function zero or more times until the result is `None`. - #[inline] - pub fn while_some(self, f: |v: T| -> Option) { - let mut opt = self; - loop { - match opt { - Some(x) => opt = f(x), - None => break - } - } - } - - ///////////////////////////////////////////////////////////////////////// - // Common special cases - ///////////////////////////////////////////////////////////////////////// - - /// The option dance. Moves a value out of an option type and returns it, - /// replacing the original with `None`. - /// - /// # Failure - /// - /// Fails if the value equals `None`. - #[inline] - pub fn take_unwrap(&mut self) -> T { - match self.take() { - Some(x) => x, - None => fail!("called `Option::take_unwrap()` on a `None` value") - } - } - - /// Gets an immutable reference to the value inside an option. - /// - /// # Failure - /// - /// Fails if the value equals `None` - /// - /// # Safety note - /// - /// In general, because this function may fail, its use is discouraged - /// (calling `get` on `None` is akin to dereferencing a null pointer). - /// Instead, prefer to use pattern matching and handle the `None` - /// case explicitly. - #[inline] - pub fn get_ref<'a>(&'a self) -> &'a T { - match *self { - Some(ref x) => x, - None => fail!("called `Option::get_ref()` on a `None` value"), - } - } - - /// Gets a mutable reference to the value inside an option. - /// - /// # Failure - /// - /// Fails if the value equals `None` - /// - /// # Safety note - /// - /// In general, because this function may fail, its use is discouraged - /// (calling `get` on `None` is akin to dereferencing a null pointer). - /// Instead, prefer to use pattern matching and handle the `None` - /// case explicitly. - #[inline] - pub fn get_mut_ref<'a>(&'a mut self) -> &'a mut T { - match *self { - Some(ref mut x) => x, - None => fail!("called `Option::get_mut_ref()` on a `None` value"), - } - } -} - -impl Option { - /// Returns the contained value or a default - /// - /// Consumes the `self` argument then, if `Some`, returns the contained - /// value, otherwise if `None`, returns the default value for that - /// type. - /// - /// # Example - /// - /// Convert a string to an integer, turning poorly-formed strings - /// into 0 (the default value for integers). `from_str` converts - /// a string to any other type that implements `FromStr`, returning - /// `None` on error. - /// - /// ``` - /// let good_year_from_input = "1909"; - /// let bad_year_from_input = "190blarg"; - /// let good_year = from_str(good_year_from_input).unwrap_or_default(); - /// let bad_year = from_str(bad_year_from_input).unwrap_or_default(); - /// - /// assert_eq!(1909, good_year); - /// assert_eq!(0, bad_year); - /// ``` - #[inline] - pub fn unwrap_or_default(self) -> T { - match self { - Some(x) => x, - None => Default::default() - } - } -} - -///////////////////////////////////////////////////////////////////////////// -// Trait implementations -///////////////////////////////////////////////////////////////////////////// - -impl Default for Option { - #[inline] - fn default() -> Option { None } -} - -///////////////////////////////////////////////////////////////////////////// -// The Option Iterator -///////////////////////////////////////////////////////////////////////////// - -/// An `Option` iterator that yields either one or zero elements -/// -/// The `Item` iterator is returned by the `iter`, `mut_iter` and `move_iter` -/// methods on `Option`. -#[deriving(Clone)] -pub struct Item { - opt: Option -} - -impl Iterator for Item { - #[inline] - fn next(&mut self) -> Option { - self.opt.take() - } - - #[inline] - fn size_hint(&self) -> (uint, Option) { - match self.opt { - Some(_) => (1, Some(1)), - None => (0, Some(0)), - } - } -} - -impl DoubleEndedIterator for Item { - #[inline] - fn next_back(&mut self) -> Option { - self.opt.take() - } -} - -impl ExactSize for Item {} - -///////////////////////////////////////////////////////////////////////////// -// Free functions -///////////////////////////////////////////////////////////////////////////// - -/// Takes each element in the `Iterator`: if it is `None`, no further -/// elements are taken, and the `None` is returned. Should no `None` occur, a -/// vector containing the values of each `Option` is returned. -/// -/// Here is an example which increments every integer in a vector, -/// checking for overflow: -/// -/// fn inc_conditionally(x: uint) -> Option { -/// if x == uint::MAX { return None; } -/// else { return Some(x+1u); } -/// } -/// let v = [1u, 2, 3]; -/// let res = collect(v.iter().map(|&x| inc_conditionally(x))); -/// assert!(res == Some(~[2u, 3, 4])); -#[inline] -pub fn collect>, V: FromIterator>(iter: Iter) -> Option { - // FIXME(#11084): This should be twice as fast once this bug is closed. - let mut iter = iter.scan(false, |state, x| { - match x { - Some(x) => Some(x), - None => { - *state = true; - None - } - } - }); - - let v: V = FromIterator::from_iter(iter.by_ref()); - - if iter.state { - None - } else { - Some(v) - } -} - -///////////////////////////////////////////////////////////////////////////// -// Tests -///////////////////////////////////////////////////////////////////////////// - -#[cfg(test)] -mod tests { - use super::*; - use prelude::*; - - use iter::range; - use str::StrSlice; - use kinds::marker; - use slice::ImmutableVector; - - #[test] - fn test_get_ptr() { - unsafe { - let x = box 0; - let addr_x: *int = ::cast::transmute(&*x); - let opt = Some(x); - let y = opt.unwrap(); - let addr_y: *int = ::cast::transmute(&*y); - assert_eq!(addr_x, addr_y); - } - } - - #[test] - fn test_get_str() { - let x = "test".to_owned(); - let addr_x = x.as_ptr(); - let opt = Some(x); - let y = opt.unwrap(); - let addr_y = y.as_ptr(); - assert_eq!(addr_x, addr_y); - } - - #[test] - fn test_get_resource() { - use rc::Rc; - use cell::RefCell; - - struct R { - i: Rc>, - } - - #[unsafe_destructor] - impl ::ops::Drop for R { - fn drop(&mut self) { - let ii = &*self.i; - let i = ii.borrow().clone(); - *ii.borrow_mut() = i + 1; - } - } - - fn R(i: Rc>) -> R { - R { - i: i - } - } - - let i = Rc::new(RefCell::new(0)); - { - let x = R(i.clone()); - let opt = Some(x); - let _y = opt.unwrap(); - } - assert_eq!(*i.borrow(), 1); - } - - #[test] - fn test_option_dance() { - let x = Some(()); - let mut y = Some(5); - let mut y2 = 0; - for _x in x.iter() { - y2 = y.take_unwrap(); - } - assert_eq!(y2, 5); - assert!(y.is_none()); - } - - #[test] #[should_fail] - fn test_option_too_much_dance() { - let mut y = Some(marker::NoCopy); - let _y2 = y.take_unwrap(); - let _y3 = y.take_unwrap(); - } - - #[test] - fn test_and() { - let x: Option = Some(1); - assert_eq!(x.and(Some(2)), Some(2)); - assert_eq!(x.and(None::), None); - - let x: Option = None; - assert_eq!(x.and(Some(2)), None); - assert_eq!(x.and(None::), None); - } - - #[test] - fn test_and_then() { - let x: Option = Some(1); - assert_eq!(x.and_then(|x| Some(x + 1)), Some(2)); - assert_eq!(x.and_then(|_| None::), None); - - let x: Option = None; - assert_eq!(x.and_then(|x| Some(x + 1)), None); - assert_eq!(x.and_then(|_| None::), None); - } - - #[test] - fn test_or() { - let x: Option = Some(1); - assert_eq!(x.or(Some(2)), Some(1)); - assert_eq!(x.or(None), Some(1)); - - let x: Option = None; - assert_eq!(x.or(Some(2)), Some(2)); - assert_eq!(x.or(None), None); - } - - #[test] - fn test_or_else() { - let x: Option = Some(1); - assert_eq!(x.or_else(|| Some(2)), Some(1)); - assert_eq!(x.or_else(|| None), Some(1)); - - let x: Option = None; - assert_eq!(x.or_else(|| Some(2)), Some(2)); - assert_eq!(x.or_else(|| None), None); - } - - #[test] - fn test_option_while_some() { - let mut i = 0; - Some(10).while_some(|j| { - i += 1; - if j > 0 { - Some(j-1) - } else { - None - } - }); - assert_eq!(i, 11); - } - - #[test] - fn test_unwrap() { - assert_eq!(Some(1).unwrap(), 1); - assert_eq!(Some("hello".to_owned()).unwrap(), "hello".to_owned()); - } - - #[test] - #[should_fail] - fn test_unwrap_fail1() { - let x: Option = None; - x.unwrap(); - } - - #[test] - #[should_fail] - fn test_unwrap_fail2() { - let x: Option<~str> = None; - x.unwrap(); - } - - #[test] - fn test_unwrap_or() { - let x: Option = Some(1); - assert_eq!(x.unwrap_or(2), 1); - - let x: Option = None; - assert_eq!(x.unwrap_or(2), 2); - } - - #[test] - fn test_unwrap_or_else() { - let x: Option = Some(1); - assert_eq!(x.unwrap_or_else(|| 2), 1); - - let x: Option = None; - assert_eq!(x.unwrap_or_else(|| 2), 2); - } - - #[test] - fn test_filtered() { - let some_stuff = Some(42); - let modified_stuff = some_stuff.filtered(|&x| {x < 10}); - assert_eq!(some_stuff.unwrap(), 42); - assert!(modified_stuff.is_none()); - } - - #[test] - fn test_iter() { - let val = 5; - - let x = Some(val); - let mut it = x.iter(); - - assert_eq!(it.size_hint(), (1, Some(1))); - assert_eq!(it.next(), Some(&val)); - assert_eq!(it.size_hint(), (0, Some(0))); - assert!(it.next().is_none()); - } - - #[test] - fn test_mut_iter() { - let val = 5; - let new_val = 11; - - let mut x = Some(val); - { - let mut it = x.mut_iter(); - - assert_eq!(it.size_hint(), (1, Some(1))); - - match it.next() { - Some(interior) => { - assert_eq!(*interior, val); - *interior = new_val; - } - None => assert!(false), - } - - assert_eq!(it.size_hint(), (0, Some(0))); - assert!(it.next().is_none()); - } - assert_eq!(x, Some(new_val)); - } - - #[test] - fn test_ord() { - let small = Some(1.0); - let big = Some(5.0); - let nan = Some(0.0/0.0); - assert!(!(nan < big)); - assert!(!(nan > big)); - assert!(small < big); - assert!(None < big); - assert!(big > None); - } - - #[test] - fn test_mutate() { - let mut x = Some(3i); - assert!(x.mutate(|i| i+1)); - assert_eq!(x, Some(4i)); - assert!(x.mutate_or_set(0, |i| i+1)); - assert_eq!(x, Some(5i)); - x = None; - assert!(!x.mutate(|i| i+1)); - assert_eq!(x, None); - assert!(!x.mutate_or_set(0i, |i| i+1)); - assert_eq!(x, Some(0i)); - } - - #[test] - fn test_collect() { - let v: Option<~[int]> = collect(range(0, 0) - .map(|_| Some(0))); - assert_eq!(v, Some(box [])); - - let v: Option<~[int]> = collect(range(0, 3) - .map(|x| Some(x))); - assert_eq!(v, Some(box [0, 1, 2])); - - let v: Option<~[int]> = collect(range(0, 3) - .map(|x| if x > 1 { None } else { Some(x) })); - assert_eq!(v, None); - - // test that it does not take more elements than it needs - let mut functions = [|| Some(()), || None, || fail!()]; - - let v: Option<~[()]> = collect(functions.mut_iter().map(|f| (*f)())); - - assert_eq!(v, None); - } } diff --git a/src/libstd/os.rs b/src/libstd/os.rs index 071aae974db..809757aaf4d 100644 --- a/src/libstd/os.rs +++ b/src/libstd/os.rs @@ -38,7 +38,7 @@ use ops::Drop; use result::{Err, Ok, Result}; use ptr; use str; -use str::{Str, StrSlice}; +use str::{Str, StrSlice, StrAllocating}; use fmt; use sync::atomics::{AtomicInt, INIT_ATOMIC_INT, SeqCst}; use path::{Path, GenericPath}; @@ -81,6 +81,8 @@ pub fn getcwd() -> Path { pub fn getcwd() -> Path { use libc::DWORD; use libc::GetCurrentDirectoryW; + use option::Expect; + let mut buf = [0 as u16, ..BUF_BYTES]; unsafe { if libc::GetCurrentDirectoryW(buf.len() as DWORD, buf.as_mut_ptr()) == 0 as DWORD { @@ -96,11 +98,11 @@ pub mod win32 { use iter::Iterator; use libc::types::os::arch::extra::DWORD; use libc; - use option::{None, Option}; + use option::{None, Option, Expect}; use option; use os::TMPBUF_SZ; use slice::{MutableVector, ImmutableVector, OwnedVector}; - use str::StrSlice; + use str::{StrSlice, StrAllocating}; use str; use vec::Vec; @@ -182,7 +184,6 @@ pub fn env_as_bytes() -> ~[(~[u8],~[u8])] { #[cfg(windows)] unsafe fn get_env_pairs() -> Vec<~[u8]> { use c_str; - use str::StrSlice; use libc::funcs::extra::kernel32::{ GetEnvironmentStringsA, @@ -830,6 +831,7 @@ fn real_args() -> ~[~str] { #[cfg(windows)] fn real_args() -> ~[~str] { use slice; + use option::Expect; let mut nArgs: c_int = 0; let lpArgCount: *mut c_int = &mut nArgs; diff --git a/src/libstd/path/windows.rs b/src/libstd/path/windows.rs index 758a76167cd..f21fbe1b6e6 100644 --- a/src/libstd/path/windows.rs +++ b/src/libstd/path/windows.rs @@ -21,7 +21,7 @@ use io::Writer; use iter::{AdditiveIterator, DoubleEndedIterator, Extendable, Rev, Iterator, Map}; use option::{Option, Some, None}; use slice::{Vector, OwnedVector, ImmutableVector}; -use str::{CharSplits, Str, StrVector, StrSlice}; +use str::{CharSplits, Str, StrAllocating, StrVector, StrSlice}; use strbuf::StrBuf; use vec::Vec; @@ -684,7 +684,7 @@ impl Path { } } - fn normalize_(s: S) -> (Option, StrBuf) { + fn normalize_(s: S) -> (Option, StrBuf) { // make borrowck happy let (prefix, val) = { let prefix = parse_prefix(s.as_slice()); @@ -842,7 +842,7 @@ impl Path { } fn update_normalized(&mut self, s: S) { - let (prefix, path) = Path::normalize_(s); + let (prefix, path) = Path::normalize_(s.as_slice()); self.repr = path; self.prefix = prefix; self.update_sepidx(); diff --git a/src/libstd/prelude.rs b/src/libstd/prelude.rs index ee1d5d4a35b..6cd9e96496f 100644 --- a/src/libstd/prelude.rs +++ b/src/libstd/prelude.rs @@ -65,18 +65,21 @@ pub use iter::{OrdIterator, MutableDoubleEndedIterator, ExactSize}; pub use num::{Num, NumCast, CheckedAdd, CheckedSub, CheckedMul}; pub use num::{Signed, Unsigned}; pub use num::{Primitive, Int, Float, ToPrimitive, FromPrimitive}; +pub use option::Expect; pub use owned::Box; pub use path::{GenericPath, Path, PosixPath, WindowsPath}; pub use ptr::RawPtr; pub use io::{Buffer, Writer, Reader, Seek}; +pub use result::{ResultUnwrap, ResultUnwrapErr}; pub use str::{Str, StrVector, StrSlice, OwnedStr, IntoMaybeOwned}; +pub use str::{StrAllocating}; pub use to_str::{ToStr, IntoStr}; pub use tuple::{Tuple1, Tuple2, Tuple3, Tuple4}; pub use tuple::{Tuple5, Tuple6, Tuple7, Tuple8}; pub use tuple::{Tuple9, Tuple10, Tuple11, Tuple12}; pub use slice::{ImmutableEqVector, ImmutableTotalOrdVector, ImmutableCloneableVector}; pub use slice::{OwnedVector}; -pub use slice::{MutableVector, MutableTotalOrdVector}; +pub use slice::{MutableVector, MutableTotalOrdVector, MutableVectorAllocating}; pub use slice::{Vector, VectorVector, CloneableVector, ImmutableVector}; pub use strbuf::StrBuf; pub use vec::Vec; diff --git a/src/libstd/reference.rs b/src/libstd/reference.rs deleted file mode 100644 index eb615afd85f..00000000000 --- a/src/libstd/reference.rs +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -//! Utilities for references - -#[cfg(not(test))] -use cmp::{Eq, Ord, Ordering, TotalEq, TotalOrd}; - -// Equality for region pointers -#[cfg(not(test))] -impl<'a, T: Eq> Eq for &'a T { - #[inline] - fn eq(&self, other: & &'a T) -> bool { - *(*self) == *(*other) - } - #[inline] - fn ne(&self, other: & &'a T) -> bool { - *(*self) != *(*other) - } -} - -// Comparison for region pointers -#[cfg(not(test))] -impl<'a, T: Ord> Ord for &'a T { - #[inline] - fn lt(&self, other: & &'a T) -> bool { - *(*self) < *(*other) - } - #[inline] - fn le(&self, other: & &'a T) -> bool { - *(*self) <= *(*other) - } - #[inline] - fn ge(&self, other: & &'a T) -> bool { - *(*self) >= *(*other) - } - #[inline] - fn gt(&self, other: & &'a T) -> bool { - *(*self) > *(*other) - } -} - -#[cfg(not(test))] -impl<'a, T: TotalOrd> TotalOrd for &'a T { - #[inline] - fn cmp(&self, other: & &'a T) -> Ordering { (**self).cmp(*other) } -} - -#[cfg(not(test))] -impl<'a, T: TotalEq> TotalEq for &'a T {} diff --git a/src/libstd/repr.rs b/src/libstd/repr.rs index 79b927c8d77..35c5cbc85c3 100644 --- a/src/libstd/repr.rs +++ b/src/libstd/repr.rs @@ -25,7 +25,7 @@ use option::{Some, None, Option}; use ptr::RawPtr; use reflect; use reflect::{MovePtr, align}; -use result::{Ok, Err}; +use result::{Ok, Err, ResultUnwrap}; use str::StrSlice; use to_str::ToStr; use slice::Vector; @@ -606,6 +606,7 @@ pub fn write_repr(writer: &mut io::Writer, object: &T) -> io::IoResult<()> { pub fn repr_to_str(t: &T) -> ~str { use str; + use str::StrAllocating; use io; let mut result = io::MemWriter::new(); @@ -624,7 +625,6 @@ fn test_repr() { use io::stdio::println; use char::is_alphabetic; use mem::swap; - use owned::Box; fn exact_test(t: &T, e:&str) { let mut m = io::MemWriter::new(); diff --git a/src/libstd/result.rs b/src/libstd/result.rs index 922d2cf3d32..cc9e6684d28 100644 --- a/src/libstd/result.rs +++ b/src/libstd/result.rs @@ -266,262 +266,32 @@ //! the context. The caller of `fail!` should assume that execution //! will not resume after failure, that failure is catastrophic. -use clone::Clone; -use cmp::Eq; -use std::fmt::Show; -use iter::{Iterator, FromIterator}; -use option::{None, Option, Some}; +use fmt::Show; -/// `Result` is a type that represents either success (`Ok`) or failure (`Err`). -/// -/// See the [`std::result`](index.html) module documentation for details. -#[deriving(Clone, Eq, Ord, TotalEq, TotalOrd, Show, Hash)] -#[must_use] -pub enum Result { - /// Contains the success value - Ok(T), +pub use core::result::{Result, Ok, Err, collect, fold, fold_}; - /// Contains the error value - Err(E) -} +// FIXME: These traits should not exist. Once std::fmt is moved to libcore, +// these can once again become inherent methods on Result. -///////////////////////////////////////////////////////////////////////////// -// Type implementation -///////////////////////////////////////////////////////////////////////////// - -impl Result { - ///////////////////////////////////////////////////////////////////////// - // Querying the contained values - ///////////////////////////////////////////////////////////////////////// - - /// Returns true if the result is `Ok` - /// - /// # Example - /// - /// ~~~ - /// use std::io::{File, Open, Write}; - /// - /// # fn do_not_run_example() { // creates a file - /// let mut file = File::open_mode(&Path::new("secret.txt"), Open, Write); - /// assert!(file.write_line("it's cold in here").is_ok()); - /// # } - /// ~~~ - #[inline] - pub fn is_ok(&self) -> bool { - match *self { - Ok(_) => true, - Err(_) => false - } - } - - /// Returns true if the result is `Err` - /// - /// # Example - /// - /// ~~~ - /// use std::io::{File, Open, Read}; - /// - /// // When opening with `Read` access, if the file does not exist - /// // then `open_mode` returns an error. - /// let bogus = File::open_mode(&Path::new("not_a_file.txt"), Open, Read); - /// assert!(bogus.is_err()); - /// ~~~ - #[inline] - pub fn is_err(&self) -> bool { - !self.is_ok() - } - - - ///////////////////////////////////////////////////////////////////////// - // Adapter for each variant - ///////////////////////////////////////////////////////////////////////// - - /// Convert from `Result` to `Option` - /// - /// Converts `self` into an `Option`, consuming `self`, - /// and discarding the error, if any. - /// - /// To convert to an `Option` without discarding the error value, - /// use `as_ref` to first convert the `Result` into a - /// `Result<&T, &E>`. - /// - /// # Examples - /// - /// ~~~{.should_fail} - /// use std::io::{File, IoResult}; - /// - /// let bdays: IoResult = File::open(&Path::new("important_birthdays.txt")); - /// let bdays: File = bdays.ok().expect("unable to open birthday file"); - /// ~~~ - #[inline] - pub fn ok(self) -> Option { - match self { - Ok(x) => Some(x), - Err(_) => None, - } - } - - /// Convert from `Result` to `Option` - /// - /// Converts `self` into an `Option`, consuming `self`, - /// and discarding the value, if any. - #[inline] - pub fn err(self) -> Option { - match self { - Ok(_) => None, - Err(x) => Some(x), - } - } - - ///////////////////////////////////////////////////////////////////////// - // Adapter for working with references - ///////////////////////////////////////////////////////////////////////// - - /// Convert from `Result` to `Result<&T, &E>` - /// - /// Produces a new `Result`, containing a reference - /// into the original, leaving the original in place. - #[inline] - pub fn as_ref<'r>(&'r self) -> Result<&'r T, &'r E> { - match *self { - Ok(ref x) => Ok(x), - Err(ref x) => Err(x), - } - } - - /// Convert from `Result` to `Result<&mut T, &mut E>` - #[inline] - pub fn as_mut<'r>(&'r mut self) -> Result<&'r mut T, &'r mut E> { - match *self { - Ok(ref mut x) => Ok(x), - Err(ref mut x) => Err(x), - } - } - - ///////////////////////////////////////////////////////////////////////// - // Transforming contained values - ///////////////////////////////////////////////////////////////////////// - - /// Maps a `Result` to `Result` by applying a function to an - /// contained `Ok` value, leaving an `Err` value untouched. - /// - /// This function can be used to compose the results of two functions. - /// - /// # Examples - /// - /// Sum the lines of a buffer by mapping strings to numbers, - /// ignoring I/O and parse errors: - /// - /// ~~~ - /// use std::io::{BufReader, IoResult}; - /// - /// let buffer = "1\n2\n3\n4\n"; - /// let mut reader = BufReader::new(buffer.as_bytes()); - /// - /// let mut sum = 0; - /// - /// while !reader.eof() { - /// let line: IoResult<~str> = reader.read_line(); - /// // Convert the string line to a number using `map` and `from_str` - /// let val: IoResult = line.map(|line| { - /// from_str::(line).unwrap_or(0) - /// }); - /// // Add the value if there were no errors, otherwise add 0 - /// sum += val.ok().unwrap_or(0); - /// } - /// ~~~ - #[inline] - pub fn map(self, op: |T| -> U) -> Result { - match self { - Ok(t) => Ok(op(t)), - Err(e) => Err(e) - } - } - - /// Maps a `Result` to `Result` by applying a function to an - /// contained `Err` value, leaving an `Ok` value untouched. - /// - /// This function can be used to pass through a successful result while handling - /// an error. - #[inline] - pub fn map_err(self, op: |E| -> F) -> Result { - match self { - Ok(t) => Ok(t), - Err(e) => Err(op(e)) - } - } - - //////////////////////////////////////////////////////////////////////// - // Boolean operations on the values, eager and lazy - ///////////////////////////////////////////////////////////////////////// - - /// Returns `res` if the result is `Ok`, otherwise returns the `Err` value of `self`. - #[inline] - pub fn and(self, res: Result) -> Result { - match self { - Ok(_) => res, - Err(e) => Err(e), - } - } - - /// Calls `op` if the result is `Ok`, otherwise returns the `Err` value of `self`. - /// - /// This function can be used for control flow based on result values - #[inline] - pub fn and_then(self, op: |T| -> Result) -> Result { - match self { - Ok(t) => op(t), - Err(e) => Err(e), - } - } - - /// Returns `res` if the result is `Err`, otherwise returns the `Ok` value of `self`. - #[inline] - pub fn or(self, res: Result) -> Result { - match self { - Ok(_) => self, - Err(_) => res, - } - } - - /// Calls `op` if the result is `Err`, otherwise returns the `Ok` value of `self`. - /// - /// This function can be used for control flow based on result values - #[inline] - pub fn or_else(self, op: |E| -> Result) -> Result { - match self { - Ok(t) => Ok(t), - Err(e) => op(e), - } - } - - /// Unwraps a result, yielding the content of an `Ok`. - /// Else it returns `optb`. - #[inline] - pub fn unwrap_or(self, optb: T) -> T { - match self { - Ok(t) => t, - Err(_) => optb - } - } - - /// Unwraps a result, yielding the content of an `Ok`. - /// If the value is an `Err` then it calls `op` with its value. - #[inline] - pub fn unwrap_or_handle(self, op: |E| -> T) -> T { - match self { - Ok(t) => t, - Err(e) => op(e) - } - } -} - -impl Result { +/// Temporary trait for unwrapping a result +pub trait ResultUnwrap { /// Unwraps a result, yielding the content of an `Ok`. /// /// Fails if the value is an `Err`. + fn unwrap(self) -> T; +} + +/// Temporary trait for unwrapping the error of a result +pub trait ResultUnwrapErr { + /// Unwraps a result, yielding the content of an `Err`. + /// + /// Fails if the value is an `Ok`. + fn unwrap_err(self) -> E; +} + +impl ResultUnwrap for Result { #[inline] - pub fn unwrap(self) -> T { + fn unwrap(self) -> T { match self { Ok(t) => t, Err(e) => @@ -530,12 +300,9 @@ impl Result { } } -impl Result { - /// Unwraps a result, yielding the content of an `Err`. - /// - /// Fails if the value is an `Ok`. +impl ResultUnwrapErr for Result { #[inline] - pub fn unwrap_err(self) -> E { + fn unwrap_err(self) -> E { match self { Ok(t) => fail!("called `Result::unwrap_err()` on an `Ok` value: {}", t), @@ -543,241 +310,3 @@ impl Result { } } } - -///////////////////////////////////////////////////////////////////////////// -// Free functions -///////////////////////////////////////////////////////////////////////////// - -/// Takes each element in the `Iterator`: if it is an `Err`, no further -/// elements are taken, and the `Err` is returned. Should no `Err` occur, a -/// vector containing the values of each `Result` is returned. -/// -/// Here is an example which increments every integer in a vector, -/// checking for overflow: -/// -/// fn inc_conditionally(x: uint) -> Result { -/// if x == uint::MAX { return Err("overflow"); } -/// else { return Ok(x+1u); } -/// } -/// let v = [1u, 2, 3]; -/// let res = collect(v.iter().map(|&x| inc_conditionally(x))); -/// assert!(res == Ok(~[2u, 3, 4])); -#[inline] -pub fn collect>, V: FromIterator>(iter: Iter) -> Result { - // FIXME(#11084): This should be twice as fast once this bug is closed. - let mut iter = iter.scan(None, |state, x| { - match x { - Ok(x) => Some(x), - Err(err) => { - *state = Some(err); - None - } - } - }); - - let v: V = FromIterator::from_iter(iter.by_ref()); - - match iter.state { - Some(err) => Err(err), - None => Ok(v), - } -} - -/// Perform a fold operation over the result values from an iterator. -/// -/// If an `Err` is encountered, it is immediately returned. -/// Otherwise, the folded value is returned. -#[inline] -pub fn fold>>( - mut iterator: Iter, - mut init: V, - f: |V, T| -> V) - -> Result { - for t in iterator { - match t { - Ok(v) => init = f(init, v), - Err(u) => return Err(u) - } - } - Ok(init) -} - -/// Perform a trivial fold operation over the result values -/// from an iterator. -/// -/// If an `Err` is encountered, it is immediately returned. -/// Otherwise, a simple `Ok(())` is returned. -#[inline] -pub fn fold_>>(iterator: Iter) -> Result<(),E> { - fold(iterator, (), |_, _| ()) -} - -///////////////////////////////////////////////////////////////////////////// -// Tests -///////////////////////////////////////////////////////////////////////////// - -#[cfg(test)] -mod tests { - use super::*; - use prelude::*; - use str::StrSlice; - - use iter::range; - - pub fn op1() -> Result { Ok(666) } - pub fn op2() -> Result { Err("sadface".to_owned()) } - - #[test] - pub fn test_and() { - assert_eq!(op1().and(Ok(667)).unwrap(), 667); - assert_eq!(op1().and(Err::<(), ~str>("bad".to_owned())).unwrap_err(), "bad".to_owned()); - - assert_eq!(op2().and(Ok(667)).unwrap_err(), "sadface".to_owned()); - assert_eq!(op2().and(Err::<(), ~str>("bad".to_owned())).unwrap_err(), "sadface".to_owned()); - } - - #[test] - pub fn test_and_then() { - assert_eq!(op1().and_then(|i| Ok::(i + 1)).unwrap(), 667); - assert_eq!(op1().and_then(|_| Err::("bad".to_owned())).unwrap_err(), - "bad".to_owned()); - - assert_eq!(op2().and_then(|i| Ok::(i + 1)).unwrap_err(), - "sadface".to_owned()); - assert_eq!(op2().and_then(|_| Err::("bad".to_owned())).unwrap_err(), - "sadface".to_owned()); - } - - #[test] - pub fn test_or() { - assert_eq!(op1().or(Ok(667)).unwrap(), 666); - assert_eq!(op1().or(Err("bad".to_owned())).unwrap(), 666); - - assert_eq!(op2().or(Ok(667)).unwrap(), 667); - assert_eq!(op2().or(Err("bad".to_owned())).unwrap_err(), "bad".to_owned()); - } - - #[test] - pub fn test_or_else() { - assert_eq!(op1().or_else(|_| Ok::(667)).unwrap(), 666); - assert_eq!(op1().or_else(|e| Err::(e + "!")).unwrap(), 666); - - assert_eq!(op2().or_else(|_| Ok::(667)).unwrap(), 667); - assert_eq!(op2().or_else(|e| Err::(e + "!")).unwrap_err(), - "sadface!".to_owned()); - } - - #[test] - pub fn test_impl_map() { - assert_eq!(Ok::<~str, ~str>("a".to_owned()).map(|x| x + "b"), Ok("ab".to_owned())); - assert_eq!(Err::<~str, ~str>("a".to_owned()).map(|x| x + "b"), Err("a".to_owned())); - } - - #[test] - pub fn test_impl_map_err() { - assert_eq!(Ok::<~str, ~str>("a".to_owned()).map_err(|x| x + "b"), Ok("a".to_owned())); - assert_eq!(Err::<~str, ~str>("a".to_owned()).map_err(|x| x + "b"), Err("ab".to_owned())); - } - - #[test] - fn test_collect() { - let v: Result<~[int], ()> = collect(range(0, 0).map(|_| Ok::(0))); - assert_eq!(v, Ok(box [])); - - let v: Result<~[int], ()> = collect(range(0, 3).map(|x| Ok::(x))); - assert_eq!(v, Ok(box [0, 1, 2])); - - let v: Result<~[int], int> = collect(range(0, 3) - .map(|x| if x > 1 { Err(x) } else { Ok(x) })); - assert_eq!(v, Err(2)); - - // test that it does not take more elements than it needs - let mut functions = [|| Ok(()), || Err(1), || fail!()]; - - let v: Result<~[()], int> = collect(functions.mut_iter().map(|f| (*f)())); - assert_eq!(v, Err(1)); - } - - #[test] - fn test_fold() { - assert_eq!(fold_(range(0, 0) - .map(|_| Ok::<(), ()>(()))), - Ok(())); - assert_eq!(fold(range(0, 3) - .map(|x| Ok::(x)), - 0, |a, b| a + b), - Ok(3)); - assert_eq!(fold_(range(0, 3) - .map(|x| if x > 1 { Err(x) } else { Ok(()) })), - Err(2)); - - // test that it does not take more elements than it needs - let mut functions = [|| Ok(()), || Err(1), || fail!()]; - - assert_eq!(fold_(functions.mut_iter() - .map(|f| (*f)())), - Err(1)); - } - - #[test] - pub fn test_to_str() { - let ok: Result = Ok(100); - let err: Result = Err("Err".to_owned()); - - assert_eq!(ok.to_str(), "Ok(100)".to_owned()); - assert_eq!(err.to_str(), "Err(Err)".to_owned()); - } - - #[test] - pub fn test_fmt_default() { - let ok: Result = Ok(100); - let err: Result = Err("Err".to_owned()); - - assert_eq!(format!("{}", ok), "Ok(100)".to_owned()); - assert_eq!(format!("{}", err), "Err(Err)".to_owned()); - } - - #[test] - pub fn test_unwrap_or() { - let ok: Result = Ok(100); - let ok_err: Result = Err("Err".to_owned()); - - assert_eq!(ok.unwrap_or(50), 100); - assert_eq!(ok_err.unwrap_or(50), 50); - } - - #[test] - pub fn test_unwrap_or_else() { - fn handler(msg: ~str) -> int { - if msg == "I got this.".to_owned() { - 50 - } else { - fail!("BadBad") - } - } - - let ok: Result = Ok(100); - let ok_err: Result = Err("I got this.".to_owned()); - - assert_eq!(ok.unwrap_or_handle(handler), 100); - assert_eq!(ok_err.unwrap_or_handle(handler), 50); - } - - #[test] - #[should_fail] - pub fn test_unwrap_or_else_failure() { - fn handler(msg: ~str) -> int { - if msg == "I got this.".to_owned() { - 50 - } else { - fail!("BadBad") - } - } - - let bad_err: Result = Err("Unrecoverable mess.".to_owned()); - let _ : int = bad_err.unwrap_or_handle(handler); - } -} diff --git a/src/libstd/rt/args.rs b/src/libstd/rt/args.rs index 17e6f6b7698..ac1692e6bb3 100644 --- a/src/libstd/rt/args.rs +++ b/src/libstd/rt/args.rs @@ -70,7 +70,6 @@ mod imp { use owned::Box; use unstable::mutex::{StaticNativeMutex, NATIVE_MUTEX_INIT}; use mem; - #[cfg(not(test))] use str::StrSlice; #[cfg(not(test))] use ptr::RawPtr; static mut global_args_ptr: uint = 0; diff --git a/src/libstd/rt/env.rs b/src/libstd/rt/env.rs index 94f56d42613..708c42030ab 100644 --- a/src/libstd/rt/env.rs +++ b/src/libstd/rt/env.rs @@ -11,7 +11,7 @@ //! Runtime environment settings use from_str::from_str; -use option::{Some, None}; +use option::{Some, None, Expect}; use os; // Note that these are all accessed without any synchronization. diff --git a/src/libstd/rt/mod.rs b/src/libstd/rt/mod.rs index e79e3056838..5b9c314d42b 100644 --- a/src/libstd/rt/mod.rs +++ b/src/libstd/rt/mod.rs @@ -70,7 +70,7 @@ use self::task::{Task, BlockedTask}; pub use self::util::default_sched_threads; // Export unwinding facilities used by the failure macros -pub use self::unwind::{begin_unwind, begin_unwind_raw, begin_unwind_fmt}; +pub use self::unwind::{begin_unwind, begin_unwind_fmt}; pub use self::util::{Stdio, Stdout, Stderr}; diff --git a/src/libstd/rt/task.rs b/src/libstd/rt/task.rs index 5b29de5a8c1..909df5618aa 100644 --- a/src/libstd/rt/task.rs +++ b/src/libstd/rt/task.rs @@ -436,7 +436,7 @@ mod test { #[test] fn rng() { use rand::{StdRng, Rng}; - let mut r = StdRng::new().unwrap(); + let mut r = StdRng::new().ok().unwrap(); let _ = r.next_u32(); } diff --git a/src/libstd/rt/unwind.rs b/src/libstd/rt/unwind.rs index 3ba97f381ab..5f3731eb819 100644 --- a/src/libstd/rt/unwind.rs +++ b/src/libstd/rt/unwind.rs @@ -58,7 +58,6 @@ // Currently Rust uses unwind runtime provided by libgcc. use any::{Any, AnyRefExt}; -use c_str::CString; use cast; use fmt; use kinds::Send; @@ -298,42 +297,23 @@ pub mod eabi { } #[cold] -#[lang="fail_"] +#[no_mangle] #[cfg(not(test))] -pub fn fail_(expr: *u8, file: *u8, line: uint) -> ! { - begin_unwind_raw(expr, file, line); -} - -#[cold] -#[lang="fail_bounds_check"] -#[cfg(not(test))] -pub fn fail_bounds_check(file: *u8, line: uint, index: uint, len: uint) -> ! { - use c_str::ToCStr; +pub extern fn rust_fail_bounds_check(file: *u8, line: uint, + index: uint, len: uint) -> ! { + use str::raw::c_str_to_static_slice; let msg = format!("index out of bounds: the len is {} but the index is {}", len as uint, index as uint); - msg.with_c_str(|buf| fail_(buf as *u8, file, line)) + begin_unwind(msg, unsafe { c_str_to_static_slice(file as *i8) }, line) } -/// This is the entry point of unwinding for things like lang items and such. -/// The arguments are normally generated by the compiler, and need to -/// have static lifetimes. -#[inline(never)] #[cold] // this is the slow path, please never inline this -pub fn begin_unwind_raw(msg: *u8, file: *u8, line: uint) -> ! { - use libc::c_char; - #[inline] - fn static_char_ptr(p: *u8) -> &'static str { - let s = unsafe { CString::new(p as *c_char, false) }; - match s.as_str() { - Some(s) => unsafe { cast::transmute::<&str, &'static str>(s) }, - None => rtabort!("message wasn't utf8?") - } - } - - let msg = static_char_ptr(msg); - let file = static_char_ptr(file); - - begin_unwind(msg, file, line as uint) +// Entry point of failure from the libcore crate +#[no_mangle] +#[cfg(not(test))] +pub extern fn rust_begin_unwind(msg: &str, file: &'static str, line: uint) -> ! { + use str::StrAllocating; + begin_unwind(msg.to_owned(), file, line) } /// The entry point for unwinding with a formatted message. diff --git a/src/libstd/slice.rs b/src/libstd/slice.rs index 6c8a329446d..c7cefbb28ee 100644 --- a/src/libstd/slice.rs +++ b/src/libstd/slice.rs @@ -97,138 +97,28 @@ There are a number of free functions that create or take vectors, for example: */ -use cast; use cast::transmute; -use ops::Drop; +use cast; use clone::Clone; -use container::Container; -use cmp::{Eq, TotalOrd, Ordering, Less, Equal, Greater}; +use cmp::{TotalOrd, Ordering, Less, Greater}; use cmp; -use default::Default; -use fmt; +use container::Container; use iter::*; -use num::{CheckedAdd, Saturating, div_rem}; -use num::CheckedMul; -use option::{None, Option, Some}; -use ptr; -use ptr::RawPtr; -use rt::global_heap::{malloc_raw, exchange_free}; -use result::{Ok, Err}; -use mem; use mem::size_of; -use kinds::marker; +use mem; +use ops::Drop; +use option::{None, Option, Some}; +use ptr::RawPtr; +use ptr; +use rt::global_heap::{exchange_free}; use unstable::finally::try_finally; -use raw::{Repr, Slice}; -use RawVec = raw::Vec; use vec::Vec; -/** - * Converts a pointer to A into a slice of length 1 (without copying). - */ -pub fn ref_slice<'a, A>(s: &'a A) -> &'a [A] { - unsafe { - transmute(Slice { data: s, len: 1 }) - } -} - -/** - * Converts a pointer to A into a slice of length 1 (without copying). - */ -pub fn mut_ref_slice<'a, A>(s: &'a mut A) -> &'a mut [A] { - unsafe { - let ptr: *A = transmute(s); - transmute(Slice { data: ptr, len: 1 }) - } -} - -/// An iterator over the slices of a vector separated by elements that -/// match a predicate function. -pub struct Splits<'a, T> { - v: &'a [T], - pred: |t: &T|: 'a -> bool, - finished: bool -} - -impl<'a, T> Iterator<&'a [T]> for Splits<'a, T> { - #[inline] - fn next(&mut self) -> Option<&'a [T]> { - if self.finished { return None; } - - match self.v.iter().position(|x| (self.pred)(x)) { - None => { - self.finished = true; - Some(self.v) - } - Some(idx) => { - let ret = Some(self.v.slice(0, idx)); - self.v = self.v.slice(idx + 1, self.v.len()); - ret - } - } - } - - #[inline] - fn size_hint(&self) -> (uint, Option) { - if self.finished { - (0, Some(0)) - } else { - (1, Some(self.v.len() + 1)) - } - } -} - -impl<'a, T> DoubleEndedIterator<&'a [T]> for Splits<'a, T> { - #[inline] - fn next_back(&mut self) -> Option<&'a [T]> { - if self.finished { return None; } - - match self.v.iter().rposition(|x| (self.pred)(x)) { - None => { - self.finished = true; - Some(self.v) - } - Some(idx) => { - let ret = Some(self.v.slice(idx + 1, self.v.len())); - self.v = self.v.slice(0, idx); - ret - } - } - } -} - -/// An iterator over the slices of a vector separated by elements that -/// match a predicate function, splitting at most a fixed number of times. -pub struct SplitsN<'a, T> { - iter: Splits<'a, T>, - count: uint, - invert: bool -} - -impl<'a, T> Iterator<&'a [T]> for SplitsN<'a, T> { - #[inline] - fn next(&mut self) -> Option<&'a [T]> { - if self.count == 0 { - if self.iter.finished { - None - } else { - self.iter.finished = true; - Some(self.iter.v) - } - } else { - self.count -= 1; - if self.invert { self.iter.next_back() } else { self.iter.next() } - } - } - - #[inline] - fn size_hint(&self) -> (uint, Option) { - if self.iter.finished { - (0, Some(0)) - } else { - (1, Some(cmp::min(self.count, self.iter.v.len()) + 1)) - } - } -} +pub use core::slice::{ref_slice, mut_ref_slice, Splits, Windows}; +pub use core::slice::{Chunks, Vector, ImmutableVector, ImmutableEqVector}; +pub use core::slice::{ImmutableTotalOrdVector, MutableVector, Items, MutItems}; +pub use core::slice::{RevItems, RevMutItems, MutSplits, MutChunks}; +pub use core::slice::{bytes, MutableCloneableVector}; // Functional utilities @@ -410,249 +300,6 @@ impl Iterator<~[T]> for Permutations { } } -/// An iterator over the (overlapping) slices of length `size` within -/// a vector. -#[deriving(Clone)] -pub struct Windows<'a, T> { - v: &'a [T], - size: uint -} - -impl<'a, T> Iterator<&'a [T]> for Windows<'a, T> { - #[inline] - fn next(&mut self) -> Option<&'a [T]> { - if self.size > self.v.len() { - None - } else { - let ret = Some(self.v.slice(0, self.size)); - self.v = self.v.slice(1, self.v.len()); - ret - } - } - - #[inline] - fn size_hint(&self) -> (uint, Option) { - if self.size > self.v.len() { - (0, Some(0)) - } else { - let x = self.v.len() - self.size; - (x.saturating_add(1), x.checked_add(&1u)) - } - } -} - -/// An iterator over a vector in (non-overlapping) chunks (`size` -/// elements at a time). -/// -/// When the vector len is not evenly divided by the chunk size, -/// the last slice of the iteration will be the remainder. -#[deriving(Clone)] -pub struct Chunks<'a, T> { - v: &'a [T], - size: uint -} - -impl<'a, T> Iterator<&'a [T]> for Chunks<'a, T> { - #[inline] - fn next(&mut self) -> Option<&'a [T]> { - if self.v.len() == 0 { - None - } else { - let chunksz = cmp::min(self.v.len(), self.size); - let (fst, snd) = (self.v.slice_to(chunksz), - self.v.slice_from(chunksz)); - self.v = snd; - Some(fst) - } - } - - #[inline] - fn size_hint(&self) -> (uint, Option) { - if self.v.len() == 0 { - (0, Some(0)) - } else { - let (n, rem) = div_rem(self.v.len(), self.size); - let n = if rem > 0 { n+1 } else { n }; - (n, Some(n)) - } - } -} - -impl<'a, T> DoubleEndedIterator<&'a [T]> for Chunks<'a, T> { - #[inline] - fn next_back(&mut self) -> Option<&'a [T]> { - if self.v.len() == 0 { - None - } else { - let remainder = self.v.len() % self.size; - let chunksz = if remainder != 0 { remainder } else { self.size }; - let (fst, snd) = (self.v.slice_to(self.v.len() - chunksz), - self.v.slice_from(self.v.len() - chunksz)); - self.v = fst; - Some(snd) - } - } -} - -impl<'a, T> RandomAccessIterator<&'a [T]> for Chunks<'a, T> { - #[inline] - fn indexable(&self) -> uint { - self.v.len()/self.size + if self.v.len() % self.size != 0 { 1 } else { 0 } - } - - #[inline] - fn idx(&mut self, index: uint) -> Option<&'a [T]> { - if index < self.indexable() { - let lo = index * self.size; - let mut hi = lo + self.size; - if hi < lo || hi > self.v.len() { hi = self.v.len(); } - - Some(self.v.slice(lo, hi)) - } else { - None - } - } -} - -// Equality - -#[cfg(not(test))] -#[allow(missing_doc)] -pub mod traits { - use super::*; - - use container::Container; - use clone::Clone; - use cmp::{Eq, Ord, TotalEq, TotalOrd, Ordering, Equiv}; - use iter::{order, Iterator}; - use ops::Add; - use vec::Vec; - - impl<'a,T:Eq> Eq for &'a [T] { - fn eq(&self, other: & &'a [T]) -> bool { - self.len() == other.len() && - order::eq(self.iter(), other.iter()) - } - fn ne(&self, other: & &'a [T]) -> bool { - self.len() != other.len() || - order::ne(self.iter(), other.iter()) - } - } - - impl Eq for ~[T] { - #[inline] - fn eq(&self, other: &~[T]) -> bool { self.as_slice() == *other } - #[inline] - fn ne(&self, other: &~[T]) -> bool { !self.eq(other) } - } - - impl<'a,T:TotalEq> TotalEq for &'a [T] {} - - impl TotalEq for ~[T] {} - - impl<'a,T:Eq, V: Vector> Equiv for &'a [T] { - #[inline] - fn equiv(&self, other: &V) -> bool { self.as_slice() == other.as_slice() } - } - - impl<'a,T:Eq, V: Vector> Equiv for ~[T] { - #[inline] - fn equiv(&self, other: &V) -> bool { self.as_slice() == other.as_slice() } - } - - impl<'a,T:TotalOrd> TotalOrd for &'a [T] { - fn cmp(&self, other: & &'a [T]) -> Ordering { - order::cmp(self.iter(), other.iter()) - } - } - - impl TotalOrd for ~[T] { - #[inline] - fn cmp(&self, other: &~[T]) -> Ordering { self.as_slice().cmp(&other.as_slice()) } - } - - impl<'a, T: Ord> Ord for &'a [T] { - fn lt(&self, other: & &'a [T]) -> bool { - order::lt(self.iter(), other.iter()) - } - #[inline] - fn le(&self, other: & &'a [T]) -> bool { - order::le(self.iter(), other.iter()) - } - #[inline] - fn ge(&self, other: & &'a [T]) -> bool { - order::ge(self.iter(), other.iter()) - } - #[inline] - fn gt(&self, other: & &'a [T]) -> bool { - order::gt(self.iter(), other.iter()) - } - } - - impl Ord for ~[T] { - #[inline] - fn lt(&self, other: &~[T]) -> bool { self.as_slice() < other.as_slice() } - #[inline] - fn le(&self, other: &~[T]) -> bool { self.as_slice() <= other.as_slice() } - #[inline] - fn ge(&self, other: &~[T]) -> bool { self.as_slice() >= other.as_slice() } - #[inline] - fn gt(&self, other: &~[T]) -> bool { self.as_slice() > other.as_slice() } - } - - impl<'a,T:Clone, V: Vector> Add for &'a [T] { - #[inline] - fn add(&self, rhs: &V) -> ~[T] { - let mut res = Vec::with_capacity(self.len() + rhs.as_slice().len()); - res.push_all(*self); - res.push_all(rhs.as_slice()); - res.move_iter().collect() - } - } - - impl> Add for ~[T] { - #[inline] - fn add(&self, rhs: &V) -> ~[T] { - self.as_slice() + rhs.as_slice() - } - } -} - -#[cfg(test)] -pub mod traits {} - -/// Any vector that can be represented as a slice. -pub trait Vector { - /// Work with `self` as a slice. - fn as_slice<'a>(&'a self) -> &'a [T]; -} - -impl<'a,T> Vector for &'a [T] { - #[inline(always)] - fn as_slice<'a>(&'a self) -> &'a [T] { *self } -} - -impl Vector for ~[T] { - #[inline(always)] - fn as_slice<'a>(&'a self) -> &'a [T] { let v: &'a [T] = *self; v } -} - -impl<'a, T> Container for &'a [T] { - /// Returns the length of a vector - #[inline] - fn len(&self) -> uint { - self.repr().len - } -} - -impl Container for ~[T] { - /// Returns the length of a vector - #[inline] - fn len(&self) -> uint { - self.as_slice().len() - } -} - /// Extension methods for vector slices with cloneable elements pub trait CloneableVector { /// Copy `self` into a new owned vector @@ -703,417 +350,6 @@ impl CloneableVector for ~[T] { fn into_owned(self) -> ~[T] { self } } -/// Extension methods for vectors -pub trait ImmutableVector<'a, T> { - /** - * Returns a slice of self between `start` and `end`. - * - * Fails when `start` or `end` point outside the bounds of self, - * or when `start` > `end`. - */ - fn slice(&self, start: uint, end: uint) -> &'a [T]; - - /** - * Returns a slice of self from `start` to the end of the vec. - * - * Fails when `start` points outside the bounds of self. - */ - fn slice_from(&self, start: uint) -> &'a [T]; - - /** - * Returns a slice of self from the start of the vec to `end`. - * - * Fails when `end` points outside the bounds of self. - */ - fn slice_to(&self, end: uint) -> &'a [T]; - /// Returns an iterator over the vector - fn iter(self) -> Items<'a, T>; - /// Returns a reversed iterator over a vector - #[deprecated = "replaced by .iter().rev()"] - fn rev_iter(self) -> Rev>; - /// Returns an iterator over the subslices of the vector which are - /// separated by elements that match `pred`. The matched element - /// is not contained in the subslices. - fn split(self, pred: |&T|: 'a -> bool) -> Splits<'a, T>; - /// Returns an iterator over the subslices of the vector which are - /// separated by elements that match `pred`, limited to splitting - /// at most `n` times. The matched element is not contained in - /// the subslices. - fn splitn(self, n: uint, pred: |&T|: 'a -> bool) -> SplitsN<'a, T>; - /// Returns an iterator over the subslices of the vector which are - /// separated by elements that match `pred`. This starts at the - /// end of the vector and works backwards. The matched element is - /// not contained in the subslices. - #[deprecated = "replaced by .split(pred).rev()"] - fn rsplit(self, pred: |&T|: 'a -> bool) -> Rev>; - /// Returns an iterator over the subslices of the vector which are - /// separated by elements that match `pred` limited to splitting - /// at most `n` times. This starts at the end of the vector and - /// works backwards. The matched element is not contained in the - /// subslices. - fn rsplitn(self, n: uint, pred: |&T|: 'a -> bool) -> SplitsN<'a, T>; - - /** - * Returns an iterator over all contiguous windows of length - * `size`. The windows overlap. If the vector is shorter than - * `size`, the iterator returns no values. - * - * # Failure - * - * Fails if `size` is 0. - * - * # Example - * - * Print the adjacent pairs of a vector (i.e. `[1,2]`, `[2,3]`, - * `[3,4]`): - * - * ```rust - * let v = &[1,2,3,4]; - * for win in v.windows(2) { - * println!("{:?}", win); - * } - * ``` - * - */ - fn windows(self, size: uint) -> Windows<'a, T>; - /** - * - * Returns an iterator over `size` elements of the vector at a - * time. The chunks do not overlap. If `size` does not divide the - * length of the vector, then the last chunk will not have length - * `size`. - * - * # Failure - * - * Fails if `size` is 0. - * - * # Example - * - * Print the vector two elements at a time (i.e. `[1,2]`, - * `[3,4]`, `[5]`): - * - * ```rust - * let v = &[1,2,3,4,5]; - * for win in v.chunks(2) { - * println!("{:?}", win); - * } - * ``` - * - */ - fn chunks(self, size: uint) -> Chunks<'a, T>; - - /// Returns the element of a vector at the given index, or `None` if the - /// index is out of bounds - fn get(&self, index: uint) -> Option<&'a T>; - /// Returns the first element of a vector, or `None` if it is empty - fn head(&self) -> Option<&'a T>; - /// Returns all but the first element of a vector - fn tail(&self) -> &'a [T]; - /// Returns all but the first `n' elements of a vector - fn tailn(&self, n: uint) -> &'a [T]; - /// Returns all but the last element of a vector - fn init(&self) -> &'a [T]; - /// Returns all but the last `n' elements of a vector - fn initn(&self, n: uint) -> &'a [T]; - /// Returns the last element of a vector, or `None` if it is empty. - fn last(&self) -> Option<&'a T>; - - /// Returns a pointer to the element at the given index, without doing - /// bounds checking. - unsafe fn unsafe_ref(self, index: uint) -> &'a T; - - /** - * Returns an unsafe pointer to the vector's buffer - * - * The caller must ensure that the vector outlives the pointer this - * function returns, or else it will end up pointing to garbage. - * - * Modifying the vector may cause its buffer to be reallocated, which - * would also make any pointers to it invalid. - */ - fn as_ptr(&self) -> *T; - - /** - * Binary search a sorted vector with a comparator function. - * - * The comparator function should implement an order consistent - * with the sort order of the underlying vector, returning an - * order code that indicates whether its argument is `Less`, - * `Equal` or `Greater` the desired target. - * - * Returns the index where the comparator returned `Equal`, or `None` if - * not found. - */ - fn bsearch(&self, f: |&T| -> Ordering) -> Option; - - /** - * Returns a mutable reference to the first element in this slice - * and adjusts the slice in place so that it no longer contains - * that element. O(1). - * - * Equivalent to: - * - * ```ignore - * if self.len() == 0 { return None } - * let head = &self[0]; - * *self = self.slice_from(1); - * Some(head) - * ``` - * - * Returns `None` if vector is empty - */ - fn shift_ref(&mut self) -> Option<&'a T>; - - /** - * Returns a mutable reference to the last element in this slice - * and adjusts the slice in place so that it no longer contains - * that element. O(1). - * - * Equivalent to: - * - * ```ignore - * if self.len() == 0 { return None; } - * let tail = &self[self.len() - 1]; - * *self = self.slice_to(self.len() - 1); - * Some(tail) - * ``` - * - * Returns `None` if slice is empty. - */ - fn pop_ref(&mut self) -> Option<&'a T>; -} - -impl<'a,T> ImmutableVector<'a, T> for &'a [T] { - #[inline] - fn slice(&self, start: uint, end: uint) -> &'a [T] { - assert!(start <= end); - assert!(end <= self.len()); - unsafe { - transmute(Slice { - data: self.as_ptr().offset(start as int), - len: (end - start) - }) - } - } - - #[inline] - fn slice_from(&self, start: uint) -> &'a [T] { - self.slice(start, self.len()) - } - - #[inline] - fn slice_to(&self, end: uint) -> &'a [T] { - self.slice(0, end) - } - - #[inline] - fn iter(self) -> Items<'a, T> { - unsafe { - let p = self.as_ptr(); - if mem::size_of::() == 0 { - Items{ptr: p, - end: (p as uint + self.len()) as *T, - marker: marker::ContravariantLifetime::<'a>} - } else { - Items{ptr: p, - end: p.offset(self.len() as int), - marker: marker::ContravariantLifetime::<'a>} - } - } - } - - #[inline] - #[deprecated = "replaced by .iter().rev()"] - fn rev_iter(self) -> Rev> { - self.iter().rev() - } - - #[inline] - fn split(self, pred: |&T|: 'a -> bool) -> Splits<'a, T> { - Splits { - v: self, - pred: pred, - finished: false - } - } - - #[inline] - fn splitn(self, n: uint, pred: |&T|: 'a -> bool) -> SplitsN<'a, T> { - SplitsN { - iter: self.split(pred), - count: n, - invert: false - } - } - - #[inline] - #[deprecated = "replaced by .split(pred).rev()"] - fn rsplit(self, pred: |&T|: 'a -> bool) -> Rev> { - self.split(pred).rev() - } - - #[inline] - fn rsplitn(self, n: uint, pred: |&T|: 'a -> bool) -> SplitsN<'a, T> { - SplitsN { - iter: self.split(pred), - count: n, - invert: true - } - } - - #[inline] - fn windows(self, size: uint) -> Windows<'a, T> { - assert!(size != 0); - Windows { v: self, size: size } - } - - #[inline] - fn chunks(self, size: uint) -> Chunks<'a, T> { - assert!(size != 0); - Chunks { v: self, size: size } - } - - #[inline] - fn get(&self, index: uint) -> Option<&'a T> { - if index < self.len() { Some(&self[index]) } else { None } - } - - #[inline] - fn head(&self) -> Option<&'a T> { - if self.len() == 0 { None } else { Some(&self[0]) } - } - - #[inline] - fn tail(&self) -> &'a [T] { self.slice(1, self.len()) } - - #[inline] - fn tailn(&self, n: uint) -> &'a [T] { self.slice(n, self.len()) } - - #[inline] - fn init(&self) -> &'a [T] { - self.slice(0, self.len() - 1) - } - - #[inline] - fn initn(&self, n: uint) -> &'a [T] { - self.slice(0, self.len() - n) - } - - #[inline] - fn last(&self) -> Option<&'a T> { - if self.len() == 0 { None } else { Some(&self[self.len() - 1]) } - } - - #[inline] - unsafe fn unsafe_ref(self, index: uint) -> &'a T { - transmute(self.repr().data.offset(index as int)) - } - - #[inline] - fn as_ptr(&self) -> *T { - self.repr().data - } - - - fn bsearch(&self, f: |&T| -> Ordering) -> Option { - let mut base : uint = 0; - let mut lim : uint = self.len(); - - while lim != 0 { - let ix = base + (lim >> 1); - match f(&self[ix]) { - Equal => return Some(ix), - Less => { - base = ix + 1; - lim -= 1; - } - Greater => () - } - lim >>= 1; - } - return None; - } - - fn shift_ref(&mut self) -> Option<&'a T> { - if self.len() == 0 { return None; } - unsafe { - let s: &mut Slice = transmute(self); - Some(&*raw::shift_ptr(s)) - } - } - - fn pop_ref(&mut self) -> Option<&'a T> { - if self.len() == 0 { return None; } - unsafe { - let s: &mut Slice = transmute(self); - Some(&*raw::pop_ptr(s)) - } - } -} - -/// Extension methods for vectors contain `Eq` elements. -pub trait ImmutableEqVector { - /// Find the first index containing a matching value - fn position_elem(&self, t: &T) -> Option; - - /// Find the last index containing a matching value - fn rposition_elem(&self, t: &T) -> Option; - - /// Return true if a vector contains an element with the given value - fn contains(&self, x: &T) -> bool; - - /// Returns true if `needle` is a prefix of the vector. - fn starts_with(&self, needle: &[T]) -> bool; - - /// Returns true if `needle` is a suffix of the vector. - fn ends_with(&self, needle: &[T]) -> bool; -} - -impl<'a,T:Eq> ImmutableEqVector for &'a [T] { - #[inline] - fn position_elem(&self, x: &T) -> Option { - self.iter().position(|y| *x == *y) - } - - #[inline] - fn rposition_elem(&self, t: &T) -> Option { - self.iter().rposition(|x| *x == *t) - } - - #[inline] - fn contains(&self, x: &T) -> bool { - self.iter().any(|elt| *x == *elt) - } - - #[inline] - fn starts_with(&self, needle: &[T]) -> bool { - let n = needle.len(); - self.len() >= n && needle == self.slice_to(n) - } - - #[inline] - fn ends_with(&self, needle: &[T]) -> bool { - let (m, n) = (self.len(), needle.len()); - m >= n && needle == self.slice_from(m - n) - } -} - -/// Extension methods for vectors containing `TotalOrd` elements. -pub trait ImmutableTotalOrdVector { - /** - * Binary search a sorted vector for a given element. - * - * Returns the index of the element or None if not found. - */ - fn bsearch_elem(&self, x: &T) -> Option; -} - -impl<'a, T: TotalOrd> ImmutableTotalOrdVector for &'a [T] { - fn bsearch_elem(&self, x: &T) -> Option { - self.bsearch(|p| p.cmp(x)) - } -} - /// Extension methods for vectors containing `Clone` elements. pub trait ImmutableCloneableVector { /// Partitions the vector into two vectors `(A,B)`, where all @@ -1417,155 +653,7 @@ fn merge_sort(v: &mut [T], compare: |&T, &T| -> Ordering) { /// Extension methods for vectors such that their elements are /// mutable. -pub trait MutableVector<'a, T> { - /// Work with `self` as a mut slice. - /// Primarily intended for getting a &mut [T] from a [T, ..N]. - fn as_mut_slice(self) -> &'a mut [T]; - - /// Return a slice that points into another slice. - fn mut_slice(self, start: uint, end: uint) -> &'a mut [T]; - - /** - * Returns a slice of self from `start` to the end of the vec. - * - * Fails when `start` points outside the bounds of self. - */ - fn mut_slice_from(self, start: uint) -> &'a mut [T]; - - /** - * Returns a slice of self from the start of the vec to `end`. - * - * Fails when `end` points outside the bounds of self. - */ - fn mut_slice_to(self, end: uint) -> &'a mut [T]; - - /// Returns an iterator that allows modifying each value - fn mut_iter(self) -> MutItems<'a, T>; - - /// Returns a mutable pointer to the last item in the vector. - fn mut_last(self) -> Option<&'a mut T>; - - /// Returns a reversed iterator that allows modifying each value - #[deprecated = "replaced by .mut_iter().rev()"] - fn mut_rev_iter(self) -> Rev>; - - /// Returns an iterator over the mutable subslices of the vector - /// which are separated by elements that match `pred`. The - /// matched element is not contained in the subslices. - fn mut_split(self, pred: |&T|: 'a -> bool) -> MutSplits<'a, T>; - - /** - * Returns an iterator over `size` elements of the vector at a time. - * The chunks are mutable and do not overlap. If `size` does not divide the - * length of the vector, then the last chunk will not have length - * `size`. - * - * # Failure - * - * Fails if `size` is 0. - */ - fn mut_chunks(self, chunk_size: uint) -> MutChunks<'a, T>; - - /** - * Returns a mutable reference to the first element in this slice - * and adjusts the slice in place so that it no longer contains - * that element. O(1). - * - * Equivalent to: - * - * ```ignore - * if self.len() == 0 { return None; } - * let head = &mut self[0]; - * *self = self.mut_slice_from(1); - * Some(head) - * ``` - * - * Returns `None` if slice is empty - */ - fn mut_shift_ref(&mut self) -> Option<&'a mut T>; - - /** - * Returns a mutable reference to the last element in this slice - * and adjusts the slice in place so that it no longer contains - * that element. O(1). - * - * Equivalent to: - * - * ```ignore - * if self.len() == 0 { return None; } - * let tail = &mut self[self.len() - 1]; - * *self = self.mut_slice_to(self.len() - 1); - * Some(tail) - * ``` - * - * Returns `None` if slice is empty. - */ - fn mut_pop_ref(&mut self) -> Option<&'a mut T>; - - /// Swaps two elements in a vector. - /// - /// Fails if `a` or `b` are out of bounds. - /// - /// # Arguments - /// - /// * a - The index of the first element - /// * b - The index of the second element - /// - /// # Example - /// - /// ```rust - /// let mut v = ["a", "b", "c", "d"]; - /// v.swap(1, 3); - /// assert!(v == ["a", "d", "c", "b"]); - /// ``` - fn swap(self, a: uint, b: uint); - - - /// Divides one `&mut` into two at an index. - /// - /// The first will contain all indices from `[0, mid)` (excluding - /// the index `mid` itself) and the second will contain all - /// indices from `[mid, len)` (excluding the index `len` itself). - /// - /// Fails if `mid > len`. - /// - /// # Example - /// - /// ```rust - /// let mut v = [1, 2, 3, 4, 5, 6]; - /// - /// // scoped to restrict the lifetime of the borrows - /// { - /// let (left, right) = v.mut_split_at(0); - /// assert!(left == &mut []); - /// assert!(right == &mut [1, 2, 3, 4, 5, 6]); - /// } - /// - /// { - /// let (left, right) = v.mut_split_at(2); - /// assert!(left == &mut [1, 2]); - /// assert!(right == &mut [3, 4, 5, 6]); - /// } - /// - /// { - /// let (left, right) = v.mut_split_at(6); - /// assert!(left == &mut [1, 2, 3, 4, 5, 6]); - /// assert!(right == &mut []); - /// } - /// ``` - fn mut_split_at(self, mid: uint) -> (&'a mut [T], &'a mut [T]); - - /// Reverse the order of elements in a vector, in place. - /// - /// # Example - /// - /// ```rust - /// let mut v = [1, 2, 3]; - /// v.reverse(); - /// assert!(v == [3, 2, 1]); - /// ``` - fn reverse(self); - +pub trait MutableVectorAllocating<'a, T> { /// Sort the vector, in place, using `compare` to compare /// elements. /// @@ -1599,181 +687,9 @@ pub trait MutableVector<'a, T> { * * end - The index into `str` to stop copying from */ fn move_from(self, src: ~[T], start: uint, end: uint) -> uint; - - /// Returns an unsafe mutable pointer to the element in index - unsafe fn unsafe_mut_ref(self, index: uint) -> &'a mut T; - - /// Return an unsafe mutable pointer to the vector's buffer. - /// - /// The caller must ensure that the vector outlives the pointer this - /// function returns, or else it will end up pointing to garbage. - /// - /// Modifying the vector may cause its buffer to be reallocated, which - /// would also make any pointers to it invalid. - #[inline] - fn as_mut_ptr(self) -> *mut T; - - /// Unsafely sets the element in index to the value. - /// - /// This performs no bounds checks, and it is undefined behaviour - /// if `index` is larger than the length of `self`. However, it - /// does run the destructor at `index`. It is equivalent to - /// `self[index] = val`. - /// - /// # Example - /// - /// ```rust - /// let mut v = ~["foo".to_owned(), "bar".to_owned(), "baz".to_owned()]; - /// - /// unsafe { - /// // `"baz".to_owned()` is deallocated. - /// v.unsafe_set(2, "qux".to_owned()); - /// - /// // Out of bounds: could cause a crash, or overwriting - /// // other data, or something else. - /// // v.unsafe_set(10, "oops".to_owned()); - /// } - /// ``` - unsafe fn unsafe_set(self, index: uint, val: T); - - /// Unchecked vector index assignment. Does not drop the - /// old value and hence is only suitable when the vector - /// is newly allocated. - /// - /// # Example - /// - /// ```rust - /// let mut v = ["foo".to_owned(), "bar".to_owned()]; - /// - /// // memory leak! `"bar".to_owned()` is not deallocated. - /// unsafe { v.init_elem(1, "baz".to_owned()); } - /// ``` - unsafe fn init_elem(self, i: uint, val: T); - - /// Copies raw bytes from `src` to `self`. - /// - /// This does not run destructors on the overwritten elements, and - /// ignores move semantics. `self` and `src` must not - /// overlap. Fails if `self` is shorter than `src`. - unsafe fn copy_memory(self, src: &[T]); } -impl<'a,T> MutableVector<'a, T> for &'a mut [T] { - #[inline] - fn as_mut_slice(self) -> &'a mut [T] { self } - - fn mut_slice(self, start: uint, end: uint) -> &'a mut [T] { - assert!(start <= end); - assert!(end <= self.len()); - unsafe { - transmute(Slice { - data: self.as_mut_ptr().offset(start as int) as *T, - len: (end - start) - }) - } - } - - #[inline] - fn mut_slice_from(self, start: uint) -> &'a mut [T] { - let len = self.len(); - self.mut_slice(start, len) - } - - #[inline] - fn mut_slice_to(self, end: uint) -> &'a mut [T] { - self.mut_slice(0, end) - } - - #[inline] - fn mut_split_at(self, mid: uint) -> (&'a mut [T], &'a mut [T]) { - unsafe { - let len = self.len(); - let self2: &'a mut [T] = cast::transmute_copy(&self); - (self.mut_slice(0, mid), self2.mut_slice(mid, len)) - } - } - - #[inline] - fn mut_iter(self) -> MutItems<'a, T> { - unsafe { - let p = self.as_mut_ptr(); - if mem::size_of::() == 0 { - MutItems{ptr: p, - end: (p as uint + self.len()) as *mut T, - marker: marker::ContravariantLifetime::<'a>, - marker2: marker::NoCopy} - } else { - MutItems{ptr: p, - end: p.offset(self.len() as int), - marker: marker::ContravariantLifetime::<'a>, - marker2: marker::NoCopy} - } - } - } - - #[inline] - fn mut_last(self) -> Option<&'a mut T> { - let len = self.len(); - if len == 0 { return None; } - Some(&mut self[len - 1]) - } - - #[inline] - #[deprecated = "replaced by .mut_iter().rev()"] - fn mut_rev_iter(self) -> Rev> { - self.mut_iter().rev() - } - - #[inline] - fn mut_split(self, pred: |&T|: 'a -> bool) -> MutSplits<'a, T> { - MutSplits { v: self, pred: pred, finished: false } - } - - #[inline] - fn mut_chunks(self, chunk_size: uint) -> MutChunks<'a, T> { - assert!(chunk_size > 0); - MutChunks { v: self, chunk_size: chunk_size } - } - - fn mut_shift_ref(&mut self) -> Option<&'a mut T> { - if self.len() == 0 { return None; } - unsafe { - let s: &mut Slice = transmute(self); - // FIXME #13933: this `&` -> `&mut` cast is a little - // dubious - Some(&mut *(raw::shift_ptr(s) as *mut _)) - } - } - - fn mut_pop_ref(&mut self) -> Option<&'a mut T> { - if self.len() == 0 { return None; } - unsafe { - let s: &mut Slice = transmute(self); - // FIXME #13933: this `&` -> `&mut` cast is a little - // dubious - Some(&mut *(raw::pop_ptr(s) as *mut _)) - } - } - - fn swap(self, a: uint, b: uint) { - unsafe { - // Can't take two mutable loans from one vector, so instead just cast - // them to their raw pointers to do the swap - let pa: *mut T = &mut self[a]; - let pb: *mut T = &mut self[b]; - ptr::swap(pa, pb); - } - } - - fn reverse(self) { - let mut i: uint = 0; - let ln = self.len(); - while i < ln / 2 { - self.swap(i, ln - i - 1); - i += 1; - } - } - +impl<'a,T> MutableVectorAllocating<'a, T> for &'a mut [T] { #[inline] fn sort_by(self, compare: |&T, &T| -> Ordering) { merge_sort(self, compare) @@ -1786,67 +702,6 @@ impl<'a,T> MutableVector<'a, T> for &'a mut [T] { } cmp::min(self.len(), end-start) } - - #[inline] - unsafe fn unsafe_mut_ref(self, index: uint) -> &'a mut T { - transmute((self.repr().data as *mut T).offset(index as int)) - } - - #[inline] - fn as_mut_ptr(self) -> *mut T { - self.repr().data as *mut T - } - - #[inline] - unsafe fn unsafe_set(self, index: uint, val: T) { - *self.unsafe_mut_ref(index) = val; - } - - #[inline] - unsafe fn init_elem(self, i: uint, val: T) { - mem::move_val_init(&mut (*self.as_mut_ptr().offset(i as int)), val); - } - - #[inline] - unsafe fn copy_memory(self, src: &[T]) { - let len_src = src.len(); - assert!(self.len() >= len_src); - ptr::copy_nonoverlapping_memory(self.as_mut_ptr(), src.as_ptr(), len_src) - } -} - -/// Trait for &[T] where T is Cloneable -pub trait MutableCloneableVector { - /// Copies as many elements from `src` as it can into `self` (the - /// shorter of `self.len()` and `src.len()`). Returns the number - /// of elements copied. - /// - /// # Example - /// - /// ```rust - /// use std::slice::MutableCloneableVector; - /// - /// let mut dst = [0, 0, 0]; - /// let src = [1, 2]; - /// - /// assert!(dst.copy_from(src) == 2); - /// assert!(dst == [1, 2, 0]); - /// - /// let src2 = [3, 4, 5, 6]; - /// assert!(dst.copy_from(src2) == 3); - /// assert!(dst == [3, 4, 5]); - /// ``` - fn copy_from(self, &[T]) -> uint; -} - -impl<'a, T:Clone> MutableCloneableVector for &'a mut [T] { - #[inline] - fn copy_from(self, src: &[T]) -> uint { - for (a, b) in self.mut_iter().zip(src.iter()) { - a.clone_from(b); - } - cmp::min(self.len(), src.len()) - } } /// Methods for mutable vectors with orderable elements, such as @@ -1866,6 +721,7 @@ pub trait MutableTotalOrdVector { /// ``` fn sort(self); } + impl<'a, T: TotalOrd> MutableTotalOrdVector for &'a mut [T] { #[inline] fn sort(self) { @@ -1888,43 +744,13 @@ pub unsafe fn from_buf(ptr: *T, elts: uint) -> ~[T] { /// Unsafe operations pub mod raw { - use cast::transmute; use iter::Iterator; - use ptr::RawPtr; use ptr; - use raw::Slice; use slice::{MutableVector, OwnedVector}; use vec::Vec; - /** - * Form a slice from a pointer and length (as a number of units, - * not bytes). - */ - #[inline] - pub unsafe fn buf_as_slice(p: *T, len: uint, f: |v: &[T]| -> U) - -> U { - f(transmute(Slice { - data: p, - len: len - })) - } - - /** - * Form a slice from a pointer and length (as a number of units, - * not bytes). - */ - #[inline] - pub unsafe fn mut_buf_as_slice( - p: *mut T, - len: uint, - f: |v: &mut [T]| -> U) - -> U { - f(transmute(Slice { - data: p as *T, - len: len - })) - } + pub use core::slice::raw::{buf_as_slice, mut_buf_as_slice}; + pub use core::slice::raw::{shift_ptr, pop_ptr}; /** * Constructs a vector from an unsafe pointer to a buffer @@ -1942,332 +768,6 @@ pub mod raw { ptr::copy_memory(dst.as_mut_ptr(), ptr, elts); dst.move_iter().collect() } - - /** - * Returns a pointer to first element in slice and adjusts - * slice so it no longer contains that element. Fails if - * slice is empty. O(1). - */ - pub unsafe fn shift_ptr(slice: &mut Slice) -> *T { - if slice.len == 0 { fail!("shift on empty slice"); } - let head: *T = slice.data; - slice.data = slice.data.offset(1); - slice.len -= 1; - head - } - - /** - * Returns a pointer to last element in slice and adjusts - * slice so it no longer contains that element. Fails if - * slice is empty. O(1). - */ - pub unsafe fn pop_ptr(slice: &mut Slice) -> *T { - if slice.len == 0 { fail!("pop on empty slice"); } - let tail: *T = slice.data.offset((slice.len - 1) as int); - slice.len -= 1; - tail - } -} - -/// Operations on `[u8]`. -pub mod bytes { - use container::Container; - use slice::MutableVector; - use ptr; - - /// A trait for operations on mutable `[u8]`s. - pub trait MutableByteVector { - /// Sets all bytes of the receiver to the given value. - fn set_memory(self, value: u8); - } - - impl<'a> MutableByteVector for &'a mut [u8] { - #[inline] - fn set_memory(self, value: u8) { - unsafe { ptr::set_memory(self.as_mut_ptr(), value, self.len()) }; - } - } - - /// Copies data from `src` to `dst` - /// - /// `src` and `dst` must not overlap. Fails if the length of `dst` - /// is less than the length of `src`. - #[inline] - pub fn copy_memory(dst: &mut [u8], src: &[u8]) { - // Bound checks are done at .copy_memory. - unsafe { dst.copy_memory(src) } - } -} - -impl Clone for ~[A] { - #[inline] - fn clone(&self) -> ~[A] { - // Use the fast to_owned on &[A] for cloning - self.as_slice().to_owned() - } -} - -impl<'a, T: fmt::Show> fmt::Show for &'a [T] { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - if f.flags & (1 << (fmt::parse::FlagAlternate as uint)) == 0 { - try!(write!(f.buf, "[")); - } - let mut is_first = true; - for x in self.iter() { - if is_first { - is_first = false; - } else { - try!(write!(f.buf, ", ")); - } - try!(write!(f.buf, "{}", *x)) - } - if f.flags & (1 << (fmt::parse::FlagAlternate as uint)) == 0 { - try!(write!(f.buf, "]")); - } - Ok(()) - } -} - -impl<'a, T: fmt::Show> fmt::Show for &'a mut [T] { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - self.as_slice().fmt(f) - } -} - -impl fmt::Show for ~[T] { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - self.as_slice().fmt(f) - } -} - -// This works because every lifetime is a sub-lifetime of 'static -impl<'a, A> Default for &'a [A] { - fn default() -> &'a [A] { &'a [] } -} - -impl Default for ~[A] { - fn default() -> ~[A] { box [] } -} - -/// Immutable slice iterator -pub struct Items<'a, T> { - ptr: *T, - end: *T, - marker: marker::ContravariantLifetime<'a> -} - -/// Mutable slice iterator -pub struct MutItems<'a, T> { - ptr: *mut T, - end: *mut T, - marker: marker::ContravariantLifetime<'a>, - marker2: marker::NoCopy -} - -macro_rules! iterator { - (struct $name:ident -> $ptr:ty, $elem:ty) => { - impl<'a, T> Iterator<$elem> for $name<'a, T> { - #[inline] - fn next(&mut self) -> Option<$elem> { - // could be implemented with slices, but this avoids bounds checks - unsafe { - if self.ptr == self.end { - None - } else { - let old = self.ptr; - self.ptr = if mem::size_of::() == 0 { - // purposefully don't use 'ptr.offset' because for - // vectors with 0-size elements this would return the - // same pointer. - transmute(self.ptr as uint + 1) - } else { - self.ptr.offset(1) - }; - - Some(transmute(old)) - } - } - } - - #[inline] - fn size_hint(&self) -> (uint, Option) { - let diff = (self.end as uint) - (self.ptr as uint); - let exact = diff / mem::nonzero_size_of::(); - (exact, Some(exact)) - } - } - - impl<'a, T> DoubleEndedIterator<$elem> for $name<'a, T> { - #[inline] - fn next_back(&mut self) -> Option<$elem> { - // could be implemented with slices, but this avoids bounds checks - unsafe { - if self.end == self.ptr { - None - } else { - self.end = if mem::size_of::() == 0 { - // See above for why 'ptr.offset' isn't used - transmute(self.end as uint - 1) - } else { - self.end.offset(-1) - }; - Some(transmute(self.end)) - } - } - } - } - } -} - -impl<'a, T> RandomAccessIterator<&'a T> for Items<'a, T> { - #[inline] - fn indexable(&self) -> uint { - let (exact, _) = self.size_hint(); - exact - } - - #[inline] - fn idx(&mut self, index: uint) -> Option<&'a T> { - unsafe { - if index < self.indexable() { - transmute(self.ptr.offset(index as int)) - } else { - None - } - } - } -} - -iterator!{struct Items -> *T, &'a T} -#[deprecated = "replaced by Rev>"] -pub type RevItems<'a, T> = Rev>; - -impl<'a, T> ExactSize<&'a T> for Items<'a, T> {} -impl<'a, T> ExactSize<&'a mut T> for MutItems<'a, T> {} - -impl<'a, T> Clone for Items<'a, T> { - fn clone(&self) -> Items<'a, T> { *self } -} - -iterator!{struct MutItems -> *mut T, &'a mut T} -#[deprecated = "replaced by Rev>"] -pub type RevMutItems<'a, T> = Rev>; - -/// An iterator over the subslices of the vector which are separated -/// by elements that match `pred`. -pub struct MutSplits<'a, T> { - v: &'a mut [T], - pred: |t: &T|: 'a -> bool, - finished: bool -} - -impl<'a, T> Iterator<&'a mut [T]> for MutSplits<'a, T> { - #[inline] - fn next(&mut self) -> Option<&'a mut [T]> { - if self.finished { return None; } - - let pred = &mut self.pred; - match self.v.iter().position(|x| (*pred)(x)) { - None => { - self.finished = true; - let tmp = mem::replace(&mut self.v, &mut []); - let len = tmp.len(); - let (head, tail) = tmp.mut_split_at(len); - self.v = tail; - Some(head) - } - Some(idx) => { - let tmp = mem::replace(&mut self.v, &mut []); - let (head, tail) = tmp.mut_split_at(idx); - self.v = tail.mut_slice_from(1); - Some(head) - } - } - } - - #[inline] - fn size_hint(&self) -> (uint, Option) { - if self.finished { - (0, Some(0)) - } else { - // if the predicate doesn't match anything, we yield one slice - // if it matches every element, we yield len+1 empty slices. - (1, Some(self.v.len() + 1)) - } - } -} - -impl<'a, T> DoubleEndedIterator<&'a mut [T]> for MutSplits<'a, T> { - #[inline] - fn next_back(&mut self) -> Option<&'a mut [T]> { - if self.finished { return None; } - - let pred = &mut self.pred; - match self.v.iter().rposition(|x| (*pred)(x)) { - None => { - self.finished = true; - let tmp = mem::replace(&mut self.v, &mut []); - Some(tmp) - } - Some(idx) => { - let tmp = mem::replace(&mut self.v, &mut []); - let (head, tail) = tmp.mut_split_at(idx); - self.v = head; - Some(tail.mut_slice_from(1)) - } - } - } -} - -/// An iterator over a vector in (non-overlapping) mutable chunks (`size` elements at a time). When -/// the vector len is not evenly divided by the chunk size, the last slice of the iteration will be -/// the remainder. -pub struct MutChunks<'a, T> { - v: &'a mut [T], - chunk_size: uint -} - -impl<'a, T> Iterator<&'a mut [T]> for MutChunks<'a, T> { - #[inline] - fn next(&mut self) -> Option<&'a mut [T]> { - if self.v.len() == 0 { - None - } else { - let sz = cmp::min(self.v.len(), self.chunk_size); - let tmp = mem::replace(&mut self.v, &mut []); - let (head, tail) = tmp.mut_split_at(sz); - self.v = tail; - Some(head) - } - } - - #[inline] - fn size_hint(&self) -> (uint, Option) { - if self.v.len() == 0 { - (0, Some(0)) - } else { - let (n, rem) = div_rem(self.v.len(), self.chunk_size); - let n = if rem > 0 { n + 1 } else { n }; - (n, Some(n)) - } - } -} - -impl<'a, T> DoubleEndedIterator<&'a mut [T]> for MutChunks<'a, T> { - #[inline] - fn next_back(&mut self) -> Option<&'a mut [T]> { - if self.v.len() == 0 { - None - } else { - let remainder = self.v.len() % self.chunk_size; - let sz = if remainder != 0 { remainder } else { self.chunk_size }; - let tmp = mem::replace(&mut self.v, &mut []); - let tmp_len = tmp.len(); - let (head, tail) = tmp.mut_split_at(tmp_len - sz); - self.v = head; - Some(tail) - } - } } /// An iterator that moves out of a vector. @@ -2314,41 +814,6 @@ impl Drop for MoveItems { #[deprecated = "replaced by Rev>"] pub type RevMoveItems = Rev>; -impl FromIterator for ~[A] { - fn from_iter>(mut iterator: T) -> ~[A] { - let mut xs: Vec = iterator.collect(); - - // Must shrink so the capacity is the same as the length. The length of - // the ~[T] vector must exactly match the length of the allocation. - xs.shrink_to_fit(); - - let len = xs.len(); - assert!(len == xs.capacity()); - let data = xs.as_mut_ptr(); - - let data_size = len.checked_mul(&mem::size_of::()); - let data_size = data_size.expect("overflow in from_iter()"); - let size = mem::size_of::>().checked_add(&data_size); - let size = size.expect("overflow in from_iter()"); - - - // This is some terribly awful code. Note that all of this will go away - // with DST because creating ~[T] from Vec will just be some pointer - // swizzling. - unsafe { - let ret = malloc_raw(size) as *mut RawVec<()>; - - (*ret).fill = len * mem::nonzero_size_of::(); - (*ret).alloc = len * mem::nonzero_size_of::(); - ptr::copy_nonoverlapping_memory(&mut (*ret).data as *mut _ as *mut u8, - data as *u8, - data_size); - xs.set_len(0); // ownership has been transferred - cast::transmute(ret) - } - } -} - #[cfg(test)] mod tests { use prelude::*; @@ -3112,7 +1577,6 @@ mod tests { #[test] #[should_fail] fn test_from_elem_fail() { - use cast; use cell::Cell; use rc::Rc; diff --git a/src/libstd/str.rs b/src/libstd/str.rs index 54ddf60ed7d..666c0a58b33 100644 --- a/src/libstd/str.rs +++ b/src/libstd/str.rs @@ -83,22 +83,24 @@ use cmp::{Eq, TotalEq, Ord, TotalOrd, Equiv, Ordering}; use container::Container; use fmt; use io::Writer; -use iter::{Iterator, FromIterator, Extendable, range}; -use iter::{Filter, AdditiveIterator, Map}; -use iter::{Rev, DoubleEndedIterator, ExactSize}; -use libc; -use num::Saturating; +use iter::{Iterator, range, AdditiveIterator}; use option::{None, Option, Some}; use ptr; use from_str::FromStr; -use slice; use slice::{OwnedVector, ImmutableVector, MutableVector}; use slice::{Vector}; use vec::Vec; use default::Default; -use raw::Repr; use strbuf::StrBuf; +pub use core::str::{from_utf8, CharEq, Chars, CharOffsets, RevChars}; +pub use core::str::{RevCharOffsets, Bytes, RevBytes, CharSplits, RevCharSplits}; +pub use core::str::{CharSplitsN, Words, AnyLines, MatchIndices, StrSplits}; +pub use core::str::{eq_slice, eq, is_utf8, is_utf16, UTF16Items}; +pub use core::str::{UTF16Item, ScalarValue, LoneSurrogate, utf16_items}; +pub use core::str::{truncate_utf16_at_nul, utf8_char_width, CharRange}; +pub use core::str::{Str, StrSlice}; + /* Section: Creating a string */ @@ -113,18 +115,6 @@ pub fn from_utf8_owned(vv: ~[u8]) -> Option<~str> { } } -/// Converts a vector to a string slice without performing any allocations. -/// -/// Once the slice has been validated as utf-8, it is transmuted in-place and -/// returned as a '&str' instead of a '&[u8]' -/// -/// Returns None if the slice is not utf-8. -pub fn from_utf8<'a>(v: &'a [u8]) -> Option<&'a str> { - if is_utf8(v) { - Some(unsafe { raw::from_utf8(v) }) - } else { None } -} - impl FromStr for ~str { #[inline] fn from_str(s: &str) -> Option<~str> { Some(s.to_owned()) } @@ -214,348 +204,10 @@ impl<'a, S: Str> StrVector for Vec { } } -/// Something that can be used to compare against a character -pub trait CharEq { - /// Determine if the splitter should split at the given character - fn matches(&mut self, char) -> bool; - /// Indicate if this is only concerned about ASCII characters, - /// which can allow for a faster implementation. - fn only_ascii(&self) -> bool; -} - -impl CharEq for char { - #[inline] - fn matches(&mut self, c: char) -> bool { *self == c } - - #[inline] - fn only_ascii(&self) -> bool { (*self as uint) < 128 } -} - -impl<'a> CharEq for |char|: 'a -> bool { - #[inline] - fn matches(&mut self, c: char) -> bool { (*self)(c) } - - #[inline] - fn only_ascii(&self) -> bool { false } -} - -impl CharEq for extern "Rust" fn(char) -> bool { - #[inline] - fn matches(&mut self, c: char) -> bool { (*self)(c) } - - #[inline] - fn only_ascii(&self) -> bool { false } -} - -impl<'a> CharEq for &'a [char] { - #[inline] - fn matches(&mut self, c: char) -> bool { - self.iter().any(|&mut m| m.matches(c)) - } - - #[inline] - fn only_ascii(&self) -> bool { - self.iter().all(|m| m.only_ascii()) - } -} - /* Section: Iterators */ -/// External iterator for a string's characters. -/// Use with the `std::iter` module. -#[deriving(Clone)] -pub struct Chars<'a> { - /// The slice remaining to be iterated - string: &'a str, -} - -impl<'a> Iterator for Chars<'a> { - #[inline] - fn next(&mut self) -> Option { - // Decode the next codepoint, then update - // the slice to be just the remaining part - if self.string.len() != 0 { - let CharRange {ch, next} = self.string.char_range_at(0); - unsafe { - self.string = raw::slice_unchecked(self.string, next, self.string.len()); - } - Some(ch) - } else { - None - } - } - - #[inline] - fn size_hint(&self) -> (uint, Option) { - (self.string.len().saturating_add(3)/4, Some(self.string.len())) - } -} - -impl<'a> DoubleEndedIterator for Chars<'a> { - #[inline] - fn next_back(&mut self) -> Option { - if self.string.len() != 0 { - let CharRange {ch, next} = self.string.char_range_at_reverse(self.string.len()); - unsafe { - self.string = raw::slice_unchecked(self.string, 0, next); - } - Some(ch) - } else { - None - } - } -} - -/// External iterator for a string's characters and their byte offsets. -/// Use with the `std::iter` module. -#[deriving(Clone)] -pub struct CharOffsets<'a> { - /// The original string to be iterated - string: &'a str, - iter: Chars<'a>, -} - -impl<'a> Iterator<(uint, char)> for CharOffsets<'a> { - #[inline] - fn next(&mut self) -> Option<(uint, char)> { - // Compute the byte offset by using the pointer offset between - // the original string slice and the iterator's remaining part - let offset = self.iter.string.as_ptr() as uint - self.string.as_ptr() as uint; - self.iter.next().map(|ch| (offset, ch)) - } - - #[inline] - fn size_hint(&self) -> (uint, Option) { - self.iter.size_hint() - } -} - -impl<'a> DoubleEndedIterator<(uint, char)> for CharOffsets<'a> { - #[inline] - fn next_back(&mut self) -> Option<(uint, char)> { - self.iter.next_back().map(|ch| { - let offset = self.iter.string.len() + - self.iter.string.as_ptr() as uint - self.string.as_ptr() as uint; - (offset, ch) - }) - } -} - -#[deprecated = "replaced by Rev>"] -pub type RevChars<'a> = Rev>; - -#[deprecated = "replaced by Rev>"] -pub type RevCharOffsets<'a> = Rev>; - -/// External iterator for a string's bytes. -/// Use with the `std::iter` module. -pub type Bytes<'a> = - Map<'a, &'a u8, u8, slice::Items<'a, u8>>; - -#[deprecated = "replaced by Rev>"] -pub type RevBytes<'a> = Rev>; - -/// An iterator over the substrings of a string, separated by `sep`. -#[deriving(Clone)] -pub struct CharSplits<'a, Sep> { - /// The slice remaining to be iterated - string: &'a str, - sep: Sep, - /// Whether an empty string at the end is allowed - allow_trailing_empty: bool, - only_ascii: bool, - finished: bool, -} - -#[deprecated = "replaced by Rev>"] -pub type RevCharSplits<'a, Sep> = Rev>; - -/// An iterator over the substrings of a string, separated by `sep`, -/// splitting at most `count` times. -#[deriving(Clone)] -pub struct CharSplitsN<'a, Sep> { - iter: CharSplits<'a, Sep>, - /// The number of splits remaining - count: uint, - invert: bool, -} - -/// An iterator over the words of a string, separated by a sequence of whitespace -pub type Words<'a> = - Filter<'a, &'a str, CharSplits<'a, extern "Rust" fn(char) -> bool>>; - -/// An iterator over the lines of a string, separated by either `\n` or (`\r\n`). -pub type AnyLines<'a> = - Map<'a, &'a str, &'a str, CharSplits<'a, char>>; - -impl<'a, Sep> CharSplits<'a, Sep> { - #[inline] - fn get_end(&mut self) -> Option<&'a str> { - if !self.finished && (self.allow_trailing_empty || self.string.len() > 0) { - self.finished = true; - Some(self.string) - } else { - None - } - } -} - -impl<'a, Sep: CharEq> Iterator<&'a str> for CharSplits<'a, Sep> { - #[inline] - fn next(&mut self) -> Option<&'a str> { - if self.finished { return None } - - let mut next_split = None; - if self.only_ascii { - for (idx, byte) in self.string.bytes().enumerate() { - if self.sep.matches(byte as char) && byte < 128u8 { - next_split = Some((idx, idx + 1)); - break; - } - } - } else { - for (idx, ch) in self.string.char_indices() { - if self.sep.matches(ch) { - next_split = Some((idx, self.string.char_range_at(idx).next)); - break; - } - } - } - match next_split { - Some((a, b)) => unsafe { - let elt = raw::slice_unchecked(self.string, 0, a); - self.string = raw::slice_unchecked(self.string, b, self.string.len()); - Some(elt) - }, - None => self.get_end(), - } - } -} - -impl<'a, Sep: CharEq> DoubleEndedIterator<&'a str> -for CharSplits<'a, Sep> { - #[inline] - fn next_back(&mut self) -> Option<&'a str> { - if self.finished { return None } - - if !self.allow_trailing_empty { - self.allow_trailing_empty = true; - match self.next_back() { - Some(elt) if !elt.is_empty() => return Some(elt), - _ => if self.finished { return None } - } - } - let len = self.string.len(); - let mut next_split = None; - - if self.only_ascii { - for (idx, byte) in self.string.bytes().enumerate().rev() { - if self.sep.matches(byte as char) && byte < 128u8 { - next_split = Some((idx, idx + 1)); - break; - } - } - } else { - for (idx, ch) in self.string.char_indices().rev() { - if self.sep.matches(ch) { - next_split = Some((idx, self.string.char_range_at(idx).next)); - break; - } - } - } - match next_split { - Some((a, b)) => unsafe { - let elt = raw::slice_unchecked(self.string, b, len); - self.string = raw::slice_unchecked(self.string, 0, a); - Some(elt) - }, - None => { self.finished = true; Some(self.string) } - } - } -} - -impl<'a, Sep: CharEq> Iterator<&'a str> for CharSplitsN<'a, Sep> { - #[inline] - fn next(&mut self) -> Option<&'a str> { - if self.count != 0 { - self.count -= 1; - if self.invert { self.iter.next_back() } else { self.iter.next() } - } else { - self.iter.get_end() - } - } -} - -/// An iterator over the start and end indices of the matches of a -/// substring within a larger string -#[deriving(Clone)] -pub struct MatchIndices<'a> { - haystack: &'a str, - needle: &'a str, - position: uint, -} - -/// An iterator over the substrings of a string separated by a given -/// search string -#[deriving(Clone)] -pub struct StrSplits<'a> { - it: MatchIndices<'a>, - last_end: uint, - finished: bool -} - -impl<'a> Iterator<(uint, uint)> for MatchIndices<'a> { - #[inline] - fn next(&mut self) -> Option<(uint, uint)> { - // See Issue #1932 for why this is a naive search - let (h_len, n_len) = (self.haystack.len(), self.needle.len()); - let mut match_start = 0; - let mut match_i = 0; - - while self.position < h_len { - if self.haystack[self.position] == self.needle[match_i] { - if match_i == 0 { match_start = self.position; } - match_i += 1; - self.position += 1; - - if match_i == n_len { - // found a match! - return Some((match_start, self.position)); - } - } else { - // failed match, backtrack - if match_i > 0 { - match_i = 0; - self.position = match_start; - } - self.position += 1; - } - } - None - } -} - -impl<'a> Iterator<&'a str> for StrSplits<'a> { - #[inline] - fn next(&mut self) -> Option<&'a str> { - if self.finished { return None; } - - match self.it.next() { - Some((from, to)) => { - let ret = Some(self.it.haystack.slice(self.last_end, from)); - self.last_end = to; - ret - } - None => { - self.finished = true; - Some(self.it.haystack.slice(self.last_end, self.it.haystack.len())) - } - } - } -} - // Helper functions used for Unicode normalization fn canonical_sort(comb: &mut [(char, u8)]) { use iter::range; @@ -675,294 +327,10 @@ pub fn replace(s: &str, from: &str, to: &str) -> ~str { result.into_owned() } -/* -Section: Comparing strings -*/ - -// share the implementation of the lang-item vs. non-lang-item -// eq_slice. -#[inline] -fn eq_slice_(a: &str, b: &str) -> bool { - a.len() == b.len() && unsafe { - libc::memcmp(a.as_ptr() as *libc::c_void, - b.as_ptr() as *libc::c_void, - a.len() as libc::size_t) == 0 - } -} - -/// Bytewise slice equality -#[cfg(not(test))] -#[lang="str_eq"] -#[inline] -pub fn eq_slice(a: &str, b: &str) -> bool { - eq_slice_(a, b) -} - -/// Bytewise slice equality -#[cfg(test)] -#[inline] -pub fn eq_slice(a: &str, b: &str) -> bool { - eq_slice_(a, b) -} - -/// Bytewise string equality -#[cfg(not(test))] -#[lang="uniq_str_eq"] -#[inline] -pub fn eq(a: &~str, b: &~str) -> bool { - eq_slice(*a, *b) -} - -#[cfg(test)] -#[inline] -pub fn eq(a: &~str, b: &~str) -> bool { - eq_slice(*a, *b) -} - /* Section: Misc */ -/// Walk through `iter` checking that it's a valid UTF-8 sequence, -/// returning `true` in that case, or, if it is invalid, `false` with -/// `iter` reset such that it is pointing at the first byte in the -/// invalid sequence. -#[inline(always)] -fn run_utf8_validation_iterator(iter: &mut slice::Items) -> bool { - loop { - // save the current thing we're pointing at. - let old = *iter; - - // restore the iterator we had at the start of this codepoint. - macro_rules! err ( () => { {*iter = old; return false} }); - macro_rules! next ( () => { - match iter.next() { - Some(a) => *a, - // we needed data, but there was none: error! - None => err!() - } - }); - - let first = match iter.next() { - Some(&b) => b, - // we're at the end of the iterator and a codepoint - // boundary at the same time, so this string is valid. - None => return true - }; - - // ASCII characters are always valid, so only large - // bytes need more examination. - if first >= 128 { - let w = utf8_char_width(first); - let second = next!(); - // 2-byte encoding is for codepoints \u0080 to \u07ff - // first C2 80 last DF BF - // 3-byte encoding is for codepoints \u0800 to \uffff - // first E0 A0 80 last EF BF BF - // excluding surrogates codepoints \ud800 to \udfff - // ED A0 80 to ED BF BF - // 4-byte encoding is for codepoints \u10000 to \u10ffff - // first F0 90 80 80 last F4 8F BF BF - // - // Use the UTF-8 syntax from the RFC - // - // https://tools.ietf.org/html/rfc3629 - // UTF8-1 = %x00-7F - // UTF8-2 = %xC2-DF UTF8-tail - // UTF8-3 = %xE0 %xA0-BF UTF8-tail / %xE1-EC 2( UTF8-tail ) / - // %xED %x80-9F UTF8-tail / %xEE-EF 2( UTF8-tail ) - // UTF8-4 = %xF0 %x90-BF 2( UTF8-tail ) / %xF1-F3 3( UTF8-tail ) / - // %xF4 %x80-8F 2( UTF8-tail ) - match w { - 2 => if second & 192 != TAG_CONT_U8 {err!()}, - 3 => { - match (first, second, next!() & 192) { - (0xE0 , 0xA0 .. 0xBF, TAG_CONT_U8) | - (0xE1 .. 0xEC, 0x80 .. 0xBF, TAG_CONT_U8) | - (0xED , 0x80 .. 0x9F, TAG_CONT_U8) | - (0xEE .. 0xEF, 0x80 .. 0xBF, TAG_CONT_U8) => {} - _ => err!() - } - } - 4 => { - match (first, second, next!() & 192, next!() & 192) { - (0xF0 , 0x90 .. 0xBF, TAG_CONT_U8, TAG_CONT_U8) | - (0xF1 .. 0xF3, 0x80 .. 0xBF, TAG_CONT_U8, TAG_CONT_U8) | - (0xF4 , 0x80 .. 0x8F, TAG_CONT_U8, TAG_CONT_U8) => {} - _ => err!() - } - } - _ => err!() - } - } - } -} - -/// Determines if a vector of bytes contains valid UTF-8. -pub fn is_utf8(v: &[u8]) -> bool { - run_utf8_validation_iterator(&mut v.iter()) -} - -#[inline(always)] -fn first_non_utf8_index(v: &[u8]) -> Option { - let mut it = v.iter(); - - let ok = run_utf8_validation_iterator(&mut it); - if ok { - None - } else { - // work out how many valid bytes we've consumed - // (run_utf8_validation_iterator resets the iterator to just - // after the last good byte), which we can do because the - // vector iterator size_hint is exact. - let (remaining, _) = it.size_hint(); - Some(v.len() - remaining) - } -} - -/// Determines if a vector of `u16` contains valid UTF-16 -pub fn is_utf16(v: &[u16]) -> bool { - let mut it = v.iter(); - macro_rules! next ( ($ret:expr) => { - match it.next() { Some(u) => *u, None => return $ret } - } - ) - loop { - let u = next!(true); - - match char::from_u32(u as u32) { - Some(_) => {} - None => { - let u2 = next!(false); - if u < 0xD7FF || u > 0xDBFF || - u2 < 0xDC00 || u2 > 0xDFFF { return false; } - } - } - } -} - -/// An iterator that decodes UTF-16 encoded codepoints from a vector -/// of `u16`s. -#[deriving(Clone)] -pub struct UTF16Items<'a> { - iter: slice::Items<'a, u16> -} -/// The possibilities for values decoded from a `u16` stream. -#[deriving(Eq, TotalEq, Clone, Show)] -pub enum UTF16Item { - /// A valid codepoint. - ScalarValue(char), - /// An invalid surrogate without its pair. - LoneSurrogate(u16) -} - -impl UTF16Item { - /// Convert `self` to a `char`, taking `LoneSurrogate`s to the - /// replacement character (U+FFFD). - #[inline] - pub fn to_char_lossy(&self) -> char { - match *self { - ScalarValue(c) => c, - LoneSurrogate(_) => '\uFFFD' - } - } -} - -impl<'a> Iterator for UTF16Items<'a> { - fn next(&mut self) -> Option { - let u = match self.iter.next() { - Some(u) => *u, - None => return None - }; - - if u < 0xD800 || 0xDFFF < u { - // not a surrogate - Some(ScalarValue(unsafe {cast::transmute(u as u32)})) - } else if u >= 0xDC00 { - // a trailing surrogate - Some(LoneSurrogate(u)) - } else { - // preserve state for rewinding. - let old = self.iter; - - let u2 = match self.iter.next() { - Some(u2) => *u2, - // eof - None => return Some(LoneSurrogate(u)) - }; - if u2 < 0xDC00 || u2 > 0xDFFF { - // not a trailing surrogate so we're not a valid - // surrogate pair, so rewind to redecode u2 next time. - self.iter = old; - return Some(LoneSurrogate(u)) - } - - // all ok, so lets decode it. - let c = ((u - 0xD800) as u32 << 10 | (u2 - 0xDC00) as u32) + 0x1_0000; - Some(ScalarValue(unsafe {cast::transmute(c)})) - } - } - - #[inline] - fn size_hint(&self) -> (uint, Option) { - let (low, high) = self.iter.size_hint(); - // we could be entirely valid surrogates (2 elements per - // char), or entirely non-surrogates (1 element per char) - (low / 2, high) - } -} - -/// Create an iterator over the UTF-16 encoded codepoints in `v`, -/// returning invalid surrogates as `LoneSurrogate`s. -/// -/// # Example -/// -/// ```rust -/// use std::str; -/// use std::str::{ScalarValue, LoneSurrogate}; -/// -/// // 𝄞music -/// let v = [0xD834, 0xDD1E, 0x006d, 0x0075, -/// 0x0073, 0xDD1E, 0x0069, 0x0063, -/// 0xD834]; -/// -/// assert_eq!(str::utf16_items(v).collect::<~[_]>(), -/// ~[ScalarValue('𝄞'), -/// ScalarValue('m'), ScalarValue('u'), ScalarValue('s'), -/// LoneSurrogate(0xDD1E), -/// ScalarValue('i'), ScalarValue('c'), -/// LoneSurrogate(0xD834)]); -/// ``` -pub fn utf16_items<'a>(v: &'a [u16]) -> UTF16Items<'a> { - UTF16Items { iter : v.iter() } -} - -/// Return a slice of `v` ending at (and not including) the first NUL -/// (0). -/// -/// # Example -/// -/// ```rust -/// use std::str; -/// -/// // "abcd" -/// let mut v = ['a' as u16, 'b' as u16, 'c' as u16, 'd' as u16]; -/// // no NULs so no change -/// assert_eq!(str::truncate_utf16_at_nul(v), v.as_slice()); -/// -/// // "ab\0d" -/// v[2] = 0; -/// assert_eq!(str::truncate_utf16_at_nul(v), -/// &['a' as u16, 'b' as u16]); -/// ``` -pub fn truncate_utf16_at_nul<'a>(v: &'a [u16]) -> &'a [u16] { - match v.iter().position(|c| *c == 0) { - // don't include the 0 - Some(i) => v.slice_to(i), - None => v - } -} - /// Decode a UTF-16 encoded vector `v` into a string, returning `None` /// if `v` contains any invalid data. /// @@ -1010,42 +378,6 @@ pub fn from_utf16_lossy(v: &[u16]) -> ~str { utf16_items(v).map(|c| c.to_char_lossy()).collect() } -// https://tools.ietf.org/html/rfc3629 -static UTF8_CHAR_WIDTH: [u8, ..256] = [ -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // 0x1F -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // 0x3F -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // 0x5F -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, // 0x7F -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 0x9F -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // 0xBF -0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, // 0xDF -3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, // 0xEF -4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0, // 0xFF -]; - -/// Given a first byte, determine how many bytes are in this UTF-8 character -#[inline] -pub fn utf8_char_width(b: u8) -> uint { - return UTF8_CHAR_WIDTH[b as uint] as uint; -} - -/// Struct that contains a `char` and the index of the first byte of -/// the next `char` in a string. This can be used as a data structure -/// for iterating over the UTF-8 bytes of a string. -pub struct CharRange { - /// Current `char` - pub ch: char, - /// Index of the first byte of the next `char` - pub next: uint, -} - // Return the initial codepoint accumulator for the first byte. // The first byte is special, only want bottom 5 bits for width 2, 4 bits // for width 3, and 3 bits for width 4 @@ -1071,13 +403,12 @@ static TAG_CONT_U8: u8 = 128u8; /// assert_eq!(output.as_slice(), "Hello \uFFFDWorld"); /// ``` pub fn from_utf8_lossy<'a>(v: &'a [u8]) -> MaybeOwned<'a> { - let firstbad = match first_non_utf8_index(v) { - None => return Slice(unsafe { cast::transmute(v) }), - Some(i) => i - }; + if is_utf8(v) { + return Slice(unsafe { cast::transmute(v) }) + } static REPLACEMENT: &'static [u8] = bytes!(0xEF, 0xBF, 0xBD); // U+FFFD in UTF-8 - let mut i = firstbad; + let mut i = 0; let total = v.len(); fn unsafe_get(xs: &[u8], i: uint) -> u8 { unsafe { *xs.unsafe_ref(i) } @@ -1101,7 +432,7 @@ pub fn from_utf8_lossy<'a>(v: &'a [u8]) -> MaybeOwned<'a> { // subseqidx is the index of the first byte of the subsequence we're looking at. // It's used to copy a bunch of contiguous good codepoints at once instead of copying // them one by one. - let mut subseqidx = firstbad; + let mut subseqidx = 0; while i < total { let i_ = i; @@ -1282,7 +613,9 @@ impl<'a> Str for MaybeOwned<'a> { Owned(ref s) => s.as_slice() } } +} +impl<'a> StrAllocating for MaybeOwned<'a> { #[inline] fn into_owned(self) -> ~str { match self { @@ -1335,16 +668,17 @@ impl<'a> fmt::Show for MaybeOwned<'a> { /// Unsafe operations pub mod raw { use cast; - use container::Container; use iter::Iterator; use libc; use ptr::RawPtr; use ptr; - use raw::Slice; - use slice::{MutableVector, ImmutableVector, OwnedVector, Vector}; - use str::{is_utf8, StrSlice}; + use slice::{MutableVector, OwnedVector, Vector}; + use str::{is_utf8}; use vec::Vec; + pub use core::str::raw::{from_utf8, c_str_to_static_slice, slice_bytes}; + pub use core::str::raw::{slice_unchecked}; + /// Create a Rust string from a *u8 buffer of the given length pub unsafe fn from_buf_len(buf: *u8, len: uint) -> ~str { let mut v = Vec::with_capacity(len); @@ -1373,12 +707,6 @@ pub mod raw { from_buf_len(buf as *u8, i as uint) } - /// Converts a slice of bytes to a string slice without checking - /// that the string contains valid UTF-8. - pub unsafe fn from_utf8<'a>(v: &'a [u8]) -> &'a str { - cast::transmute(v) - } - /// Converts an owned vector of bytes to a new owned string. This assumes /// that the utf-8-ness of the vector has already been validated #[inline] @@ -1389,50 +717,6 @@ pub mod raw { /// Converts a byte to a string. pub unsafe fn from_byte(u: u8) -> ~str { from_utf8_owned(box [u]) } - /// Form a slice from a C string. Unsafe because the caller must ensure the - /// C string has the static lifetime, or else the return value may be - /// invalidated later. - pub unsafe fn c_str_to_static_slice(s: *libc::c_char) -> &'static str { - let s = s as *u8; - let mut curr = s; - let mut len = 0u; - while *curr != 0u8 { - len += 1u; - curr = s.offset(len as int); - } - let v = Slice { data: s, len: len }; - assert!(is_utf8(::cast::transmute(v))); - ::cast::transmute(v) - } - - /// Takes a bytewise (not UTF-8) slice from a string. - /// - /// Returns the substring from [`begin`..`end`). - /// - /// # Failure - /// - /// If begin is greater than end. - /// If end is greater than the length of the string. - #[inline] - pub unsafe fn slice_bytes<'a>(s: &'a str, begin: uint, end: uint) -> &'a str { - assert!(begin <= end); - assert!(end <= s.len()); - slice_unchecked(s, begin, end) - } - - /// Takes a bytewise (not UTF-8) slice from a string. - /// - /// Returns the substring from [`begin`..`end`). - /// - /// Caller must check slice boundaries! - #[inline] - pub unsafe fn slice_unchecked<'a>(s: &'a str, begin: uint, end: uint) -> &'a str { - cast::transmute(Slice { - data: s.as_ptr().offset(begin as int), - len: end - begin, - }) - } - /// Access the str in its vector representation. /// The caller must preserve the valid UTF-8 property when modifying. #[inline] @@ -1447,8 +731,11 @@ pub mod raw { /// the string is actually the specified size. #[test] fn test_from_buf_len() { + use slice::ImmutableVector; + use str::StrAllocating; + unsafe { - let a = box [65u8, 65u8, 65u8, 65u8, 65u8, 65u8, 65u8, 0u8]; + let a = ~[65u8, 65u8, 65u8, 65u8, 65u8, 65u8, 65u8, 0u8]; let b = a.as_ptr(); let c = from_buf_len(b, 3u); assert_eq!(c, "AAA".to_owned()); @@ -1460,95 +747,8 @@ pub mod raw { Section: Trait implementations */ -#[cfg(not(test))] -#[allow(missing_doc)] -pub mod traits { - use container::Container; - use cmp::{TotalOrd, Ordering, Less, Equal, Greater, Eq, Ord, Equiv, TotalEq}; - use iter::Iterator; - use ops::Add; - use option::{Some, None}; - use str::{Str, StrSlice, eq_slice}; - use strbuf::StrBuf; - - impl<'a> Add<&'a str,~str> for &'a str { - #[inline] - fn add(&self, rhs: & &'a str) -> ~str { - let mut ret = StrBuf::from_owned_str(self.to_owned()); - ret.push_str(*rhs); - ret.into_owned() - } - } - - impl<'a> TotalOrd for &'a str { - #[inline] - fn cmp(&self, other: & &'a str) -> Ordering { - for (s_b, o_b) in self.bytes().zip(other.bytes()) { - match s_b.cmp(&o_b) { - Greater => return Greater, - Less => return Less, - Equal => () - } - } - - self.len().cmp(&other.len()) - } - } - - impl TotalOrd for ~str { - #[inline] - fn cmp(&self, other: &~str) -> Ordering { self.as_slice().cmp(&other.as_slice()) } - } - - impl<'a> Eq for &'a str { - #[inline] - fn eq(&self, other: & &'a str) -> bool { - eq_slice((*self), (*other)) - } - #[inline] - fn ne(&self, other: & &'a str) -> bool { !(*self).eq(other) } - } - - impl Eq for ~str { - #[inline] - fn eq(&self, other: &~str) -> bool { - eq_slice((*self), (*other)) - } - } - - impl<'a> TotalEq for &'a str {} - - impl TotalEq for ~str {} - - impl<'a> Ord for &'a str { - #[inline] - fn lt(&self, other: & &'a str) -> bool { self.cmp(other) == Less } - } - - impl Ord for ~str { - #[inline] - fn lt(&self, other: &~str) -> bool { self.cmp(other) == Less } - } - - impl<'a, S: Str> Equiv for &'a str { - #[inline] - fn equiv(&self, other: &S) -> bool { eq_slice(*self, other.as_slice()) } - } - - impl<'a, S: Str> Equiv for ~str { - #[inline] - fn equiv(&self, other: &S) -> bool { eq_slice(*self, other.as_slice()) } - } -} - -#[cfg(test)] -pub mod traits {} - /// Any string that can be represented as a slice -pub trait Str { - /// Work with `self` as a slice. - fn as_slice<'a>(&'a self) -> &'a str; - +pub trait StrAllocating: Str { /// Convert `self` into a ~str, not making a copy if possible. fn into_owned(self) -> ~str; @@ -1563,453 +763,26 @@ pub trait Str { fn into_strbuf(self) -> StrBuf { StrBuf::from_owned_str(self.into_owned()) } -} - -impl<'a> Str for &'a str { - #[inline] - fn as_slice<'a>(&'a self) -> &'a str { *self } - - #[inline] - fn into_owned(self) -> ~str { self.to_owned() } -} - -impl<'a> Str for ~str { - #[inline] - fn as_slice<'a>(&'a self) -> &'a str { - let s: &'a str = *self; s - } - - #[inline] - fn into_owned(self) -> ~str { self } -} - -impl<'a> Container for &'a str { - #[inline] - fn len(&self) -> uint { - self.repr().len - } -} - -impl Container for ~str { - #[inline] - fn len(&self) -> uint { self.as_slice().len() } -} - -/// Methods for string slices -pub trait StrSlice<'a> { - /// Returns true if one string contains another - /// - /// # Arguments - /// - /// - needle - The string to look for - fn contains<'a>(&self, needle: &'a str) -> bool; - - /// Returns true if a string contains a char. - /// - /// # Arguments - /// - /// - needle - The char to look for - fn contains_char(&self, needle: char) -> bool; - - /// An iterator over the characters of `self`. Note, this iterates - /// over unicode code-points, not unicode graphemes. - /// - /// # Example - /// - /// ```rust - /// let v: ~[char] = "abc åäö".chars().collect(); - /// assert_eq!(v, ~['a', 'b', 'c', ' ', 'å', 'ä', 'ö']); - /// ``` - fn chars(&self) -> Chars<'a>; - - /// Do not use this - it is deprecated. - #[deprecated = "replaced by .chars().rev()"] - fn chars_rev(&self) -> Rev>; - - /// An iterator over the bytes of `self` - fn bytes(&self) -> Bytes<'a>; - - /// Do not use this - it is deprecated. - #[deprecated = "replaced by .bytes().rev()"] - fn bytes_rev(&self) -> Rev>; - - /// An iterator over the characters of `self` and their byte offsets. - fn char_indices(&self) -> CharOffsets<'a>; - - /// Do not use this - it is deprecated. - #[deprecated = "replaced by .char_indices().rev()"] - fn char_indices_rev(&self) -> Rev>; - - /// An iterator over substrings of `self`, separated by characters - /// matched by `sep`. - /// - /// # Example - /// - /// ```rust - /// let v: ~[&str] = "Mary had a little lamb".split(' ').collect(); - /// assert_eq!(v, ~["Mary", "had", "a", "little", "lamb"]); - /// - /// let v: ~[&str] = "abc1def2ghi".split(|c: char| c.is_digit()).collect(); - /// assert_eq!(v, ~["abc", "def", "ghi"]); - /// - /// let v: ~[&str] = "lionXXtigerXleopard".split('X').collect(); - /// assert_eq!(v, ~["lion", "", "tiger", "leopard"]); - /// ``` - fn split(&self, sep: Sep) -> CharSplits<'a, Sep>; - - /// An iterator over substrings of `self`, separated by characters - /// matched by `sep`, restricted to splitting at most `count` - /// times. - /// - /// # Example - /// - /// ```rust - /// let v: ~[&str] = "Mary had a little lambda".splitn(' ', 2).collect(); - /// assert_eq!(v, ~["Mary", "had", "a little lambda"]); - /// - /// let v: ~[&str] = "abc1def2ghi".splitn(|c: char| c.is_digit(), 1).collect(); - /// assert_eq!(v, ~["abc", "def2ghi"]); - /// - /// let v: ~[&str] = "lionXXtigerXleopard".splitn('X', 2).collect(); - /// assert_eq!(v, ~["lion", "", "tigerXleopard"]); - /// ``` - fn splitn(&self, sep: Sep, count: uint) -> CharSplitsN<'a, Sep>; - - /// An iterator over substrings of `self`, separated by characters - /// matched by `sep`. - /// - /// Equivalent to `split`, except that the trailing substring - /// is skipped if empty (terminator semantics). - /// - /// # Example - /// - /// ```rust - /// let v: ~[&str] = "A.B.".split_terminator('.').collect(); - /// assert_eq!(v, ~["A", "B"]); - /// - /// let v: ~[&str] = "A..B..".split_terminator('.').collect(); - /// assert_eq!(v, ~["A", "", "B", ""]); - /// - /// let v: ~[&str] = "Mary had a little lamb".split(' ').rev().collect(); - /// assert_eq!(v, ~["lamb", "little", "a", "had", "Mary"]); - /// - /// let v: ~[&str] = "abc1def2ghi".split(|c: char| c.is_digit()).rev().collect(); - /// assert_eq!(v, ~["ghi", "def", "abc"]); - /// - /// let v: ~[&str] = "lionXXtigerXleopard".split('X').rev().collect(); - /// assert_eq!(v, ~["leopard", "tiger", "", "lion"]); - /// ``` - fn split_terminator(&self, sep: Sep) -> CharSplits<'a, Sep>; - - /// Do not use this - it is deprecated. - #[deprecated = "replaced by .split(sep).rev()"] - fn rsplit(&self, sep: Sep) -> Rev>; - - /// An iterator over substrings of `self`, separated by characters - /// matched by `sep`, starting from the end of the string. - /// Restricted to splitting at most `count` times. - /// - /// # Example - /// - /// ```rust - /// let v: ~[&str] = "Mary had a little lamb".rsplitn(' ', 2).collect(); - /// assert_eq!(v, ~["lamb", "little", "Mary had a"]); - /// - /// let v: ~[&str] = "abc1def2ghi".rsplitn(|c: char| c.is_digit(), 1).collect(); - /// assert_eq!(v, ~["ghi", "abc1def"]); - /// - /// let v: ~[&str] = "lionXXtigerXleopard".rsplitn('X', 2).collect(); - /// assert_eq!(v, ~["leopard", "tiger", "lionX"]); - /// ``` - fn rsplitn(&self, sep: Sep, count: uint) -> CharSplitsN<'a, Sep>; - - /// An iterator over the start and end indices of the disjoint - /// matches of `sep` within `self`. - /// - /// That is, each returned value `(start, end)` satisfies - /// `self.slice(start, end) == sep`. For matches of `sep` within - /// `self` that overlap, only the indicies corresponding to the - /// first match are returned. - /// - /// # Example - /// - /// ```rust - /// let v: ~[(uint, uint)] = "abcXXXabcYYYabc".match_indices("abc").collect(); - /// assert_eq!(v, ~[(0,3), (6,9), (12,15)]); - /// - /// let v: ~[(uint, uint)] = "1abcabc2".match_indices("abc").collect(); - /// assert_eq!(v, ~[(1,4), (4,7)]); - /// - /// let v: ~[(uint, uint)] = "ababa".match_indices("aba").collect(); - /// assert_eq!(v, ~[(0, 3)]); // only the first `aba` - /// ``` - fn match_indices(&self, sep: &'a str) -> MatchIndices<'a>; - - /// An iterator over the substrings of `self` separated by `sep`. - /// - /// # Example - /// - /// ```rust - /// let v: ~[&str] = "abcXXXabcYYYabc".split_str("abc").collect(); - /// assert_eq!(v, ~["", "XXX", "YYY", ""]); - /// - /// let v: ~[&str] = "1abcabc2".split_str("abc").collect(); - /// assert_eq!(v, ~["1", "", "2"]); - /// ``` - fn split_str(&self, &'a str) -> StrSplits<'a>; - - /// An iterator over the lines of a string (subsequences separated - /// by `\n`). This does not include the empty string after a - /// trailing `\n`. - /// - /// # Example - /// - /// ```rust - /// let four_lines = "foo\nbar\n\nbaz\n"; - /// let v: ~[&str] = four_lines.lines().collect(); - /// assert_eq!(v, ~["foo", "bar", "", "baz"]); - /// ``` - fn lines(&self) -> CharSplits<'a, char>; - - /// An iterator over the lines of a string, separated by either - /// `\n` or `\r\n`. As with `.lines()`, this does not include an - /// empty trailing line. - /// - /// # Example - /// - /// ```rust - /// let four_lines = "foo\r\nbar\n\r\nbaz\n"; - /// let v: ~[&str] = four_lines.lines_any().collect(); - /// assert_eq!(v, ~["foo", "bar", "", "baz"]); - /// ``` - fn lines_any(&self) -> AnyLines<'a>; - - /// An iterator over the words of a string (subsequences separated - /// by any sequence of whitespace). Sequences of whitespace are - /// collapsed, so empty "words" are not included. - /// - /// # Example - /// - /// ```rust - /// let some_words = " Mary had\ta little \n\t lamb"; - /// let v: ~[&str] = some_words.words().collect(); - /// assert_eq!(v, ~["Mary", "had", "a", "little", "lamb"]); - /// ``` - fn words(&self) -> Words<'a>; - - /// An Iterator over the string in Unicode Normalization Form D - /// (canonical decomposition). - fn nfd_chars(&self) -> Normalizations<'a>; - - /// An Iterator over the string in Unicode Normalization Form KD - /// (compatibility decomposition). - fn nfkd_chars(&self) -> Normalizations<'a>; - - /// Returns true if the string contains only whitespace. - /// - /// Whitespace characters are determined by `char::is_whitespace`. - /// - /// # Example - /// - /// ```rust - /// assert!(" \t\n".is_whitespace()); - /// assert!("".is_whitespace()); - /// - /// assert!( !"abc".is_whitespace()); - /// ``` - fn is_whitespace(&self) -> bool; - - /// Returns true if the string contains only alphanumeric code - /// points. - /// - /// Alphanumeric characters are determined by `char::is_alphanumeric`. - /// - /// # Example - /// - /// ```rust - /// assert!("Löwe老虎Léopard123".is_alphanumeric()); - /// assert!("".is_alphanumeric()); - /// - /// assert!( !" &*~".is_alphanumeric()); - /// ``` - fn is_alphanumeric(&self) -> bool; - - /// Returns the number of Unicode code points (`char`) that a - /// string holds. - /// - /// This does not perform any normalization, and is `O(n)`, since - /// UTF-8 is a variable width encoding of code points. - /// - /// *Warning*: The number of code points in a string does not directly - /// correspond to the number of visible characters or width of the - /// visible text due to composing characters, and double- and - /// zero-width ones. - /// - /// See also `.len()` for the byte length. - /// - /// # Example - /// - /// ```rust - /// // composed forms of `ö` and `é` - /// let c = "Löwe 老虎 Léopard"; // German, Simplified Chinese, French - /// // decomposed forms of `ö` and `é` - /// let d = "Lo\u0308we 老虎 Le\u0301opard"; - /// - /// assert_eq!(c.char_len(), 15); - /// assert_eq!(d.char_len(), 17); - /// - /// assert_eq!(c.len(), 21); - /// assert_eq!(d.len(), 23); - /// - /// // the two strings *look* the same - /// println!("{}", c); - /// println!("{}", d); - /// ``` - fn char_len(&self) -> uint; - - /// Returns a slice of the given string from the byte range - /// [`begin`..`end`). - /// - /// This operation is `O(1)`. - /// - /// Fails when `begin` and `end` do not point to valid characters - /// or point beyond the last character of the string. - /// - /// See also `slice_to` and `slice_from` for slicing prefixes and - /// suffixes of strings, and `slice_chars` for slicing based on - /// code point counts. - /// - /// # Example - /// - /// ```rust - /// let s = "Löwe 老虎 Léopard"; - /// assert_eq!(s.slice(0, 1), "L"); - /// - /// assert_eq!(s.slice(1, 9), "öwe 老"); - /// - /// // these will fail: - /// // byte 2 lies within `ö`: - /// // s.slice(2, 3); - /// - /// // byte 8 lies within `老` - /// // s.slice(1, 8); - /// - /// // byte 100 is outside the string - /// // s.slice(3, 100); - /// ``` - fn slice(&self, begin: uint, end: uint) -> &'a str; - - /// Returns a slice of the string from `begin` to its end. - /// - /// Equivalent to `self.slice(begin, self.len())`. - /// - /// Fails when `begin` does not point to a valid character, or is - /// out of bounds. - /// - /// See also `slice`, `slice_to` and `slice_chars`. - fn slice_from(&self, begin: uint) -> &'a str; - - /// Returns a slice of the string from the beginning to byte - /// `end`. - /// - /// Equivalent to `self.slice(0, end)`. - /// - /// Fails when `end` does not point to a valid character, or is - /// out of bounds. - /// - /// See also `slice`, `slice_from` and `slice_chars`. - fn slice_to(&self, end: uint) -> &'a str; - - /// Returns a slice of the string from the character range - /// [`begin`..`end`). - /// - /// That is, start at the `begin`-th code point of the string and - /// continue to the `end`-th code point. This does not detect or - /// handle edge cases such as leaving a combining character as the - /// first code point of the string. - /// - /// Due to the design of UTF-8, this operation is `O(end)`. - /// See `slice`, `slice_to` and `slice_from` for `O(1)` - /// variants that use byte indices rather than code point - /// indices. - /// - /// Fails if `begin` > `end` or the either `begin` or `end` are - /// beyond the last character of the string. - /// - /// # Example - /// - /// ```rust - /// let s = "Löwe 老虎 Léopard"; - /// assert_eq!(s.slice_chars(0, 4), "Löwe"); - /// assert_eq!(s.slice_chars(5, 7), "老虎"); - /// ``` - fn slice_chars(&self, begin: uint, end: uint) -> &'a str; - - /// Returns true if `needle` is a prefix of the string. - fn starts_with(&self, needle: &str) -> bool; - - /// Returns true if `needle` is a suffix of the string. - fn ends_with(&self, needle: &str) -> bool; /// Escape each char in `s` with `char::escape_default`. - fn escape_default(&self) -> ~str; + fn escape_default(&self) -> ~str { + let me = self.as_slice(); + let mut out = StrBuf::with_capacity(me.len()); + for c in me.chars() { + c.escape_default(|c| out.push_char(c)); + } + out.into_owned() + } /// Escape each char in `s` with `char::escape_unicode`. - fn escape_unicode(&self) -> ~str; - - /// Returns a string with leading and trailing whitespace removed. - fn trim(&self) -> &'a str; - - /// Returns a string with leading whitespace removed. - fn trim_left(&self) -> &'a str; - - /// Returns a string with trailing whitespace removed. - fn trim_right(&self) -> &'a str; - - /// Returns a string with characters that match `to_trim` removed. - /// - /// # Arguments - /// - /// * to_trim - a character matcher - /// - /// # Example - /// - /// ```rust - /// assert_eq!("11foo1bar11".trim_chars('1'), "foo1bar") - /// assert_eq!("12foo1bar12".trim_chars(&['1', '2']), "foo1bar") - /// assert_eq!("123foo1bar123".trim_chars(|c: char| c.is_digit()), "foo1bar") - /// ``` - fn trim_chars(&self, to_trim: C) -> &'a str; - - /// Returns a string with leading `chars_to_trim` removed. - /// - /// # Arguments - /// - /// * to_trim - a character matcher - /// - /// # Example - /// - /// ```rust - /// assert_eq!("11foo1bar11".trim_left_chars('1'), "foo1bar11") - /// assert_eq!("12foo1bar12".trim_left_chars(&['1', '2']), "foo1bar12") - /// assert_eq!("123foo1bar123".trim_left_chars(|c: char| c.is_digit()), "foo1bar123") - /// ``` - fn trim_left_chars(&self, to_trim: C) -> &'a str; - - /// Returns a string with trailing `chars_to_trim` removed. - /// - /// # Arguments - /// - /// * to_trim - a character matcher - /// - /// # Example - /// - /// ```rust - /// assert_eq!("11foo1bar11".trim_right_chars('1'), "11foo1bar") - /// assert_eq!("12foo1bar12".trim_right_chars(&['1', '2']), "12foo1bar") - /// assert_eq!("123foo1bar123".trim_right_chars(|c: char| c.is_digit()), "123foo1bar") - /// ``` - fn trim_right_chars(&self, to_trim: C) -> &'a str; + fn escape_unicode(&self) -> ~str { + let me = self.as_slice(); + let mut out = StrBuf::with_capacity(me.len()); + for c in me.chars() { + c.escape_unicode(|c| out.push_char(c)); + } + out.into_owned() + } /// Replace all occurrences of one string with another. /// @@ -2035,529 +808,38 @@ pub trait StrSlice<'a> { /// // not found, so no change. /// assert_eq!(s.replace("cookie monster", "little lamb"), s); /// ``` - fn replace(&self, from: &str, to: &str) -> ~str; - - /// Copy a slice into a new owned str. - fn to_owned(&self) -> ~str; - - /// Converts to a vector of `u16` encoded as UTF-16. - fn to_utf16(&self) -> ~[u16]; - - /// Check that `index`-th byte lies at the start and/or end of a - /// UTF-8 code point sequence. - /// - /// The start and end of the string (when `index == self.len()`) - /// are considered to be boundaries. - /// - /// Fails if `index` is greater than `self.len()`. - /// - /// # Example - /// - /// ```rust - /// let s = "Löwe 老虎 Léopard"; - /// assert!(s.is_char_boundary(0)); - /// // start of `老` - /// assert!(s.is_char_boundary(6)); - /// assert!(s.is_char_boundary(s.len())); - /// - /// // second byte of `ö` - /// assert!(!s.is_char_boundary(2)); - /// - /// // third byte of `老` - /// assert!(!s.is_char_boundary(8)); - /// ``` - fn is_char_boundary(&self, index: uint) -> bool; - - /// Pluck a character out of a string and return the index of the next - /// character. - /// - /// This function can be used to iterate over the unicode characters of a - /// string. - /// - /// # Example - /// - /// This example manually iterate through the characters of a - /// string; this should normally by done by `.chars()` or - /// `.char_indices`. - /// - /// ```rust - /// use std::str::CharRange; - /// - /// let s = "中华Việt Nam"; - /// let mut i = 0u; - /// while i < s.len() { - /// let CharRange {ch, next} = s.char_range_at(i); - /// println!("{}: {}", i, ch); - /// i = next; - /// } - /// ``` - /// - /// ## Output - /// - /// ```ignore - /// 0: 中 - /// 3: 华 - /// 6: V - /// 7: i - /// 8: ệ - /// 11: t - /// 12: - /// 13: N - /// 14: a - /// 15: m - /// ``` - /// - /// # Arguments - /// - /// * s - The string - /// * i - The byte offset of the char to extract - /// - /// # Return value - /// - /// A record {ch: char, next: uint} containing the char value and the byte - /// index of the next unicode character. - /// - /// # Failure - /// - /// If `i` is greater than or equal to the length of the string. - /// If `i` is not the index of the beginning of a valid UTF-8 character. - fn char_range_at(&self, start: uint) -> CharRange; - - /// Given a byte position and a str, return the previous char and its position. - /// - /// This function can be used to iterate over a unicode string in reverse. - /// - /// Returns 0 for next index if called on start index 0. - fn char_range_at_reverse(&self, start: uint) -> CharRange; - - /// Plucks the character starting at the `i`th byte of a string - fn char_at(&self, i: uint) -> char; - - /// Plucks the character ending at the `i`th byte of a string - fn char_at_reverse(&self, i: uint) -> char; - - /// Work with the byte buffer of a string as a byte slice. - fn as_bytes(&self) -> &'a [u8]; - - /// Returns the byte index of the first character of `self` that - /// matches `search`. - /// - /// # Return value - /// - /// `Some` containing the byte index of the last matching character - /// or `None` if there is no match - /// - /// # Example - /// - /// ```rust - /// let s = "Löwe 老虎 Léopard"; - /// - /// assert_eq!(s.find('L'), Some(0)); - /// assert_eq!(s.find('é'), Some(14)); - /// - /// // the first space - /// assert_eq!(s.find(|c: char| c.is_whitespace()), Some(5)); - /// - /// // neither are found - /// assert_eq!(s.find(&['1', '2']), None); - /// ``` - fn find(&self, search: C) -> Option; - - /// Returns the byte index of the last character of `self` that - /// matches `search`. - /// - /// # Return value - /// - /// `Some` containing the byte index of the last matching character - /// or `None` if there is no match. - /// - /// # Example - /// - /// ```rust - /// let s = "Löwe 老虎 Léopard"; - /// - /// assert_eq!(s.rfind('L'), Some(13)); - /// assert_eq!(s.rfind('é'), Some(14)); - /// - /// // the second space - /// assert_eq!(s.rfind(|c: char| c.is_whitespace()), Some(12)); - /// - /// // searches for an occurrence of either `1` or `2`, but neither are found - /// assert_eq!(s.rfind(&['1', '2']), None); - /// ``` - fn rfind(&self, search: C) -> Option; - - /// Returns the byte index of the first matching substring - /// - /// # Arguments - /// - /// * `needle` - The string to search for - /// - /// # Return value - /// - /// `Some` containing the byte index of the first matching substring - /// or `None` if there is no match. - /// - /// # Example - /// - /// ```rust - /// let s = "Löwe 老虎 Léopard"; - /// - /// assert_eq!(s.find_str("老虎 L"), Some(6)); - /// assert_eq!(s.find_str("muffin man"), None); - /// ``` - fn find_str(&self, &str) -> Option; - - /// Given a string, make a new string with repeated copies of it. - fn repeat(&self, nn: uint) -> ~str; - - /// Retrieves the first character from a string slice and returns - /// it. This does not allocate a new string; instead, it returns a - /// slice that point one character beyond the character that was - /// shifted. If the string does not contain any characters, - /// a tuple of None and an empty string is returned instead. - /// - /// # Example - /// - /// ```rust - /// let s = "Löwe 老虎 Léopard"; - /// let (c, s1) = s.slice_shift_char(); - /// assert_eq!(c, Some('L')); - /// assert_eq!(s1, "öwe 老虎 Léopard"); - /// - /// let (c, s2) = s1.slice_shift_char(); - /// assert_eq!(c, Some('ö')); - /// assert_eq!(s2, "we 老虎 Léopard"); - /// ``` - fn slice_shift_char(&self) -> (Option, &'a str); - - /// Levenshtein Distance between two strings. - fn lev_distance(&self, t: &str) -> uint; - - /// Returns the byte offset of an inner slice relative to an enclosing outer slice. - /// - /// Fails if `inner` is not a direct slice contained within self. - /// - /// # Example - /// - /// ```rust - /// let string = "a\nb\nc"; - /// let lines: ~[&str] = string.lines().collect(); - /// - /// assert!(string.subslice_offset(lines[0]) == 0); // &"a" - /// assert!(string.subslice_offset(lines[1]) == 2); // &"b" - /// assert!(string.subslice_offset(lines[2]) == 4); // &"c" - /// ``` - fn subslice_offset(&self, inner: &str) -> uint; - - /// Return an unsafe pointer to the strings buffer. - /// - /// The caller must ensure that the string outlives this pointer, - /// and that it is not reallocated (e.g. by pushing to the - /// string). - fn as_ptr(&self) -> *u8; -} - -impl<'a> StrSlice<'a> for &'a str { - #[inline] - fn contains<'a>(&self, needle: &'a str) -> bool { - self.find_str(needle).is_some() - } - - #[inline] - fn contains_char(&self, needle: char) -> bool { - self.find(needle).is_some() - } - - #[inline] - fn chars(&self) -> Chars<'a> { - Chars{string: *self} - } - - #[inline] - #[deprecated = "replaced by .chars().rev()"] - fn chars_rev(&self) -> Rev> { - self.chars().rev() - } - - #[inline] - fn bytes(&self) -> Bytes<'a> { - self.as_bytes().iter().map(|&b| b) - } - - #[inline] - #[deprecated = "replaced by .bytes().rev()"] - fn bytes_rev(&self) -> Rev> { - self.bytes().rev() - } - - #[inline] - fn char_indices(&self) -> CharOffsets<'a> { - CharOffsets{string: *self, iter: self.chars()} - } - - #[inline] - #[deprecated = "replaced by .char_indices().rev()"] - fn char_indices_rev(&self) -> Rev> { - self.char_indices().rev() - } - - #[inline] - fn split(&self, sep: Sep) -> CharSplits<'a, Sep> { - CharSplits { - string: *self, - only_ascii: sep.only_ascii(), - sep: sep, - allow_trailing_empty: true, - finished: false, - } - } - - #[inline] - fn splitn(&self, sep: Sep, count: uint) - -> CharSplitsN<'a, Sep> { - CharSplitsN { - iter: self.split(sep), - count: count, - invert: false, - } - } - - #[inline] - fn split_terminator(&self, sep: Sep) - -> CharSplits<'a, Sep> { - CharSplits { - allow_trailing_empty: false, - ..self.split(sep) - } - } - - #[inline] - #[deprecated = "replaced by .split(sep).rev()"] - fn rsplit(&self, sep: Sep) -> Rev> { - self.split(sep).rev() - } - - #[inline] - fn rsplitn(&self, sep: Sep, count: uint) - -> CharSplitsN<'a, Sep> { - CharSplitsN { - iter: self.split(sep), - count: count, - invert: true, - } - } - - #[inline] - fn match_indices(&self, sep: &'a str) -> MatchIndices<'a> { - assert!(!sep.is_empty()) - MatchIndices { - haystack: *self, - needle: sep, - position: 0 - } - } - - #[inline] - fn split_str(&self, sep: &'a str) -> StrSplits<'a> { - StrSplits { - it: self.match_indices(sep), - last_end: 0, - finished: false - } - } - - #[inline] - fn lines(&self) -> CharSplits<'a, char> { - self.split_terminator('\n') - } - - fn lines_any(&self) -> AnyLines<'a> { - self.lines().map(|line| { - let l = line.len(); - if l > 0 && line[l - 1] == '\r' as u8 { line.slice(0, l - 1) } - else { line } - }) - } - - #[inline] - fn words(&self) -> Words<'a> { - self.split(char::is_whitespace).filter(|s| !s.is_empty()) - } - - #[inline] - fn nfd_chars(&self) -> Normalizations<'a> { - Normalizations { - iter: self.chars(), - buffer: Vec::new(), - sorted: false, - kind: NFD - } - } - - #[inline] - fn nfkd_chars(&self) -> Normalizations<'a> { - Normalizations { - iter: self.chars(), - buffer: Vec::new(), - sorted: false, - kind: NFKD - } - } - - #[inline] - fn is_whitespace(&self) -> bool { self.chars().all(char::is_whitespace) } - - #[inline] - fn is_alphanumeric(&self) -> bool { self.chars().all(char::is_alphanumeric) } - - #[inline] - fn char_len(&self) -> uint { self.chars().len() } - - #[inline] - fn slice(&self, begin: uint, end: uint) -> &'a str { - assert!(self.is_char_boundary(begin) && self.is_char_boundary(end)); - unsafe { raw::slice_bytes(*self, begin, end) } - } - - #[inline] - fn slice_from(&self, begin: uint) -> &'a str { - self.slice(begin, self.len()) - } - - #[inline] - fn slice_to(&self, end: uint) -> &'a str { - assert!(self.is_char_boundary(end)); - unsafe { raw::slice_bytes(*self, 0, end) } - } - - fn slice_chars(&self, begin: uint, end: uint) -> &'a str { - assert!(begin <= end); - let mut count = 0; - let mut begin_byte = None; - let mut end_byte = None; - - // This could be even more efficient by not decoding, - // only finding the char boundaries - for (idx, _) in self.char_indices() { - if count == begin { begin_byte = Some(idx); } - if count == end { end_byte = Some(idx); break; } - count += 1; - } - if begin_byte.is_none() && count == begin { begin_byte = Some(self.len()) } - if end_byte.is_none() && count == end { end_byte = Some(self.len()) } - - match (begin_byte, end_byte) { - (None, _) => fail!("slice_chars: `begin` is beyond end of string"), - (_, None) => fail!("slice_chars: `end` is beyond end of string"), - (Some(a), Some(b)) => unsafe { raw::slice_bytes(*self, a, b) } - } - } - - #[inline] - fn starts_with<'a>(&self, needle: &'a str) -> bool { - let n = needle.len(); - self.len() >= n && needle.as_bytes() == self.as_bytes().slice_to(n) - } - - #[inline] - fn ends_with(&self, needle: &str) -> bool { - let (m, n) = (self.len(), needle.len()); - m >= n && needle.as_bytes() == self.as_bytes().slice_from(m - n) - } - - fn escape_default(&self) -> ~str { - let mut out = StrBuf::with_capacity(self.len()); - for c in self.chars() { - c.escape_default(|c| out.push_char(c)); - } - out.into_owned() - } - - fn escape_unicode(&self) -> ~str { - let mut out = StrBuf::with_capacity(self.len()); - for c in self.chars() { - c.escape_unicode(|c| out.push_char(c)); - } - out.into_owned() - } - - #[inline] - fn trim(&self) -> &'a str { - self.trim_left().trim_right() - } - - #[inline] - fn trim_left(&self) -> &'a str { - self.trim_left_chars(char::is_whitespace) - } - - #[inline] - fn trim_right(&self) -> &'a str { - self.trim_right_chars(char::is_whitespace) - } - - #[inline] - fn trim_chars(&self, mut to_trim: C) -> &'a str { - let cur = match self.find(|c: char| !to_trim.matches(c)) { - None => "", - Some(i) => unsafe { raw::slice_bytes(*self, i, self.len()) } - }; - match cur.rfind(|c: char| !to_trim.matches(c)) { - None => "", - Some(i) => { - let right = cur.char_range_at(i).next; - unsafe { raw::slice_bytes(cur, 0, right) } - } - } - } - - #[inline] - fn trim_left_chars(&self, mut to_trim: C) -> &'a str { - match self.find(|c: char| !to_trim.matches(c)) { - None => "", - Some(first) => unsafe { raw::slice_bytes(*self, first, self.len()) } - } - } - - #[inline] - fn trim_right_chars(&self, mut to_trim: C) -> &'a str { - match self.rfind(|c: char| !to_trim.matches(c)) { - None => "", - Some(last) => { - let next = self.char_range_at(last).next; - unsafe { raw::slice_bytes(*self, 0u, next) } - } - } - } - fn replace(&self, from: &str, to: &str) -> ~str { + let me = self.as_slice(); let mut result = StrBuf::new(); let mut last_end = 0; - for (start, end) in self.match_indices(from) { - result.push_str(unsafe{raw::slice_bytes(*self, last_end, start)}); + for (start, end) in me.match_indices(from) { + result.push_str(unsafe{raw::slice_bytes(me, last_end, start)}); result.push_str(to); last_end = end; } - result.push_str(unsafe{raw::slice_bytes(*self, last_end, self.len())}); + result.push_str(unsafe{raw::slice_bytes(me, last_end, me.len())}); result.into_owned() } + /// Copy a slice into a new owned str. #[inline] fn to_owned(&self) -> ~str { - let len = self.len(); + let me = self.as_slice(); + let len = me.len(); unsafe { let mut v = Vec::with_capacity(len); - ptr::copy_memory(v.as_mut_ptr(), self.as_ptr(), len); + ptr::copy_memory(v.as_mut_ptr(), me.as_ptr(), len); v.set_len(len); ::cast::transmute(v.move_iter().collect::<~[u8]>()) } } + /// Converts to a vector of `u16` encoded as UTF-16. fn to_utf16(&self) -> ~[u16] { + let me = self.as_slice(); let mut u = Vec::new();; - for ch in self.chars() { + for ch in me.chars() { let mut buf = [0u16, ..2]; let n = ch.encode_utf16(buf /* as mut slice! */); u.push_all(buf.slice_to(n)); @@ -2565,133 +847,20 @@ impl<'a> StrSlice<'a> for &'a str { u.move_iter().collect() } - #[inline] - fn is_char_boundary(&self, index: uint) -> bool { - if index == self.len() { return true; } - let b = self[index]; - return b < 128u8 || b >= 192u8; - } - - #[inline] - fn char_range_at(&self, i: uint) -> CharRange { - if self[i] < 128u8 { - return CharRange {ch: self[i] as char, next: i + 1 }; - } - - // Multibyte case is a fn to allow char_range_at to inline cleanly - fn multibyte_char_range_at(s: &str, i: uint) -> CharRange { - let mut val = s[i] as u32; - let w = UTF8_CHAR_WIDTH[val as uint] as uint; - assert!((w != 0)); - - val = utf8_first_byte!(val, w); - val = utf8_acc_cont_byte!(val, s[i + 1]); - if w > 2 { val = utf8_acc_cont_byte!(val, s[i + 2]); } - if w > 3 { val = utf8_acc_cont_byte!(val, s[i + 3]); } - - return CharRange {ch: unsafe { transmute(val) }, next: i + w}; - } - - return multibyte_char_range_at(*self, i); - } - - #[inline] - fn char_range_at_reverse(&self, start: uint) -> CharRange { - let mut prev = start; - - prev = prev.saturating_sub(1); - if self[prev] < 128 { return CharRange{ch: self[prev] as char, next: prev} } - - // Multibyte case is a fn to allow char_range_at_reverse to inline cleanly - fn multibyte_char_range_at_reverse(s: &str, mut i: uint) -> CharRange { - // while there is a previous byte == 10...... - while i > 0 && s[i] & 192u8 == TAG_CONT_U8 { - i -= 1u; - } - - let mut val = s[i] as u32; - let w = UTF8_CHAR_WIDTH[val as uint] as uint; - assert!((w != 0)); - - val = utf8_first_byte!(val, w); - val = utf8_acc_cont_byte!(val, s[i + 1]); - if w > 2 { val = utf8_acc_cont_byte!(val, s[i + 2]); } - if w > 3 { val = utf8_acc_cont_byte!(val, s[i + 3]); } - - return CharRange {ch: unsafe { transmute(val) }, next: i}; - } - - return multibyte_char_range_at_reverse(*self, prev); - } - - #[inline] - fn char_at(&self, i: uint) -> char { - self.char_range_at(i).ch - } - - #[inline] - fn char_at_reverse(&self, i: uint) -> char { - self.char_range_at_reverse(i).ch - } - - #[inline] - fn as_bytes(&self) -> &'a [u8] { - unsafe { cast::transmute(*self) } - } - - fn find(&self, mut search: C) -> Option { - if search.only_ascii() { - self.bytes().position(|b| search.matches(b as char)) - } else { - for (index, c) in self.char_indices() { - if search.matches(c) { return Some(index); } - } - None - } - } - - fn rfind(&self, mut search: C) -> Option { - if search.only_ascii() { - self.bytes().rposition(|b| search.matches(b as char)) - } else { - for (index, c) in self.char_indices().rev() { - if search.matches(c) { return Some(index); } - } - None - } - } - - fn find_str(&self, needle: &str) -> Option { - if needle.is_empty() { - Some(0) - } else { - self.match_indices(needle) - .next() - .map(|(start, _end)| start) - } - } - + /// Given a string, make a new string with repeated copies of it. fn repeat(&self, nn: uint) -> ~str { - let mut ret = StrBuf::with_capacity(nn * self.len()); + let me = self.as_slice(); + let mut ret = StrBuf::with_capacity(nn * me.len()); for _ in range(0, nn) { - ret.push_str(*self); + ret.push_str(me); } ret.into_owned() } - #[inline] - fn slice_shift_char(&self) -> (Option, &'a str) { - if self.is_empty() { - return (None, *self); - } else { - let CharRange {ch, next} = self.char_range_at(0u); - let next_s = unsafe { raw::slice_bytes(*self, next, self.len()) }; - return (Some(ch), next_s); - } - } - + /// Levenshtein Distance between two strings. fn lev_distance(&self, t: &str) -> uint { - let slen = self.len(); + let me = self.as_slice(); + let slen = me.len(); let tlen = t.len(); if slen == 0 { return tlen; } @@ -2699,7 +868,7 @@ impl<'a> StrSlice<'a> for &'a str { let mut dcol = Vec::from_fn(tlen + 1, |x| x); - for (i, sc) in self.chars().enumerate() { + for (i, sc) in me.chars().enumerate() { let mut current = i; *dcol.get_mut(0) = current + 1; @@ -2723,21 +892,39 @@ impl<'a> StrSlice<'a> for &'a str { return *dcol.get(tlen); } - fn subslice_offset(&self, inner: &str) -> uint { - let a_start = self.as_ptr() as uint; - let a_end = a_start + self.len(); - let b_start = inner.as_ptr() as uint; - let b_end = b_start + inner.len(); - - assert!(a_start <= b_start); - assert!(b_end <= a_end); - b_start - a_start - } - + /// An Iterator over the string in Unicode Normalization Form D + /// (canonical decomposition). #[inline] - fn as_ptr(&self) -> *u8 { - self.repr().data + fn nfd_chars<'a>(&'a self) -> Normalizations<'a> { + Normalizations { + iter: self.as_slice().chars(), + buffer: Vec::new(), + sorted: false, + kind: NFD + } } + + /// An Iterator over the string in Unicode Normalization Form KD + /// (compatibility decomposition). + #[inline] + fn nfkd_chars<'a>(&'a self) -> Normalizations<'a> { + Normalizations { + iter: self.as_slice().chars(), + buffer: Vec::new(), + sorted: false, + kind: NFKD + } + } +} + +impl<'a> StrAllocating for &'a str { + #[inline] + fn into_owned(self) -> ~str { self.to_owned() } +} + +impl<'a> StrAllocating for ~str { + #[inline] + fn into_owned(self) -> ~str { self } } /// Methods for owned strings @@ -2765,32 +952,6 @@ impl OwnedStr for ~str { } } -impl Clone for ~str { - #[inline] - fn clone(&self) -> ~str { - self.to_owned() - } -} - -impl FromIterator for ~str { - #[inline] - fn from_iter>(iterator: T) -> ~str { - let (lower, _) = iterator.size_hint(); - let mut buf = StrBuf::with_capacity(lower); - buf.extend(iterator); - buf.into_owned() - } -} - -// This works because every lifetime is a sub-lifetime of 'static -impl<'a> Default for &'a str { - fn default() -> &'a str { "" } -} - -impl Default for ~str { - fn default() -> ~str { "".to_owned() } -} - #[cfg(test)] mod tests { use iter::AdditiveIterator; diff --git a/src/libstd/strbuf.rs b/src/libstd/strbuf.rs index 86da11aceda..ad703b8054b 100644 --- a/src/libstd/strbuf.rs +++ b/src/libstd/strbuf.rs @@ -20,8 +20,8 @@ use iter::{Extendable, FromIterator, Iterator, range}; use option::{None, Option, Some}; use ptr::RawPtr; use slice::{OwnedVector, Vector}; +use str::{OwnedStr, Str, StrSlice, StrAllocating}; use str; -use str::{OwnedStr, Str, StrSlice}; use vec::Vec; /// A growable string stored as a UTF-8 encoded buffer. @@ -268,7 +268,9 @@ impl Str for StrBuf { cast::transmute(self.vec.as_slice()) } } +} +impl StrAllocating for StrBuf { #[inline] fn into_owned(self) -> ~str { let StrBuf { diff --git a/src/libstd/sync/mpmc_bounded_queue.rs b/src/libstd/sync/mpmc_bounded_queue.rs index b392cc8ff9a..2df5031b482 100644 --- a/src/libstd/sync/mpmc_bounded_queue.rs +++ b/src/libstd/sync/mpmc_bounded_queue.rs @@ -162,7 +162,6 @@ impl Clone for Queue { #[cfg(test)] mod tests { use prelude::*; - use option::*; use super::Queue; use native; diff --git a/src/libstd/task.rs b/src/libstd/task.rs index 7c5e984ad36..2f7b31ae31d 100644 --- a/src/libstd/task.rs +++ b/src/libstd/task.rs @@ -49,7 +49,8 @@ use str::{Str, SendStr, IntoMaybeOwned}; #[cfg(test)] use any::{AnyOwnExt, AnyRefExt}; #[cfg(test)] use result; -#[cfg(test)] use str::StrSlice; +#[cfg(test)] use str::StrAllocating; +#[cfg(test)] use realstd::result::ResultUnwrap; /// Indicates the manner in which a task exited. /// diff --git a/src/libstd/to_str.rs b/src/libstd/to_str.rs index bdeae0340e2..4132c8a5b5a 100644 --- a/src/libstd/to_str.rs +++ b/src/libstd/to_str.rs @@ -35,7 +35,7 @@ impl ToStr for T { #[cfg(test)] mod tests { use super::*; - use str::StrSlice; + use str::StrAllocating; #[test] fn test_simple_types() { diff --git a/src/libstd/unicode.rs b/src/libstd/unicode.rs index c98861a0fe7..be6e5d040a7 100644 --- a/src/libstd/unicode.rs +++ b/src/libstd/unicode.rs @@ -10,120 +10,12 @@ // The following code was generated by "src/etc/unicode.py" -#![allow(missing_doc)] -#![allow(non_uppercase_statics)] +#![allow(missing_doc, non_uppercase_statics)] -fn bsearch_range_table(c: char, r: &'static [(char,char)]) -> bool { - use cmp::{Equal, Less, Greater}; - use slice::ImmutableVector; - use option::None; - r.bsearch(|&(lo,hi)| { - if lo <= c && c <= hi { Equal } - else if hi < c { Less } - else { Greater } - }) != None -} - -pub mod general_category { - static Cc_table : &'static [(char,char)] = &[ - ('\x00', '\x1f'), ('\x7f', '\x9f') - ]; - - pub fn Cc(c: char) -> bool { - super::bsearch_range_table(c, Cc_table) - } - - static Nd_table : &'static [(char,char)] = &[ - ('\x30', '\x39'), ('\u0660', '\u0669'), - ('\u06f0', '\u06f9'), ('\u07c0', '\u07c9'), - ('\u0966', '\u096f'), ('\u09e6', '\u09ef'), - ('\u0a66', '\u0a6f'), ('\u0ae6', '\u0aef'), - ('\u0b66', '\u0b6f'), ('\u0be6', '\u0bef'), - ('\u0c66', '\u0c6f'), ('\u0ce6', '\u0cef'), - ('\u0d66', '\u0d6f'), ('\u0e50', '\u0e59'), - ('\u0ed0', '\u0ed9'), ('\u0f20', '\u0f29'), - ('\u1040', '\u1049'), ('\u1090', '\u1099'), - ('\u17e0', '\u17e9'), ('\u1810', '\u1819'), - ('\u1946', '\u194f'), ('\u19d0', '\u19d9'), - ('\u1a80', '\u1a99'), ('\u1b50', '\u1b59'), - ('\u1bb0', '\u1bb9'), ('\u1c40', '\u1c49'), - ('\u1c50', '\u1c59'), ('\ua620', '\ua629'), - ('\ua8d0', '\ua8d9'), ('\ua900', '\ua909'), - ('\ua9d0', '\ua9d9'), ('\uaa50', '\uaa59'), - ('\uabf0', '\uabf9'), ('\uff10', '\uff19'), - ('\U000104a0', '\U000104a9'), ('\U00011066', '\U0001106f'), - ('\U000110f0', '\U000110f9'), ('\U00011136', '\U0001113f'), - ('\U000111d0', '\U000111d9'), ('\U000116c0', '\U000116c9'), - ('\U0001d7ce', '\U0001d7ff') - ]; - - pub fn Nd(c: char) -> bool { - super::bsearch_range_table(c, Nd_table) - } - - static Nl_table : &'static [(char,char)] = &[ - ('\u16ee', '\u16f0'), ('\u2160', '\u2182'), - ('\u2185', '\u2188'), ('\u3007', '\u3007'), - ('\u3021', '\u3029'), ('\u3038', '\u303a'), - ('\ua6e6', '\ua6ef'), ('\U00010140', '\U00010174'), - ('\U00010341', '\U00010341'), ('\U0001034a', '\U0001034a'), - ('\U000103d1', '\U000103d5'), ('\U00012400', '\U00012462') - ]; - - pub fn Nl(c: char) -> bool { - super::bsearch_range_table(c, Nl_table) - } - - static No_table : &'static [(char,char)] = &[ - ('\xb2', '\xb3'), ('\xb9', '\xb9'), - ('\xbc', '\xbe'), ('\u09f4', '\u09f9'), - ('\u0b72', '\u0b77'), ('\u0bf0', '\u0bf2'), - ('\u0c78', '\u0c7e'), ('\u0d70', '\u0d75'), - ('\u0f2a', '\u0f33'), ('\u1369', '\u137c'), - ('\u17f0', '\u17f9'), ('\u19da', '\u19da'), - ('\u2070', '\u2070'), ('\u2074', '\u2079'), - ('\u2080', '\u2089'), ('\u2150', '\u215f'), - ('\u2189', '\u2189'), ('\u2460', '\u249b'), - ('\u24ea', '\u24ff'), ('\u2776', '\u2793'), - ('\u2cfd', '\u2cfd'), ('\u3192', '\u3195'), - ('\u3220', '\u3229'), ('\u3248', '\u324f'), - ('\u3251', '\u325f'), ('\u3280', '\u3289'), - ('\u32b1', '\u32bf'), ('\ua830', '\ua835'), - ('\U00010107', '\U00010133'), ('\U00010175', '\U00010178'), - ('\U0001018a', '\U0001018a'), ('\U00010320', '\U00010323'), - ('\U00010858', '\U0001085f'), ('\U00010916', '\U0001091b'), - ('\U00010a40', '\U00010a47'), ('\U00010a7d', '\U00010a7e'), - ('\U00010b58', '\U00010b5f'), ('\U00010b78', '\U00010b7f'), - ('\U00010e60', '\U00010e7e'), ('\U00011052', '\U00011065'), - ('\U0001d360', '\U0001d371'), ('\U0001f100', '\U0001f10a') - ]; - - pub fn No(c: char) -> bool { - super::bsearch_range_table(c, No_table) - } - -} pub mod decompose { - use option::Option; use option::{Some, None}; use slice::ImmutableVector; - fn bsearch_table(c: char, r: &'static [(char, &'static [char])]) -> Option<&'static [char]> { - use cmp::{Equal, Less, Greater}; - match r.bsearch(|&(val, _)| { - if c == val { Equal } - else if val < c { Less } - else { Greater } - }) { - Some(idx) => { - let (_, result) = r[idx]; - Some(result) - } - None => None - } - } - - fn bsearch_range_value_table(c: char, r: &'static [(char, char, u8)]) -> u8 { use cmp::{Equal, Less, Greater}; match r.bsearch(|&(lo, hi, _)| { @@ -140,2002 +32,6 @@ pub mod decompose { } - // Canonical decompositions - static canonical_table : &'static [(char, &'static [char])] = &[ - ('\xc0', &['\x41', '\u0300']), ('\xc1', &['\x41', '\u0301']), ('\xc2', &['\x41', '\u0302']), - ('\xc3', &['\x41', '\u0303']), ('\xc4', &['\x41', '\u0308']), ('\xc5', &['\x41', '\u030a']), - ('\xc7', &['\x43', '\u0327']), ('\xc8', &['\x45', '\u0300']), ('\xc9', &['\x45', '\u0301']), - ('\xca', &['\x45', '\u0302']), ('\xcb', &['\x45', '\u0308']), ('\xcc', &['\x49', '\u0300']), - ('\xcd', &['\x49', '\u0301']), ('\xce', &['\x49', '\u0302']), ('\xcf', &['\x49', '\u0308']), - ('\xd1', &['\x4e', '\u0303']), ('\xd2', &['\x4f', '\u0300']), ('\xd3', &['\x4f', '\u0301']), - ('\xd4', &['\x4f', '\u0302']), ('\xd5', &['\x4f', '\u0303']), ('\xd6', &['\x4f', '\u0308']), - ('\xd9', &['\x55', '\u0300']), ('\xda', &['\x55', '\u0301']), ('\xdb', &['\x55', '\u0302']), - ('\xdc', &['\x55', '\u0308']), ('\xdd', &['\x59', '\u0301']), ('\xe0', &['\x61', '\u0300']), - ('\xe1', &['\x61', '\u0301']), ('\xe2', &['\x61', '\u0302']), ('\xe3', &['\x61', '\u0303']), - ('\xe4', &['\x61', '\u0308']), ('\xe5', &['\x61', '\u030a']), ('\xe7', &['\x63', '\u0327']), - ('\xe8', &['\x65', '\u0300']), ('\xe9', &['\x65', '\u0301']), ('\xea', &['\x65', '\u0302']), - ('\xeb', &['\x65', '\u0308']), ('\xec', &['\x69', '\u0300']), ('\xed', &['\x69', '\u0301']), - ('\xee', &['\x69', '\u0302']), ('\xef', &['\x69', '\u0308']), ('\xf1', &['\x6e', '\u0303']), - ('\xf2', &['\x6f', '\u0300']), ('\xf3', &['\x6f', '\u0301']), ('\xf4', &['\x6f', '\u0302']), - ('\xf5', &['\x6f', '\u0303']), ('\xf6', &['\x6f', '\u0308']), ('\xf9', &['\x75', '\u0300']), - ('\xfa', &['\x75', '\u0301']), ('\xfb', &['\x75', '\u0302']), ('\xfc', &['\x75', '\u0308']), - ('\xfd', &['\x79', '\u0301']), ('\xff', &['\x79', '\u0308']), ('\u0100', &['\x41', - '\u0304']), ('\u0101', &['\x61', '\u0304']), ('\u0102', &['\x41', '\u0306']), ('\u0103', - &['\x61', '\u0306']), ('\u0104', &['\x41', '\u0328']), ('\u0105', &['\x61', '\u0328']), - ('\u0106', &['\x43', '\u0301']), ('\u0107', &['\x63', '\u0301']), ('\u0108', &['\x43', - '\u0302']), ('\u0109', &['\x63', '\u0302']), ('\u010a', &['\x43', '\u0307']), ('\u010b', - &['\x63', '\u0307']), ('\u010c', &['\x43', '\u030c']), ('\u010d', &['\x63', '\u030c']), - ('\u010e', &['\x44', '\u030c']), ('\u010f', &['\x64', '\u030c']), ('\u0112', &['\x45', - '\u0304']), ('\u0113', &['\x65', '\u0304']), ('\u0114', &['\x45', '\u0306']), ('\u0115', - &['\x65', '\u0306']), ('\u0116', &['\x45', '\u0307']), ('\u0117', &['\x65', '\u0307']), - ('\u0118', &['\x45', '\u0328']), ('\u0119', &['\x65', '\u0328']), ('\u011a', &['\x45', - '\u030c']), ('\u011b', &['\x65', '\u030c']), ('\u011c', &['\x47', '\u0302']), ('\u011d', - &['\x67', '\u0302']), ('\u011e', &['\x47', '\u0306']), ('\u011f', &['\x67', '\u0306']), - ('\u0120', &['\x47', '\u0307']), ('\u0121', &['\x67', '\u0307']), ('\u0122', &['\x47', - '\u0327']), ('\u0123', &['\x67', '\u0327']), ('\u0124', &['\x48', '\u0302']), ('\u0125', - &['\x68', '\u0302']), ('\u0128', &['\x49', '\u0303']), ('\u0129', &['\x69', '\u0303']), - ('\u012a', &['\x49', '\u0304']), ('\u012b', &['\x69', '\u0304']), ('\u012c', &['\x49', - '\u0306']), ('\u012d', &['\x69', '\u0306']), ('\u012e', &['\x49', '\u0328']), ('\u012f', - &['\x69', '\u0328']), ('\u0130', &['\x49', '\u0307']), ('\u0134', &['\x4a', '\u0302']), - ('\u0135', &['\x6a', '\u0302']), ('\u0136', &['\x4b', '\u0327']), ('\u0137', &['\x6b', - '\u0327']), ('\u0139', &['\x4c', '\u0301']), ('\u013a', &['\x6c', '\u0301']), ('\u013b', - &['\x4c', '\u0327']), ('\u013c', &['\x6c', '\u0327']), ('\u013d', &['\x4c', '\u030c']), - ('\u013e', &['\x6c', '\u030c']), ('\u0143', &['\x4e', '\u0301']), ('\u0144', &['\x6e', - '\u0301']), ('\u0145', &['\x4e', '\u0327']), ('\u0146', &['\x6e', '\u0327']), ('\u0147', - &['\x4e', '\u030c']), ('\u0148', &['\x6e', '\u030c']), ('\u014c', &['\x4f', '\u0304']), - ('\u014d', &['\x6f', '\u0304']), ('\u014e', &['\x4f', '\u0306']), ('\u014f', &['\x6f', - '\u0306']), ('\u0150', &['\x4f', '\u030b']), ('\u0151', &['\x6f', '\u030b']), ('\u0154', - &['\x52', '\u0301']), ('\u0155', &['\x72', '\u0301']), ('\u0156', &['\x52', '\u0327']), - ('\u0157', &['\x72', '\u0327']), ('\u0158', &['\x52', '\u030c']), ('\u0159', &['\x72', - '\u030c']), ('\u015a', &['\x53', '\u0301']), ('\u015b', &['\x73', '\u0301']), ('\u015c', - &['\x53', '\u0302']), ('\u015d', &['\x73', '\u0302']), ('\u015e', &['\x53', '\u0327']), - ('\u015f', &['\x73', '\u0327']), ('\u0160', &['\x53', '\u030c']), ('\u0161', &['\x73', - '\u030c']), ('\u0162', &['\x54', '\u0327']), ('\u0163', &['\x74', '\u0327']), ('\u0164', - &['\x54', '\u030c']), ('\u0165', &['\x74', '\u030c']), ('\u0168', &['\x55', '\u0303']), - ('\u0169', &['\x75', '\u0303']), ('\u016a', &['\x55', '\u0304']), ('\u016b', &['\x75', - '\u0304']), ('\u016c', &['\x55', '\u0306']), ('\u016d', &['\x75', '\u0306']), ('\u016e', - &['\x55', '\u030a']), ('\u016f', &['\x75', '\u030a']), ('\u0170', &['\x55', '\u030b']), - ('\u0171', &['\x75', '\u030b']), ('\u0172', &['\x55', '\u0328']), ('\u0173', &['\x75', - '\u0328']), ('\u0174', &['\x57', '\u0302']), ('\u0175', &['\x77', '\u0302']), ('\u0176', - &['\x59', '\u0302']), ('\u0177', &['\x79', '\u0302']), ('\u0178', &['\x59', '\u0308']), - ('\u0179', &['\x5a', '\u0301']), ('\u017a', &['\x7a', '\u0301']), ('\u017b', &['\x5a', - '\u0307']), ('\u017c', &['\x7a', '\u0307']), ('\u017d', &['\x5a', '\u030c']), ('\u017e', - &['\x7a', '\u030c']), ('\u01a0', &['\x4f', '\u031b']), ('\u01a1', &['\x6f', '\u031b']), - ('\u01af', &['\x55', '\u031b']), ('\u01b0', &['\x75', '\u031b']), ('\u01cd', &['\x41', - '\u030c']), ('\u01ce', &['\x61', '\u030c']), ('\u01cf', &['\x49', '\u030c']), ('\u01d0', - &['\x69', '\u030c']), ('\u01d1', &['\x4f', '\u030c']), ('\u01d2', &['\x6f', '\u030c']), - ('\u01d3', &['\x55', '\u030c']), ('\u01d4', &['\x75', '\u030c']), ('\u01d5', &['\xdc', - '\u0304']), ('\u01d6', &['\xfc', '\u0304']), ('\u01d7', &['\xdc', '\u0301']), ('\u01d8', - &['\xfc', '\u0301']), ('\u01d9', &['\xdc', '\u030c']), ('\u01da', &['\xfc', '\u030c']), - ('\u01db', &['\xdc', '\u0300']), ('\u01dc', &['\xfc', '\u0300']), ('\u01de', &['\xc4', - '\u0304']), ('\u01df', &['\xe4', '\u0304']), ('\u01e0', &['\u0226', '\u0304']), ('\u01e1', - &['\u0227', '\u0304']), ('\u01e2', &['\xc6', '\u0304']), ('\u01e3', &['\xe6', '\u0304']), - ('\u01e6', &['\x47', '\u030c']), ('\u01e7', &['\x67', '\u030c']), ('\u01e8', &['\x4b', - '\u030c']), ('\u01e9', &['\x6b', '\u030c']), ('\u01ea', &['\x4f', '\u0328']), ('\u01eb', - &['\x6f', '\u0328']), ('\u01ec', &['\u01ea', '\u0304']), ('\u01ed', &['\u01eb', '\u0304']), - ('\u01ee', &['\u01b7', '\u030c']), ('\u01ef', &['\u0292', '\u030c']), ('\u01f0', &['\x6a', - '\u030c']), ('\u01f4', &['\x47', '\u0301']), ('\u01f5', &['\x67', '\u0301']), ('\u01f8', - &['\x4e', '\u0300']), ('\u01f9', &['\x6e', '\u0300']), ('\u01fa', &['\xc5', '\u0301']), - ('\u01fb', &['\xe5', '\u0301']), ('\u01fc', &['\xc6', '\u0301']), ('\u01fd', &['\xe6', - '\u0301']), ('\u01fe', &['\xd8', '\u0301']), ('\u01ff', &['\xf8', '\u0301']), ('\u0200', - &['\x41', '\u030f']), ('\u0201', &['\x61', '\u030f']), ('\u0202', &['\x41', '\u0311']), - ('\u0203', &['\x61', '\u0311']), ('\u0204', &['\x45', '\u030f']), ('\u0205', &['\x65', - '\u030f']), ('\u0206', &['\x45', '\u0311']), ('\u0207', &['\x65', '\u0311']), ('\u0208', - &['\x49', '\u030f']), ('\u0209', &['\x69', '\u030f']), ('\u020a', &['\x49', '\u0311']), - ('\u020b', &['\x69', '\u0311']), ('\u020c', &['\x4f', '\u030f']), ('\u020d', &['\x6f', - '\u030f']), ('\u020e', &['\x4f', '\u0311']), ('\u020f', &['\x6f', '\u0311']), ('\u0210', - &['\x52', '\u030f']), ('\u0211', &['\x72', '\u030f']), ('\u0212', &['\x52', '\u0311']), - ('\u0213', &['\x72', '\u0311']), ('\u0214', &['\x55', '\u030f']), ('\u0215', &['\x75', - '\u030f']), ('\u0216', &['\x55', '\u0311']), ('\u0217', &['\x75', '\u0311']), ('\u0218', - &['\x53', '\u0326']), ('\u0219', &['\x73', '\u0326']), ('\u021a', &['\x54', '\u0326']), - ('\u021b', &['\x74', '\u0326']), ('\u021e', &['\x48', '\u030c']), ('\u021f', &['\x68', - '\u030c']), ('\u0226', &['\x41', '\u0307']), ('\u0227', &['\x61', '\u0307']), ('\u0228', - &['\x45', '\u0327']), ('\u0229', &['\x65', '\u0327']), ('\u022a', &['\xd6', '\u0304']), - ('\u022b', &['\xf6', '\u0304']), ('\u022c', &['\xd5', '\u0304']), ('\u022d', &['\xf5', - '\u0304']), ('\u022e', &['\x4f', '\u0307']), ('\u022f', &['\x6f', '\u0307']), ('\u0230', - &['\u022e', '\u0304']), ('\u0231', &['\u022f', '\u0304']), ('\u0232', &['\x59', '\u0304']), - ('\u0233', &['\x79', '\u0304']), ('\u0340', &['\u0300']), ('\u0341', &['\u0301']), - ('\u0343', &['\u0313']), ('\u0344', &['\u0308', '\u0301']), ('\u0374', &['\u02b9']), - ('\u037e', &['\x3b']), ('\u0385', &['\xa8', '\u0301']), ('\u0386', &['\u0391', '\u0301']), - ('\u0387', &['\xb7']), ('\u0388', &['\u0395', '\u0301']), ('\u0389', &['\u0397', '\u0301']), - ('\u038a', &['\u0399', '\u0301']), ('\u038c', &['\u039f', '\u0301']), ('\u038e', &['\u03a5', - '\u0301']), ('\u038f', &['\u03a9', '\u0301']), ('\u0390', &['\u03ca', '\u0301']), ('\u03aa', - &['\u0399', '\u0308']), ('\u03ab', &['\u03a5', '\u0308']), ('\u03ac', &['\u03b1', - '\u0301']), ('\u03ad', &['\u03b5', '\u0301']), ('\u03ae', &['\u03b7', '\u0301']), ('\u03af', - &['\u03b9', '\u0301']), ('\u03b0', &['\u03cb', '\u0301']), ('\u03ca', &['\u03b9', - '\u0308']), ('\u03cb', &['\u03c5', '\u0308']), ('\u03cc', &['\u03bf', '\u0301']), ('\u03cd', - &['\u03c5', '\u0301']), ('\u03ce', &['\u03c9', '\u0301']), ('\u03d3', &['\u03d2', - '\u0301']), ('\u03d4', &['\u03d2', '\u0308']), ('\u0400', &['\u0415', '\u0300']), ('\u0401', - &['\u0415', '\u0308']), ('\u0403', &['\u0413', '\u0301']), ('\u0407', &['\u0406', - '\u0308']), ('\u040c', &['\u041a', '\u0301']), ('\u040d', &['\u0418', '\u0300']), ('\u040e', - &['\u0423', '\u0306']), ('\u0419', &['\u0418', '\u0306']), ('\u0439', &['\u0438', - '\u0306']), ('\u0450', &['\u0435', '\u0300']), ('\u0451', &['\u0435', '\u0308']), ('\u0453', - &['\u0433', '\u0301']), ('\u0457', &['\u0456', '\u0308']), ('\u045c', &['\u043a', - '\u0301']), ('\u045d', &['\u0438', '\u0300']), ('\u045e', &['\u0443', '\u0306']), ('\u0476', - &['\u0474', '\u030f']), ('\u0477', &['\u0475', '\u030f']), ('\u04c1', &['\u0416', - '\u0306']), ('\u04c2', &['\u0436', '\u0306']), ('\u04d0', &['\u0410', '\u0306']), ('\u04d1', - &['\u0430', '\u0306']), ('\u04d2', &['\u0410', '\u0308']), ('\u04d3', &['\u0430', - '\u0308']), ('\u04d6', &['\u0415', '\u0306']), ('\u04d7', &['\u0435', '\u0306']), ('\u04da', - &['\u04d8', '\u0308']), ('\u04db', &['\u04d9', '\u0308']), ('\u04dc', &['\u0416', - '\u0308']), ('\u04dd', &['\u0436', '\u0308']), ('\u04de', &['\u0417', '\u0308']), ('\u04df', - &['\u0437', '\u0308']), ('\u04e2', &['\u0418', '\u0304']), ('\u04e3', &['\u0438', - '\u0304']), ('\u04e4', &['\u0418', '\u0308']), ('\u04e5', &['\u0438', '\u0308']), ('\u04e6', - &['\u041e', '\u0308']), ('\u04e7', &['\u043e', '\u0308']), ('\u04ea', &['\u04e8', - '\u0308']), ('\u04eb', &['\u04e9', '\u0308']), ('\u04ec', &['\u042d', '\u0308']), ('\u04ed', - &['\u044d', '\u0308']), ('\u04ee', &['\u0423', '\u0304']), ('\u04ef', &['\u0443', - '\u0304']), ('\u04f0', &['\u0423', '\u0308']), ('\u04f1', &['\u0443', '\u0308']), ('\u04f2', - &['\u0423', '\u030b']), ('\u04f3', &['\u0443', '\u030b']), ('\u04f4', &['\u0427', - '\u0308']), ('\u04f5', &['\u0447', '\u0308']), ('\u04f8', &['\u042b', '\u0308']), ('\u04f9', - &['\u044b', '\u0308']), ('\u0622', &['\u0627', '\u0653']), ('\u0623', &['\u0627', - '\u0654']), ('\u0624', &['\u0648', '\u0654']), ('\u0625', &['\u0627', '\u0655']), ('\u0626', - &['\u064a', '\u0654']), ('\u06c0', &['\u06d5', '\u0654']), ('\u06c2', &['\u06c1', - '\u0654']), ('\u06d3', &['\u06d2', '\u0654']), ('\u0929', &['\u0928', '\u093c']), ('\u0931', - &['\u0930', '\u093c']), ('\u0934', &['\u0933', '\u093c']), ('\u0958', &['\u0915', - '\u093c']), ('\u0959', &['\u0916', '\u093c']), ('\u095a', &['\u0917', '\u093c']), ('\u095b', - &['\u091c', '\u093c']), ('\u095c', &['\u0921', '\u093c']), ('\u095d', &['\u0922', - '\u093c']), ('\u095e', &['\u092b', '\u093c']), ('\u095f', &['\u092f', '\u093c']), ('\u09cb', - &['\u09c7', '\u09be']), ('\u09cc', &['\u09c7', '\u09d7']), ('\u09dc', &['\u09a1', - '\u09bc']), ('\u09dd', &['\u09a2', '\u09bc']), ('\u09df', &['\u09af', '\u09bc']), ('\u0a33', - &['\u0a32', '\u0a3c']), ('\u0a36', &['\u0a38', '\u0a3c']), ('\u0a59', &['\u0a16', - '\u0a3c']), ('\u0a5a', &['\u0a17', '\u0a3c']), ('\u0a5b', &['\u0a1c', '\u0a3c']), ('\u0a5e', - &['\u0a2b', '\u0a3c']), ('\u0b48', &['\u0b47', '\u0b56']), ('\u0b4b', &['\u0b47', - '\u0b3e']), ('\u0b4c', &['\u0b47', '\u0b57']), ('\u0b5c', &['\u0b21', '\u0b3c']), ('\u0b5d', - &['\u0b22', '\u0b3c']), ('\u0b94', &['\u0b92', '\u0bd7']), ('\u0bca', &['\u0bc6', - '\u0bbe']), ('\u0bcb', &['\u0bc7', '\u0bbe']), ('\u0bcc', &['\u0bc6', '\u0bd7']), ('\u0c48', - &['\u0c46', '\u0c56']), ('\u0cc0', &['\u0cbf', '\u0cd5']), ('\u0cc7', &['\u0cc6', - '\u0cd5']), ('\u0cc8', &['\u0cc6', '\u0cd6']), ('\u0cca', &['\u0cc6', '\u0cc2']), ('\u0ccb', - &['\u0cca', '\u0cd5']), ('\u0d4a', &['\u0d46', '\u0d3e']), ('\u0d4b', &['\u0d47', - '\u0d3e']), ('\u0d4c', &['\u0d46', '\u0d57']), ('\u0dda', &['\u0dd9', '\u0dca']), ('\u0ddc', - &['\u0dd9', '\u0dcf']), ('\u0ddd', &['\u0ddc', '\u0dca']), ('\u0dde', &['\u0dd9', - '\u0ddf']), ('\u0f43', &['\u0f42', '\u0fb7']), ('\u0f4d', &['\u0f4c', '\u0fb7']), ('\u0f52', - &['\u0f51', '\u0fb7']), ('\u0f57', &['\u0f56', '\u0fb7']), ('\u0f5c', &['\u0f5b', - '\u0fb7']), ('\u0f69', &['\u0f40', '\u0fb5']), ('\u0f73', &['\u0f71', '\u0f72']), ('\u0f75', - &['\u0f71', '\u0f74']), ('\u0f76', &['\u0fb2', '\u0f80']), ('\u0f78', &['\u0fb3', - '\u0f80']), ('\u0f81', &['\u0f71', '\u0f80']), ('\u0f93', &['\u0f92', '\u0fb7']), ('\u0f9d', - &['\u0f9c', '\u0fb7']), ('\u0fa2', &['\u0fa1', '\u0fb7']), ('\u0fa7', &['\u0fa6', - '\u0fb7']), ('\u0fac', &['\u0fab', '\u0fb7']), ('\u0fb9', &['\u0f90', '\u0fb5']), ('\u1026', - &['\u1025', '\u102e']), ('\u1b06', &['\u1b05', '\u1b35']), ('\u1b08', &['\u1b07', - '\u1b35']), ('\u1b0a', &['\u1b09', '\u1b35']), ('\u1b0c', &['\u1b0b', '\u1b35']), ('\u1b0e', - &['\u1b0d', '\u1b35']), ('\u1b12', &['\u1b11', '\u1b35']), ('\u1b3b', &['\u1b3a', - '\u1b35']), ('\u1b3d', &['\u1b3c', '\u1b35']), ('\u1b40', &['\u1b3e', '\u1b35']), ('\u1b41', - &['\u1b3f', '\u1b35']), ('\u1b43', &['\u1b42', '\u1b35']), ('\u1e00', &['\x41', '\u0325']), - ('\u1e01', &['\x61', '\u0325']), ('\u1e02', &['\x42', '\u0307']), ('\u1e03', &['\x62', - '\u0307']), ('\u1e04', &['\x42', '\u0323']), ('\u1e05', &['\x62', '\u0323']), ('\u1e06', - &['\x42', '\u0331']), ('\u1e07', &['\x62', '\u0331']), ('\u1e08', &['\xc7', '\u0301']), - ('\u1e09', &['\xe7', '\u0301']), ('\u1e0a', &['\x44', '\u0307']), ('\u1e0b', &['\x64', - '\u0307']), ('\u1e0c', &['\x44', '\u0323']), ('\u1e0d', &['\x64', '\u0323']), ('\u1e0e', - &['\x44', '\u0331']), ('\u1e0f', &['\x64', '\u0331']), ('\u1e10', &['\x44', '\u0327']), - ('\u1e11', &['\x64', '\u0327']), ('\u1e12', &['\x44', '\u032d']), ('\u1e13', &['\x64', - '\u032d']), ('\u1e14', &['\u0112', '\u0300']), ('\u1e15', &['\u0113', '\u0300']), ('\u1e16', - &['\u0112', '\u0301']), ('\u1e17', &['\u0113', '\u0301']), ('\u1e18', &['\x45', '\u032d']), - ('\u1e19', &['\x65', '\u032d']), ('\u1e1a', &['\x45', '\u0330']), ('\u1e1b', &['\x65', - '\u0330']), ('\u1e1c', &['\u0228', '\u0306']), ('\u1e1d', &['\u0229', '\u0306']), ('\u1e1e', - &['\x46', '\u0307']), ('\u1e1f', &['\x66', '\u0307']), ('\u1e20', &['\x47', '\u0304']), - ('\u1e21', &['\x67', '\u0304']), ('\u1e22', &['\x48', '\u0307']), ('\u1e23', &['\x68', - '\u0307']), ('\u1e24', &['\x48', '\u0323']), ('\u1e25', &['\x68', '\u0323']), ('\u1e26', - &['\x48', '\u0308']), ('\u1e27', &['\x68', '\u0308']), ('\u1e28', &['\x48', '\u0327']), - ('\u1e29', &['\x68', '\u0327']), ('\u1e2a', &['\x48', '\u032e']), ('\u1e2b', &['\x68', - '\u032e']), ('\u1e2c', &['\x49', '\u0330']), ('\u1e2d', &['\x69', '\u0330']), ('\u1e2e', - &['\xcf', '\u0301']), ('\u1e2f', &['\xef', '\u0301']), ('\u1e30', &['\x4b', '\u0301']), - ('\u1e31', &['\x6b', '\u0301']), ('\u1e32', &['\x4b', '\u0323']), ('\u1e33', &['\x6b', - '\u0323']), ('\u1e34', &['\x4b', '\u0331']), ('\u1e35', &['\x6b', '\u0331']), ('\u1e36', - &['\x4c', '\u0323']), ('\u1e37', &['\x6c', '\u0323']), ('\u1e38', &['\u1e36', '\u0304']), - ('\u1e39', &['\u1e37', '\u0304']), ('\u1e3a', &['\x4c', '\u0331']), ('\u1e3b', &['\x6c', - '\u0331']), ('\u1e3c', &['\x4c', '\u032d']), ('\u1e3d', &['\x6c', '\u032d']), ('\u1e3e', - &['\x4d', '\u0301']), ('\u1e3f', &['\x6d', '\u0301']), ('\u1e40', &['\x4d', '\u0307']), - ('\u1e41', &['\x6d', '\u0307']), ('\u1e42', &['\x4d', '\u0323']), ('\u1e43', &['\x6d', - '\u0323']), ('\u1e44', &['\x4e', '\u0307']), ('\u1e45', &['\x6e', '\u0307']), ('\u1e46', - &['\x4e', '\u0323']), ('\u1e47', &['\x6e', '\u0323']), ('\u1e48', &['\x4e', '\u0331']), - ('\u1e49', &['\x6e', '\u0331']), ('\u1e4a', &['\x4e', '\u032d']), ('\u1e4b', &['\x6e', - '\u032d']), ('\u1e4c', &['\xd5', '\u0301']), ('\u1e4d', &['\xf5', '\u0301']), ('\u1e4e', - &['\xd5', '\u0308']), ('\u1e4f', &['\xf5', '\u0308']), ('\u1e50', &['\u014c', '\u0300']), - ('\u1e51', &['\u014d', '\u0300']), ('\u1e52', &['\u014c', '\u0301']), ('\u1e53', &['\u014d', - '\u0301']), ('\u1e54', &['\x50', '\u0301']), ('\u1e55', &['\x70', '\u0301']), ('\u1e56', - &['\x50', '\u0307']), ('\u1e57', &['\x70', '\u0307']), ('\u1e58', &['\x52', '\u0307']), - ('\u1e59', &['\x72', '\u0307']), ('\u1e5a', &['\x52', '\u0323']), ('\u1e5b', &['\x72', - '\u0323']), ('\u1e5c', &['\u1e5a', '\u0304']), ('\u1e5d', &['\u1e5b', '\u0304']), ('\u1e5e', - &['\x52', '\u0331']), ('\u1e5f', &['\x72', '\u0331']), ('\u1e60', &['\x53', '\u0307']), - ('\u1e61', &['\x73', '\u0307']), ('\u1e62', &['\x53', '\u0323']), ('\u1e63', &['\x73', - '\u0323']), ('\u1e64', &['\u015a', '\u0307']), ('\u1e65', &['\u015b', '\u0307']), ('\u1e66', - &['\u0160', '\u0307']), ('\u1e67', &['\u0161', '\u0307']), ('\u1e68', &['\u1e62', - '\u0307']), ('\u1e69', &['\u1e63', '\u0307']), ('\u1e6a', &['\x54', '\u0307']), ('\u1e6b', - &['\x74', '\u0307']), ('\u1e6c', &['\x54', '\u0323']), ('\u1e6d', &['\x74', '\u0323']), - ('\u1e6e', &['\x54', '\u0331']), ('\u1e6f', &['\x74', '\u0331']), ('\u1e70', &['\x54', - '\u032d']), ('\u1e71', &['\x74', '\u032d']), ('\u1e72', &['\x55', '\u0324']), ('\u1e73', - &['\x75', '\u0324']), ('\u1e74', &['\x55', '\u0330']), ('\u1e75', &['\x75', '\u0330']), - ('\u1e76', &['\x55', '\u032d']), ('\u1e77', &['\x75', '\u032d']), ('\u1e78', &['\u0168', - '\u0301']), ('\u1e79', &['\u0169', '\u0301']), ('\u1e7a', &['\u016a', '\u0308']), ('\u1e7b', - &['\u016b', '\u0308']), ('\u1e7c', &['\x56', '\u0303']), ('\u1e7d', &['\x76', '\u0303']), - ('\u1e7e', &['\x56', '\u0323']), ('\u1e7f', &['\x76', '\u0323']), ('\u1e80', &['\x57', - '\u0300']), ('\u1e81', &['\x77', '\u0300']), ('\u1e82', &['\x57', '\u0301']), ('\u1e83', - &['\x77', '\u0301']), ('\u1e84', &['\x57', '\u0308']), ('\u1e85', &['\x77', '\u0308']), - ('\u1e86', &['\x57', '\u0307']), ('\u1e87', &['\x77', '\u0307']), ('\u1e88', &['\x57', - '\u0323']), ('\u1e89', &['\x77', '\u0323']), ('\u1e8a', &['\x58', '\u0307']), ('\u1e8b', - &['\x78', '\u0307']), ('\u1e8c', &['\x58', '\u0308']), ('\u1e8d', &['\x78', '\u0308']), - ('\u1e8e', &['\x59', '\u0307']), ('\u1e8f', &['\x79', '\u0307']), ('\u1e90', &['\x5a', - '\u0302']), ('\u1e91', &['\x7a', '\u0302']), ('\u1e92', &['\x5a', '\u0323']), ('\u1e93', - &['\x7a', '\u0323']), ('\u1e94', &['\x5a', '\u0331']), ('\u1e95', &['\x7a', '\u0331']), - ('\u1e96', &['\x68', '\u0331']), ('\u1e97', &['\x74', '\u0308']), ('\u1e98', &['\x77', - '\u030a']), ('\u1e99', &['\x79', '\u030a']), ('\u1e9b', &['\u017f', '\u0307']), ('\u1ea0', - &['\x41', '\u0323']), ('\u1ea1', &['\x61', '\u0323']), ('\u1ea2', &['\x41', '\u0309']), - ('\u1ea3', &['\x61', '\u0309']), ('\u1ea4', &['\xc2', '\u0301']), ('\u1ea5', &['\xe2', - '\u0301']), ('\u1ea6', &['\xc2', '\u0300']), ('\u1ea7', &['\xe2', '\u0300']), ('\u1ea8', - &['\xc2', '\u0309']), ('\u1ea9', &['\xe2', '\u0309']), ('\u1eaa', &['\xc2', '\u0303']), - ('\u1eab', &['\xe2', '\u0303']), ('\u1eac', &['\u1ea0', '\u0302']), ('\u1ead', &['\u1ea1', - '\u0302']), ('\u1eae', &['\u0102', '\u0301']), ('\u1eaf', &['\u0103', '\u0301']), ('\u1eb0', - &['\u0102', '\u0300']), ('\u1eb1', &['\u0103', '\u0300']), ('\u1eb2', &['\u0102', - '\u0309']), ('\u1eb3', &['\u0103', '\u0309']), ('\u1eb4', &['\u0102', '\u0303']), ('\u1eb5', - &['\u0103', '\u0303']), ('\u1eb6', &['\u1ea0', '\u0306']), ('\u1eb7', &['\u1ea1', - '\u0306']), ('\u1eb8', &['\x45', '\u0323']), ('\u1eb9', &['\x65', '\u0323']), ('\u1eba', - &['\x45', '\u0309']), ('\u1ebb', &['\x65', '\u0309']), ('\u1ebc', &['\x45', '\u0303']), - ('\u1ebd', &['\x65', '\u0303']), ('\u1ebe', &['\xca', '\u0301']), ('\u1ebf', &['\xea', - '\u0301']), ('\u1ec0', &['\xca', '\u0300']), ('\u1ec1', &['\xea', '\u0300']), ('\u1ec2', - &['\xca', '\u0309']), ('\u1ec3', &['\xea', '\u0309']), ('\u1ec4', &['\xca', '\u0303']), - ('\u1ec5', &['\xea', '\u0303']), ('\u1ec6', &['\u1eb8', '\u0302']), ('\u1ec7', &['\u1eb9', - '\u0302']), ('\u1ec8', &['\x49', '\u0309']), ('\u1ec9', &['\x69', '\u0309']), ('\u1eca', - &['\x49', '\u0323']), ('\u1ecb', &['\x69', '\u0323']), ('\u1ecc', &['\x4f', '\u0323']), - ('\u1ecd', &['\x6f', '\u0323']), ('\u1ece', &['\x4f', '\u0309']), ('\u1ecf', &['\x6f', - '\u0309']), ('\u1ed0', &['\xd4', '\u0301']), ('\u1ed1', &['\xf4', '\u0301']), ('\u1ed2', - &['\xd4', '\u0300']), ('\u1ed3', &['\xf4', '\u0300']), ('\u1ed4', &['\xd4', '\u0309']), - ('\u1ed5', &['\xf4', '\u0309']), ('\u1ed6', &['\xd4', '\u0303']), ('\u1ed7', &['\xf4', - '\u0303']), ('\u1ed8', &['\u1ecc', '\u0302']), ('\u1ed9', &['\u1ecd', '\u0302']), ('\u1eda', - &['\u01a0', '\u0301']), ('\u1edb', &['\u01a1', '\u0301']), ('\u1edc', &['\u01a0', - '\u0300']), ('\u1edd', &['\u01a1', '\u0300']), ('\u1ede', &['\u01a0', '\u0309']), ('\u1edf', - &['\u01a1', '\u0309']), ('\u1ee0', &['\u01a0', '\u0303']), ('\u1ee1', &['\u01a1', - '\u0303']), ('\u1ee2', &['\u01a0', '\u0323']), ('\u1ee3', &['\u01a1', '\u0323']), ('\u1ee4', - &['\x55', '\u0323']), ('\u1ee5', &['\x75', '\u0323']), ('\u1ee6', &['\x55', '\u0309']), - ('\u1ee7', &['\x75', '\u0309']), ('\u1ee8', &['\u01af', '\u0301']), ('\u1ee9', &['\u01b0', - '\u0301']), ('\u1eea', &['\u01af', '\u0300']), ('\u1eeb', &['\u01b0', '\u0300']), ('\u1eec', - &['\u01af', '\u0309']), ('\u1eed', &['\u01b0', '\u0309']), ('\u1eee', &['\u01af', - '\u0303']), ('\u1eef', &['\u01b0', '\u0303']), ('\u1ef0', &['\u01af', '\u0323']), ('\u1ef1', - &['\u01b0', '\u0323']), ('\u1ef2', &['\x59', '\u0300']), ('\u1ef3', &['\x79', '\u0300']), - ('\u1ef4', &['\x59', '\u0323']), ('\u1ef5', &['\x79', '\u0323']), ('\u1ef6', &['\x59', - '\u0309']), ('\u1ef7', &['\x79', '\u0309']), ('\u1ef8', &['\x59', '\u0303']), ('\u1ef9', - &['\x79', '\u0303']), ('\u1f00', &['\u03b1', '\u0313']), ('\u1f01', &['\u03b1', '\u0314']), - ('\u1f02', &['\u1f00', '\u0300']), ('\u1f03', &['\u1f01', '\u0300']), ('\u1f04', &['\u1f00', - '\u0301']), ('\u1f05', &['\u1f01', '\u0301']), ('\u1f06', &['\u1f00', '\u0342']), ('\u1f07', - &['\u1f01', '\u0342']), ('\u1f08', &['\u0391', '\u0313']), ('\u1f09', &['\u0391', - '\u0314']), ('\u1f0a', &['\u1f08', '\u0300']), ('\u1f0b', &['\u1f09', '\u0300']), ('\u1f0c', - &['\u1f08', '\u0301']), ('\u1f0d', &['\u1f09', '\u0301']), ('\u1f0e', &['\u1f08', - '\u0342']), ('\u1f0f', &['\u1f09', '\u0342']), ('\u1f10', &['\u03b5', '\u0313']), ('\u1f11', - &['\u03b5', '\u0314']), ('\u1f12', &['\u1f10', '\u0300']), ('\u1f13', &['\u1f11', - '\u0300']), ('\u1f14', &['\u1f10', '\u0301']), ('\u1f15', &['\u1f11', '\u0301']), ('\u1f18', - &['\u0395', '\u0313']), ('\u1f19', &['\u0395', '\u0314']), ('\u1f1a', &['\u1f18', - '\u0300']), ('\u1f1b', &['\u1f19', '\u0300']), ('\u1f1c', &['\u1f18', '\u0301']), ('\u1f1d', - &['\u1f19', '\u0301']), ('\u1f20', &['\u03b7', '\u0313']), ('\u1f21', &['\u03b7', - '\u0314']), ('\u1f22', &['\u1f20', '\u0300']), ('\u1f23', &['\u1f21', '\u0300']), ('\u1f24', - &['\u1f20', '\u0301']), ('\u1f25', &['\u1f21', '\u0301']), ('\u1f26', &['\u1f20', - '\u0342']), ('\u1f27', &['\u1f21', '\u0342']), ('\u1f28', &['\u0397', '\u0313']), ('\u1f29', - &['\u0397', '\u0314']), ('\u1f2a', &['\u1f28', '\u0300']), ('\u1f2b', &['\u1f29', - '\u0300']), ('\u1f2c', &['\u1f28', '\u0301']), ('\u1f2d', &['\u1f29', '\u0301']), ('\u1f2e', - &['\u1f28', '\u0342']), ('\u1f2f', &['\u1f29', '\u0342']), ('\u1f30', &['\u03b9', - '\u0313']), ('\u1f31', &['\u03b9', '\u0314']), ('\u1f32', &['\u1f30', '\u0300']), ('\u1f33', - &['\u1f31', '\u0300']), ('\u1f34', &['\u1f30', '\u0301']), ('\u1f35', &['\u1f31', - '\u0301']), ('\u1f36', &['\u1f30', '\u0342']), ('\u1f37', &['\u1f31', '\u0342']), ('\u1f38', - &['\u0399', '\u0313']), ('\u1f39', &['\u0399', '\u0314']), ('\u1f3a', &['\u1f38', - '\u0300']), ('\u1f3b', &['\u1f39', '\u0300']), ('\u1f3c', &['\u1f38', '\u0301']), ('\u1f3d', - &['\u1f39', '\u0301']), ('\u1f3e', &['\u1f38', '\u0342']), ('\u1f3f', &['\u1f39', - '\u0342']), ('\u1f40', &['\u03bf', '\u0313']), ('\u1f41', &['\u03bf', '\u0314']), ('\u1f42', - &['\u1f40', '\u0300']), ('\u1f43', &['\u1f41', '\u0300']), ('\u1f44', &['\u1f40', - '\u0301']), ('\u1f45', &['\u1f41', '\u0301']), ('\u1f48', &['\u039f', '\u0313']), ('\u1f49', - &['\u039f', '\u0314']), ('\u1f4a', &['\u1f48', '\u0300']), ('\u1f4b', &['\u1f49', - '\u0300']), ('\u1f4c', &['\u1f48', '\u0301']), ('\u1f4d', &['\u1f49', '\u0301']), ('\u1f50', - &['\u03c5', '\u0313']), ('\u1f51', &['\u03c5', '\u0314']), ('\u1f52', &['\u1f50', - '\u0300']), ('\u1f53', &['\u1f51', '\u0300']), ('\u1f54', &['\u1f50', '\u0301']), ('\u1f55', - &['\u1f51', '\u0301']), ('\u1f56', &['\u1f50', '\u0342']), ('\u1f57', &['\u1f51', - '\u0342']), ('\u1f59', &['\u03a5', '\u0314']), ('\u1f5b', &['\u1f59', '\u0300']), ('\u1f5d', - &['\u1f59', '\u0301']), ('\u1f5f', &['\u1f59', '\u0342']), ('\u1f60', &['\u03c9', - '\u0313']), ('\u1f61', &['\u03c9', '\u0314']), ('\u1f62', &['\u1f60', '\u0300']), ('\u1f63', - &['\u1f61', '\u0300']), ('\u1f64', &['\u1f60', '\u0301']), ('\u1f65', &['\u1f61', - '\u0301']), ('\u1f66', &['\u1f60', '\u0342']), ('\u1f67', &['\u1f61', '\u0342']), ('\u1f68', - &['\u03a9', '\u0313']), ('\u1f69', &['\u03a9', '\u0314']), ('\u1f6a', &['\u1f68', - '\u0300']), ('\u1f6b', &['\u1f69', '\u0300']), ('\u1f6c', &['\u1f68', '\u0301']), ('\u1f6d', - &['\u1f69', '\u0301']), ('\u1f6e', &['\u1f68', '\u0342']), ('\u1f6f', &['\u1f69', - '\u0342']), ('\u1f70', &['\u03b1', '\u0300']), ('\u1f71', &['\u03ac']), ('\u1f72', - &['\u03b5', '\u0300']), ('\u1f73', &['\u03ad']), ('\u1f74', &['\u03b7', '\u0300']), - ('\u1f75', &['\u03ae']), ('\u1f76', &['\u03b9', '\u0300']), ('\u1f77', &['\u03af']), - ('\u1f78', &['\u03bf', '\u0300']), ('\u1f79', &['\u03cc']), ('\u1f7a', &['\u03c5', - '\u0300']), ('\u1f7b', &['\u03cd']), ('\u1f7c', &['\u03c9', '\u0300']), ('\u1f7d', - &['\u03ce']), ('\u1f80', &['\u1f00', '\u0345']), ('\u1f81', &['\u1f01', '\u0345']), - ('\u1f82', &['\u1f02', '\u0345']), ('\u1f83', &['\u1f03', '\u0345']), ('\u1f84', &['\u1f04', - '\u0345']), ('\u1f85', &['\u1f05', '\u0345']), ('\u1f86', &['\u1f06', '\u0345']), ('\u1f87', - &['\u1f07', '\u0345']), ('\u1f88', &['\u1f08', '\u0345']), ('\u1f89', &['\u1f09', - '\u0345']), ('\u1f8a', &['\u1f0a', '\u0345']), ('\u1f8b', &['\u1f0b', '\u0345']), ('\u1f8c', - &['\u1f0c', '\u0345']), ('\u1f8d', &['\u1f0d', '\u0345']), ('\u1f8e', &['\u1f0e', - '\u0345']), ('\u1f8f', &['\u1f0f', '\u0345']), ('\u1f90', &['\u1f20', '\u0345']), ('\u1f91', - &['\u1f21', '\u0345']), ('\u1f92', &['\u1f22', '\u0345']), ('\u1f93', &['\u1f23', - '\u0345']), ('\u1f94', &['\u1f24', '\u0345']), ('\u1f95', &['\u1f25', '\u0345']), ('\u1f96', - &['\u1f26', '\u0345']), ('\u1f97', &['\u1f27', '\u0345']), ('\u1f98', &['\u1f28', - '\u0345']), ('\u1f99', &['\u1f29', '\u0345']), ('\u1f9a', &['\u1f2a', '\u0345']), ('\u1f9b', - &['\u1f2b', '\u0345']), ('\u1f9c', &['\u1f2c', '\u0345']), ('\u1f9d', &['\u1f2d', - '\u0345']), ('\u1f9e', &['\u1f2e', '\u0345']), ('\u1f9f', &['\u1f2f', '\u0345']), ('\u1fa0', - &['\u1f60', '\u0345']), ('\u1fa1', &['\u1f61', '\u0345']), ('\u1fa2', &['\u1f62', - '\u0345']), ('\u1fa3', &['\u1f63', '\u0345']), ('\u1fa4', &['\u1f64', '\u0345']), ('\u1fa5', - &['\u1f65', '\u0345']), ('\u1fa6', &['\u1f66', '\u0345']), ('\u1fa7', &['\u1f67', - '\u0345']), ('\u1fa8', &['\u1f68', '\u0345']), ('\u1fa9', &['\u1f69', '\u0345']), ('\u1faa', - &['\u1f6a', '\u0345']), ('\u1fab', &['\u1f6b', '\u0345']), ('\u1fac', &['\u1f6c', - '\u0345']), ('\u1fad', &['\u1f6d', '\u0345']), ('\u1fae', &['\u1f6e', '\u0345']), ('\u1faf', - &['\u1f6f', '\u0345']), ('\u1fb0', &['\u03b1', '\u0306']), ('\u1fb1', &['\u03b1', - '\u0304']), ('\u1fb2', &['\u1f70', '\u0345']), ('\u1fb3', &['\u03b1', '\u0345']), ('\u1fb4', - &['\u03ac', '\u0345']), ('\u1fb6', &['\u03b1', '\u0342']), ('\u1fb7', &['\u1fb6', - '\u0345']), ('\u1fb8', &['\u0391', '\u0306']), ('\u1fb9', &['\u0391', '\u0304']), ('\u1fba', - &['\u0391', '\u0300']), ('\u1fbb', &['\u0386']), ('\u1fbc', &['\u0391', '\u0345']), - ('\u1fbe', &['\u03b9']), ('\u1fc1', &['\xa8', '\u0342']), ('\u1fc2', &['\u1f74', '\u0345']), - ('\u1fc3', &['\u03b7', '\u0345']), ('\u1fc4', &['\u03ae', '\u0345']), ('\u1fc6', &['\u03b7', - '\u0342']), ('\u1fc7', &['\u1fc6', '\u0345']), ('\u1fc8', &['\u0395', '\u0300']), ('\u1fc9', - &['\u0388']), ('\u1fca', &['\u0397', '\u0300']), ('\u1fcb', &['\u0389']), ('\u1fcc', - &['\u0397', '\u0345']), ('\u1fcd', &['\u1fbf', '\u0300']), ('\u1fce', &['\u1fbf', - '\u0301']), ('\u1fcf', &['\u1fbf', '\u0342']), ('\u1fd0', &['\u03b9', '\u0306']), ('\u1fd1', - &['\u03b9', '\u0304']), ('\u1fd2', &['\u03ca', '\u0300']), ('\u1fd3', &['\u0390']), - ('\u1fd6', &['\u03b9', '\u0342']), ('\u1fd7', &['\u03ca', '\u0342']), ('\u1fd8', &['\u0399', - '\u0306']), ('\u1fd9', &['\u0399', '\u0304']), ('\u1fda', &['\u0399', '\u0300']), ('\u1fdb', - &['\u038a']), ('\u1fdd', &['\u1ffe', '\u0300']), ('\u1fde', &['\u1ffe', '\u0301']), - ('\u1fdf', &['\u1ffe', '\u0342']), ('\u1fe0', &['\u03c5', '\u0306']), ('\u1fe1', &['\u03c5', - '\u0304']), ('\u1fe2', &['\u03cb', '\u0300']), ('\u1fe3', &['\u03b0']), ('\u1fe4', - &['\u03c1', '\u0313']), ('\u1fe5', &['\u03c1', '\u0314']), ('\u1fe6', &['\u03c5', - '\u0342']), ('\u1fe7', &['\u03cb', '\u0342']), ('\u1fe8', &['\u03a5', '\u0306']), ('\u1fe9', - &['\u03a5', '\u0304']), ('\u1fea', &['\u03a5', '\u0300']), ('\u1feb', &['\u038e']), - ('\u1fec', &['\u03a1', '\u0314']), ('\u1fed', &['\xa8', '\u0300']), ('\u1fee', &['\u0385']), - ('\u1fef', &['\x60']), ('\u1ff2', &['\u1f7c', '\u0345']), ('\u1ff3', &['\u03c9', '\u0345']), - ('\u1ff4', &['\u03ce', '\u0345']), ('\u1ff6', &['\u03c9', '\u0342']), ('\u1ff7', &['\u1ff6', - '\u0345']), ('\u1ff8', &['\u039f', '\u0300']), ('\u1ff9', &['\u038c']), ('\u1ffa', - &['\u03a9', '\u0300']), ('\u1ffb', &['\u038f']), ('\u1ffc', &['\u03a9', '\u0345']), - ('\u1ffd', &['\xb4']), ('\u2000', &['\u2002']), ('\u2001', &['\u2003']), ('\u2126', - &['\u03a9']), ('\u212a', &['\x4b']), ('\u212b', &['\xc5']), ('\u219a', &['\u2190', - '\u0338']), ('\u219b', &['\u2192', '\u0338']), ('\u21ae', &['\u2194', '\u0338']), ('\u21cd', - &['\u21d0', '\u0338']), ('\u21ce', &['\u21d4', '\u0338']), ('\u21cf', &['\u21d2', - '\u0338']), ('\u2204', &['\u2203', '\u0338']), ('\u2209', &['\u2208', '\u0338']), ('\u220c', - &['\u220b', '\u0338']), ('\u2224', &['\u2223', '\u0338']), ('\u2226', &['\u2225', - '\u0338']), ('\u2241', &['\u223c', '\u0338']), ('\u2244', &['\u2243', '\u0338']), ('\u2247', - &['\u2245', '\u0338']), ('\u2249', &['\u2248', '\u0338']), ('\u2260', &['\x3d', '\u0338']), - ('\u2262', &['\u2261', '\u0338']), ('\u226d', &['\u224d', '\u0338']), ('\u226e', &['\x3c', - '\u0338']), ('\u226f', &['\x3e', '\u0338']), ('\u2270', &['\u2264', '\u0338']), ('\u2271', - &['\u2265', '\u0338']), ('\u2274', &['\u2272', '\u0338']), ('\u2275', &['\u2273', - '\u0338']), ('\u2278', &['\u2276', '\u0338']), ('\u2279', &['\u2277', '\u0338']), ('\u2280', - &['\u227a', '\u0338']), ('\u2281', &['\u227b', '\u0338']), ('\u2284', &['\u2282', - '\u0338']), ('\u2285', &['\u2283', '\u0338']), ('\u2288', &['\u2286', '\u0338']), ('\u2289', - &['\u2287', '\u0338']), ('\u22ac', &['\u22a2', '\u0338']), ('\u22ad', &['\u22a8', - '\u0338']), ('\u22ae', &['\u22a9', '\u0338']), ('\u22af', &['\u22ab', '\u0338']), ('\u22e0', - &['\u227c', '\u0338']), ('\u22e1', &['\u227d', '\u0338']), ('\u22e2', &['\u2291', - '\u0338']), ('\u22e3', &['\u2292', '\u0338']), ('\u22ea', &['\u22b2', '\u0338']), ('\u22eb', - &['\u22b3', '\u0338']), ('\u22ec', &['\u22b4', '\u0338']), ('\u22ed', &['\u22b5', - '\u0338']), ('\u2329', &['\u3008']), ('\u232a', &['\u3009']), ('\u2adc', &['\u2add', - '\u0338']), ('\u304c', &['\u304b', '\u3099']), ('\u304e', &['\u304d', '\u3099']), ('\u3050', - &['\u304f', '\u3099']), ('\u3052', &['\u3051', '\u3099']), ('\u3054', &['\u3053', - '\u3099']), ('\u3056', &['\u3055', '\u3099']), ('\u3058', &['\u3057', '\u3099']), ('\u305a', - &['\u3059', '\u3099']), ('\u305c', &['\u305b', '\u3099']), ('\u305e', &['\u305d', - '\u3099']), ('\u3060', &['\u305f', '\u3099']), ('\u3062', &['\u3061', '\u3099']), ('\u3065', - &['\u3064', '\u3099']), ('\u3067', &['\u3066', '\u3099']), ('\u3069', &['\u3068', - '\u3099']), ('\u3070', &['\u306f', '\u3099']), ('\u3071', &['\u306f', '\u309a']), ('\u3073', - &['\u3072', '\u3099']), ('\u3074', &['\u3072', '\u309a']), ('\u3076', &['\u3075', - '\u3099']), ('\u3077', &['\u3075', '\u309a']), ('\u3079', &['\u3078', '\u3099']), ('\u307a', - &['\u3078', '\u309a']), ('\u307c', &['\u307b', '\u3099']), ('\u307d', &['\u307b', - '\u309a']), ('\u3094', &['\u3046', '\u3099']), ('\u309e', &['\u309d', '\u3099']), ('\u30ac', - &['\u30ab', '\u3099']), ('\u30ae', &['\u30ad', '\u3099']), ('\u30b0', &['\u30af', - '\u3099']), ('\u30b2', &['\u30b1', '\u3099']), ('\u30b4', &['\u30b3', '\u3099']), ('\u30b6', - &['\u30b5', '\u3099']), ('\u30b8', &['\u30b7', '\u3099']), ('\u30ba', &['\u30b9', - '\u3099']), ('\u30bc', &['\u30bb', '\u3099']), ('\u30be', &['\u30bd', '\u3099']), ('\u30c0', - &['\u30bf', '\u3099']), ('\u30c2', &['\u30c1', '\u3099']), ('\u30c5', &['\u30c4', - '\u3099']), ('\u30c7', &['\u30c6', '\u3099']), ('\u30c9', &['\u30c8', '\u3099']), ('\u30d0', - &['\u30cf', '\u3099']), ('\u30d1', &['\u30cf', '\u309a']), ('\u30d3', &['\u30d2', - '\u3099']), ('\u30d4', &['\u30d2', '\u309a']), ('\u30d6', &['\u30d5', '\u3099']), ('\u30d7', - &['\u30d5', '\u309a']), ('\u30d9', &['\u30d8', '\u3099']), ('\u30da', &['\u30d8', - '\u309a']), ('\u30dc', &['\u30db', '\u3099']), ('\u30dd', &['\u30db', '\u309a']), ('\u30f4', - &['\u30a6', '\u3099']), ('\u30f7', &['\u30ef', '\u3099']), ('\u30f8', &['\u30f0', - '\u3099']), ('\u30f9', &['\u30f1', '\u3099']), ('\u30fa', &['\u30f2', '\u3099']), ('\u30fe', - &['\u30fd', '\u3099']), ('\uf900', &['\u8c48']), ('\uf901', &['\u66f4']), ('\uf902', - &['\u8eca']), ('\uf903', &['\u8cc8']), ('\uf904', &['\u6ed1']), ('\uf905', &['\u4e32']), - ('\uf906', &['\u53e5']), ('\uf907', &['\u9f9c']), ('\uf908', &['\u9f9c']), ('\uf909', - &['\u5951']), ('\uf90a', &['\u91d1']), ('\uf90b', &['\u5587']), ('\uf90c', &['\u5948']), - ('\uf90d', &['\u61f6']), ('\uf90e', &['\u7669']), ('\uf90f', &['\u7f85']), ('\uf910', - &['\u863f']), ('\uf911', &['\u87ba']), ('\uf912', &['\u88f8']), ('\uf913', &['\u908f']), - ('\uf914', &['\u6a02']), ('\uf915', &['\u6d1b']), ('\uf916', &['\u70d9']), ('\uf917', - &['\u73de']), ('\uf918', &['\u843d']), ('\uf919', &['\u916a']), ('\uf91a', &['\u99f1']), - ('\uf91b', &['\u4e82']), ('\uf91c', &['\u5375']), ('\uf91d', &['\u6b04']), ('\uf91e', - &['\u721b']), ('\uf91f', &['\u862d']), ('\uf920', &['\u9e1e']), ('\uf921', &['\u5d50']), - ('\uf922', &['\u6feb']), ('\uf923', &['\u85cd']), ('\uf924', &['\u8964']), ('\uf925', - &['\u62c9']), ('\uf926', &['\u81d8']), ('\uf927', &['\u881f']), ('\uf928', &['\u5eca']), - ('\uf929', &['\u6717']), ('\uf92a', &['\u6d6a']), ('\uf92b', &['\u72fc']), ('\uf92c', - &['\u90ce']), ('\uf92d', &['\u4f86']), ('\uf92e', &['\u51b7']), ('\uf92f', &['\u52de']), - ('\uf930', &['\u64c4']), ('\uf931', &['\u6ad3']), ('\uf932', &['\u7210']), ('\uf933', - &['\u76e7']), ('\uf934', &['\u8001']), ('\uf935', &['\u8606']), ('\uf936', &['\u865c']), - ('\uf937', &['\u8def']), ('\uf938', &['\u9732']), ('\uf939', &['\u9b6f']), ('\uf93a', - &['\u9dfa']), ('\uf93b', &['\u788c']), ('\uf93c', &['\u797f']), ('\uf93d', &['\u7da0']), - ('\uf93e', &['\u83c9']), ('\uf93f', &['\u9304']), ('\uf940', &['\u9e7f']), ('\uf941', - &['\u8ad6']), ('\uf942', &['\u58df']), ('\uf943', &['\u5f04']), ('\uf944', &['\u7c60']), - ('\uf945', &['\u807e']), ('\uf946', &['\u7262']), ('\uf947', &['\u78ca']), ('\uf948', - &['\u8cc2']), ('\uf949', &['\u96f7']), ('\uf94a', &['\u58d8']), ('\uf94b', &['\u5c62']), - ('\uf94c', &['\u6a13']), ('\uf94d', &['\u6dda']), ('\uf94e', &['\u6f0f']), ('\uf94f', - &['\u7d2f']), ('\uf950', &['\u7e37']), ('\uf951', &['\u964b']), ('\uf952', &['\u52d2']), - ('\uf953', &['\u808b']), ('\uf954', &['\u51dc']), ('\uf955', &['\u51cc']), ('\uf956', - &['\u7a1c']), ('\uf957', &['\u7dbe']), ('\uf958', &['\u83f1']), ('\uf959', &['\u9675']), - ('\uf95a', &['\u8b80']), ('\uf95b', &['\u62cf']), ('\uf95c', &['\u6a02']), ('\uf95d', - &['\u8afe']), ('\uf95e', &['\u4e39']), ('\uf95f', &['\u5be7']), ('\uf960', &['\u6012']), - ('\uf961', &['\u7387']), ('\uf962', &['\u7570']), ('\uf963', &['\u5317']), ('\uf964', - &['\u78fb']), ('\uf965', &['\u4fbf']), ('\uf966', &['\u5fa9']), ('\uf967', &['\u4e0d']), - ('\uf968', &['\u6ccc']), ('\uf969', &['\u6578']), ('\uf96a', &['\u7d22']), ('\uf96b', - &['\u53c3']), ('\uf96c', &['\u585e']), ('\uf96d', &['\u7701']), ('\uf96e', &['\u8449']), - ('\uf96f', &['\u8aaa']), ('\uf970', &['\u6bba']), ('\uf971', &['\u8fb0']), ('\uf972', - &['\u6c88']), ('\uf973', &['\u62fe']), ('\uf974', &['\u82e5']), ('\uf975', &['\u63a0']), - ('\uf976', &['\u7565']), ('\uf977', &['\u4eae']), ('\uf978', &['\u5169']), ('\uf979', - &['\u51c9']), ('\uf97a', &['\u6881']), ('\uf97b', &['\u7ce7']), ('\uf97c', &['\u826f']), - ('\uf97d', &['\u8ad2']), ('\uf97e', &['\u91cf']), ('\uf97f', &['\u52f5']), ('\uf980', - &['\u5442']), ('\uf981', &['\u5973']), ('\uf982', &['\u5eec']), ('\uf983', &['\u65c5']), - ('\uf984', &['\u6ffe']), ('\uf985', &['\u792a']), ('\uf986', &['\u95ad']), ('\uf987', - &['\u9a6a']), ('\uf988', &['\u9e97']), ('\uf989', &['\u9ece']), ('\uf98a', &['\u529b']), - ('\uf98b', &['\u66c6']), ('\uf98c', &['\u6b77']), ('\uf98d', &['\u8f62']), ('\uf98e', - &['\u5e74']), ('\uf98f', &['\u6190']), ('\uf990', &['\u6200']), ('\uf991', &['\u649a']), - ('\uf992', &['\u6f23']), ('\uf993', &['\u7149']), ('\uf994', &['\u7489']), ('\uf995', - &['\u79ca']), ('\uf996', &['\u7df4']), ('\uf997', &['\u806f']), ('\uf998', &['\u8f26']), - ('\uf999', &['\u84ee']), ('\uf99a', &['\u9023']), ('\uf99b', &['\u934a']), ('\uf99c', - &['\u5217']), ('\uf99d', &['\u52a3']), ('\uf99e', &['\u54bd']), ('\uf99f', &['\u70c8']), - ('\uf9a0', &['\u88c2']), ('\uf9a1', &['\u8aaa']), ('\uf9a2', &['\u5ec9']), ('\uf9a3', - &['\u5ff5']), ('\uf9a4', &['\u637b']), ('\uf9a5', &['\u6bae']), ('\uf9a6', &['\u7c3e']), - ('\uf9a7', &['\u7375']), ('\uf9a8', &['\u4ee4']), ('\uf9a9', &['\u56f9']), ('\uf9aa', - &['\u5be7']), ('\uf9ab', &['\u5dba']), ('\uf9ac', &['\u601c']), ('\uf9ad', &['\u73b2']), - ('\uf9ae', &['\u7469']), ('\uf9af', &['\u7f9a']), ('\uf9b0', &['\u8046']), ('\uf9b1', - &['\u9234']), ('\uf9b2', &['\u96f6']), ('\uf9b3', &['\u9748']), ('\uf9b4', &['\u9818']), - ('\uf9b5', &['\u4f8b']), ('\uf9b6', &['\u79ae']), ('\uf9b7', &['\u91b4']), ('\uf9b8', - &['\u96b8']), ('\uf9b9', &['\u60e1']), ('\uf9ba', &['\u4e86']), ('\uf9bb', &['\u50da']), - ('\uf9bc', &['\u5bee']), ('\uf9bd', &['\u5c3f']), ('\uf9be', &['\u6599']), ('\uf9bf', - &['\u6a02']), ('\uf9c0', &['\u71ce']), ('\uf9c1', &['\u7642']), ('\uf9c2', &['\u84fc']), - ('\uf9c3', &['\u907c']), ('\uf9c4', &['\u9f8d']), ('\uf9c5', &['\u6688']), ('\uf9c6', - &['\u962e']), ('\uf9c7', &['\u5289']), ('\uf9c8', &['\u677b']), ('\uf9c9', &['\u67f3']), - ('\uf9ca', &['\u6d41']), ('\uf9cb', &['\u6e9c']), ('\uf9cc', &['\u7409']), ('\uf9cd', - &['\u7559']), ('\uf9ce', &['\u786b']), ('\uf9cf', &['\u7d10']), ('\uf9d0', &['\u985e']), - ('\uf9d1', &['\u516d']), ('\uf9d2', &['\u622e']), ('\uf9d3', &['\u9678']), ('\uf9d4', - &['\u502b']), ('\uf9d5', &['\u5d19']), ('\uf9d6', &['\u6dea']), ('\uf9d7', &['\u8f2a']), - ('\uf9d8', &['\u5f8b']), ('\uf9d9', &['\u6144']), ('\uf9da', &['\u6817']), ('\uf9db', - &['\u7387']), ('\uf9dc', &['\u9686']), ('\uf9dd', &['\u5229']), ('\uf9de', &['\u540f']), - ('\uf9df', &['\u5c65']), ('\uf9e0', &['\u6613']), ('\uf9e1', &['\u674e']), ('\uf9e2', - &['\u68a8']), ('\uf9e3', &['\u6ce5']), ('\uf9e4', &['\u7406']), ('\uf9e5', &['\u75e2']), - ('\uf9e6', &['\u7f79']), ('\uf9e7', &['\u88cf']), ('\uf9e8', &['\u88e1']), ('\uf9e9', - &['\u91cc']), ('\uf9ea', &['\u96e2']), ('\uf9eb', &['\u533f']), ('\uf9ec', &['\u6eba']), - ('\uf9ed', &['\u541d']), ('\uf9ee', &['\u71d0']), ('\uf9ef', &['\u7498']), ('\uf9f0', - &['\u85fa']), ('\uf9f1', &['\u96a3']), ('\uf9f2', &['\u9c57']), ('\uf9f3', &['\u9e9f']), - ('\uf9f4', &['\u6797']), ('\uf9f5', &['\u6dcb']), ('\uf9f6', &['\u81e8']), ('\uf9f7', - &['\u7acb']), ('\uf9f8', &['\u7b20']), ('\uf9f9', &['\u7c92']), ('\uf9fa', &['\u72c0']), - ('\uf9fb', &['\u7099']), ('\uf9fc', &['\u8b58']), ('\uf9fd', &['\u4ec0']), ('\uf9fe', - &['\u8336']), ('\uf9ff', &['\u523a']), ('\ufa00', &['\u5207']), ('\ufa01', &['\u5ea6']), - ('\ufa02', &['\u62d3']), ('\ufa03', &['\u7cd6']), ('\ufa04', &['\u5b85']), ('\ufa05', - &['\u6d1e']), ('\ufa06', &['\u66b4']), ('\ufa07', &['\u8f3b']), ('\ufa08', &['\u884c']), - ('\ufa09', &['\u964d']), ('\ufa0a', &['\u898b']), ('\ufa0b', &['\u5ed3']), ('\ufa0c', - &['\u5140']), ('\ufa0d', &['\u55c0']), ('\ufa10', &['\u585a']), ('\ufa12', &['\u6674']), - ('\ufa15', &['\u51de']), ('\ufa16', &['\u732a']), ('\ufa17', &['\u76ca']), ('\ufa18', - &['\u793c']), ('\ufa19', &['\u795e']), ('\ufa1a', &['\u7965']), ('\ufa1b', &['\u798f']), - ('\ufa1c', &['\u9756']), ('\ufa1d', &['\u7cbe']), ('\ufa1e', &['\u7fbd']), ('\ufa20', - &['\u8612']), ('\ufa22', &['\u8af8']), ('\ufa25', &['\u9038']), ('\ufa26', &['\u90fd']), - ('\ufa2a', &['\u98ef']), ('\ufa2b', &['\u98fc']), ('\ufa2c', &['\u9928']), ('\ufa2d', - &['\u9db4']), ('\ufa2e', &['\u90de']), ('\ufa2f', &['\u96b7']), ('\ufa30', &['\u4fae']), - ('\ufa31', &['\u50e7']), ('\ufa32', &['\u514d']), ('\ufa33', &['\u52c9']), ('\ufa34', - &['\u52e4']), ('\ufa35', &['\u5351']), ('\ufa36', &['\u559d']), ('\ufa37', &['\u5606']), - ('\ufa38', &['\u5668']), ('\ufa39', &['\u5840']), ('\ufa3a', &['\u58a8']), ('\ufa3b', - &['\u5c64']), ('\ufa3c', &['\u5c6e']), ('\ufa3d', &['\u6094']), ('\ufa3e', &['\u6168']), - ('\ufa3f', &['\u618e']), ('\ufa40', &['\u61f2']), ('\ufa41', &['\u654f']), ('\ufa42', - &['\u65e2']), ('\ufa43', &['\u6691']), ('\ufa44', &['\u6885']), ('\ufa45', &['\u6d77']), - ('\ufa46', &['\u6e1a']), ('\ufa47', &['\u6f22']), ('\ufa48', &['\u716e']), ('\ufa49', - &['\u722b']), ('\ufa4a', &['\u7422']), ('\ufa4b', &['\u7891']), ('\ufa4c', &['\u793e']), - ('\ufa4d', &['\u7949']), ('\ufa4e', &['\u7948']), ('\ufa4f', &['\u7950']), ('\ufa50', - &['\u7956']), ('\ufa51', &['\u795d']), ('\ufa52', &['\u798d']), ('\ufa53', &['\u798e']), - ('\ufa54', &['\u7a40']), ('\ufa55', &['\u7a81']), ('\ufa56', &['\u7bc0']), ('\ufa57', - &['\u7df4']), ('\ufa58', &['\u7e09']), ('\ufa59', &['\u7e41']), ('\ufa5a', &['\u7f72']), - ('\ufa5b', &['\u8005']), ('\ufa5c', &['\u81ed']), ('\ufa5d', &['\u8279']), ('\ufa5e', - &['\u8279']), ('\ufa5f', &['\u8457']), ('\ufa60', &['\u8910']), ('\ufa61', &['\u8996']), - ('\ufa62', &['\u8b01']), ('\ufa63', &['\u8b39']), ('\ufa64', &['\u8cd3']), ('\ufa65', - &['\u8d08']), ('\ufa66', &['\u8fb6']), ('\ufa67', &['\u9038']), ('\ufa68', &['\u96e3']), - ('\ufa69', &['\u97ff']), ('\ufa6a', &['\u983b']), ('\ufa6b', &['\u6075']), ('\ufa6c', - &['\U000242ee']), ('\ufa6d', &['\u8218']), ('\ufa70', &['\u4e26']), ('\ufa71', &['\u51b5']), - ('\ufa72', &['\u5168']), ('\ufa73', &['\u4f80']), ('\ufa74', &['\u5145']), ('\ufa75', - &['\u5180']), ('\ufa76', &['\u52c7']), ('\ufa77', &['\u52fa']), ('\ufa78', &['\u559d']), - ('\ufa79', &['\u5555']), ('\ufa7a', &['\u5599']), ('\ufa7b', &['\u55e2']), ('\ufa7c', - &['\u585a']), ('\ufa7d', &['\u58b3']), ('\ufa7e', &['\u5944']), ('\ufa7f', &['\u5954']), - ('\ufa80', &['\u5a62']), ('\ufa81', &['\u5b28']), ('\ufa82', &['\u5ed2']), ('\ufa83', - &['\u5ed9']), ('\ufa84', &['\u5f69']), ('\ufa85', &['\u5fad']), ('\ufa86', &['\u60d8']), - ('\ufa87', &['\u614e']), ('\ufa88', &['\u6108']), ('\ufa89', &['\u618e']), ('\ufa8a', - &['\u6160']), ('\ufa8b', &['\u61f2']), ('\ufa8c', &['\u6234']), ('\ufa8d', &['\u63c4']), - ('\ufa8e', &['\u641c']), ('\ufa8f', &['\u6452']), ('\ufa90', &['\u6556']), ('\ufa91', - &['\u6674']), ('\ufa92', &['\u6717']), ('\ufa93', &['\u671b']), ('\ufa94', &['\u6756']), - ('\ufa95', &['\u6b79']), ('\ufa96', &['\u6bba']), ('\ufa97', &['\u6d41']), ('\ufa98', - &['\u6edb']), ('\ufa99', &['\u6ecb']), ('\ufa9a', &['\u6f22']), ('\ufa9b', &['\u701e']), - ('\ufa9c', &['\u716e']), ('\ufa9d', &['\u77a7']), ('\ufa9e', &['\u7235']), ('\ufa9f', - &['\u72af']), ('\ufaa0', &['\u732a']), ('\ufaa1', &['\u7471']), ('\ufaa2', &['\u7506']), - ('\ufaa3', &['\u753b']), ('\ufaa4', &['\u761d']), ('\ufaa5', &['\u761f']), ('\ufaa6', - &['\u76ca']), ('\ufaa7', &['\u76db']), ('\ufaa8', &['\u76f4']), ('\ufaa9', &['\u774a']), - ('\ufaaa', &['\u7740']), ('\ufaab', &['\u78cc']), ('\ufaac', &['\u7ab1']), ('\ufaad', - &['\u7bc0']), ('\ufaae', &['\u7c7b']), ('\ufaaf', &['\u7d5b']), ('\ufab0', &['\u7df4']), - ('\ufab1', &['\u7f3e']), ('\ufab2', &['\u8005']), ('\ufab3', &['\u8352']), ('\ufab4', - &['\u83ef']), ('\ufab5', &['\u8779']), ('\ufab6', &['\u8941']), ('\ufab7', &['\u8986']), - ('\ufab8', &['\u8996']), ('\ufab9', &['\u8abf']), ('\ufaba', &['\u8af8']), ('\ufabb', - &['\u8acb']), ('\ufabc', &['\u8b01']), ('\ufabd', &['\u8afe']), ('\ufabe', &['\u8aed']), - ('\ufabf', &['\u8b39']), ('\ufac0', &['\u8b8a']), ('\ufac1', &['\u8d08']), ('\ufac2', - &['\u8f38']), ('\ufac3', &['\u9072']), ('\ufac4', &['\u9199']), ('\ufac5', &['\u9276']), - ('\ufac6', &['\u967c']), ('\ufac7', &['\u96e3']), ('\ufac8', &['\u9756']), ('\ufac9', - &['\u97db']), ('\ufaca', &['\u97ff']), ('\ufacb', &['\u980b']), ('\ufacc', &['\u983b']), - ('\ufacd', &['\u9b12']), ('\uface', &['\u9f9c']), ('\ufacf', &['\U0002284a']), ('\ufad0', - &['\U00022844']), ('\ufad1', &['\U000233d5']), ('\ufad2', &['\u3b9d']), ('\ufad3', - &['\u4018']), ('\ufad4', &['\u4039']), ('\ufad5', &['\U00025249']), ('\ufad6', - &['\U00025cd0']), ('\ufad7', &['\U00027ed3']), ('\ufad8', &['\u9f43']), ('\ufad9', - &['\u9f8e']), ('\ufb1d', &['\u05d9', '\u05b4']), ('\ufb1f', &['\u05f2', '\u05b7']), - ('\ufb2a', &['\u05e9', '\u05c1']), ('\ufb2b', &['\u05e9', '\u05c2']), ('\ufb2c', &['\ufb49', - '\u05c1']), ('\ufb2d', &['\ufb49', '\u05c2']), ('\ufb2e', &['\u05d0', '\u05b7']), ('\ufb2f', - &['\u05d0', '\u05b8']), ('\ufb30', &['\u05d0', '\u05bc']), ('\ufb31', &['\u05d1', - '\u05bc']), ('\ufb32', &['\u05d2', '\u05bc']), ('\ufb33', &['\u05d3', '\u05bc']), ('\ufb34', - &['\u05d4', '\u05bc']), ('\ufb35', &['\u05d5', '\u05bc']), ('\ufb36', &['\u05d6', - '\u05bc']), ('\ufb38', &['\u05d8', '\u05bc']), ('\ufb39', &['\u05d9', '\u05bc']), ('\ufb3a', - &['\u05da', '\u05bc']), ('\ufb3b', &['\u05db', '\u05bc']), ('\ufb3c', &['\u05dc', - '\u05bc']), ('\ufb3e', &['\u05de', '\u05bc']), ('\ufb40', &['\u05e0', '\u05bc']), ('\ufb41', - &['\u05e1', '\u05bc']), ('\ufb43', &['\u05e3', '\u05bc']), ('\ufb44', &['\u05e4', - '\u05bc']), ('\ufb46', &['\u05e6', '\u05bc']), ('\ufb47', &['\u05e7', '\u05bc']), ('\ufb48', - &['\u05e8', '\u05bc']), ('\ufb49', &['\u05e9', '\u05bc']), ('\ufb4a', &['\u05ea', - '\u05bc']), ('\ufb4b', &['\u05d5', '\u05b9']), ('\ufb4c', &['\u05d1', '\u05bf']), ('\ufb4d', - &['\u05db', '\u05bf']), ('\ufb4e', &['\u05e4', '\u05bf']), ('\U0001109a', &['\U00011099', - '\U000110ba']), ('\U0001109c', &['\U0001109b', '\U000110ba']), ('\U000110ab', - &['\U000110a5', '\U000110ba']), ('\U0001112e', &['\U00011131', '\U00011127']), - ('\U0001112f', &['\U00011132', '\U00011127']), ('\U0001d15e', &['\U0001d157', - '\U0001d165']), ('\U0001d15f', &['\U0001d158', '\U0001d165']), ('\U0001d160', - &['\U0001d15f', '\U0001d16e']), ('\U0001d161', &['\U0001d15f', '\U0001d16f']), - ('\U0001d162', &['\U0001d15f', '\U0001d170']), ('\U0001d163', &['\U0001d15f', - '\U0001d171']), ('\U0001d164', &['\U0001d15f', '\U0001d172']), ('\U0001d1bb', - &['\U0001d1b9', '\U0001d165']), ('\U0001d1bc', &['\U0001d1ba', '\U0001d165']), - ('\U0001d1bd', &['\U0001d1bb', '\U0001d16e']), ('\U0001d1be', &['\U0001d1bc', - '\U0001d16e']), ('\U0001d1bf', &['\U0001d1bb', '\U0001d16f']), ('\U0001d1c0', - &['\U0001d1bc', '\U0001d16f']), ('\U0002f800', &['\u4e3d']), ('\U0002f801', &['\u4e38']), - ('\U0002f802', &['\u4e41']), ('\U0002f803', &['\U00020122']), ('\U0002f804', &['\u4f60']), - ('\U0002f805', &['\u4fae']), ('\U0002f806', &['\u4fbb']), ('\U0002f807', &['\u5002']), - ('\U0002f808', &['\u507a']), ('\U0002f809', &['\u5099']), ('\U0002f80a', &['\u50e7']), - ('\U0002f80b', &['\u50cf']), ('\U0002f80c', &['\u349e']), ('\U0002f80d', &['\U0002063a']), - ('\U0002f80e', &['\u514d']), ('\U0002f80f', &['\u5154']), ('\U0002f810', &['\u5164']), - ('\U0002f811', &['\u5177']), ('\U0002f812', &['\U0002051c']), ('\U0002f813', &['\u34b9']), - ('\U0002f814', &['\u5167']), ('\U0002f815', &['\u518d']), ('\U0002f816', &['\U0002054b']), - ('\U0002f817', &['\u5197']), ('\U0002f818', &['\u51a4']), ('\U0002f819', &['\u4ecc']), - ('\U0002f81a', &['\u51ac']), ('\U0002f81b', &['\u51b5']), ('\U0002f81c', &['\U000291df']), - ('\U0002f81d', &['\u51f5']), ('\U0002f81e', &['\u5203']), ('\U0002f81f', &['\u34df']), - ('\U0002f820', &['\u523b']), ('\U0002f821', &['\u5246']), ('\U0002f822', &['\u5272']), - ('\U0002f823', &['\u5277']), ('\U0002f824', &['\u3515']), ('\U0002f825', &['\u52c7']), - ('\U0002f826', &['\u52c9']), ('\U0002f827', &['\u52e4']), ('\U0002f828', &['\u52fa']), - ('\U0002f829', &['\u5305']), ('\U0002f82a', &['\u5306']), ('\U0002f82b', &['\u5317']), - ('\U0002f82c', &['\u5349']), ('\U0002f82d', &['\u5351']), ('\U0002f82e', &['\u535a']), - ('\U0002f82f', &['\u5373']), ('\U0002f830', &['\u537d']), ('\U0002f831', &['\u537f']), - ('\U0002f832', &['\u537f']), ('\U0002f833', &['\u537f']), ('\U0002f834', &['\U00020a2c']), - ('\U0002f835', &['\u7070']), ('\U0002f836', &['\u53ca']), ('\U0002f837', &['\u53df']), - ('\U0002f838', &['\U00020b63']), ('\U0002f839', &['\u53eb']), ('\U0002f83a', &['\u53f1']), - ('\U0002f83b', &['\u5406']), ('\U0002f83c', &['\u549e']), ('\U0002f83d', &['\u5438']), - ('\U0002f83e', &['\u5448']), ('\U0002f83f', &['\u5468']), ('\U0002f840', &['\u54a2']), - ('\U0002f841', &['\u54f6']), ('\U0002f842', &['\u5510']), ('\U0002f843', &['\u5553']), - ('\U0002f844', &['\u5563']), ('\U0002f845', &['\u5584']), ('\U0002f846', &['\u5584']), - ('\U0002f847', &['\u5599']), ('\U0002f848', &['\u55ab']), ('\U0002f849', &['\u55b3']), - ('\U0002f84a', &['\u55c2']), ('\U0002f84b', &['\u5716']), ('\U0002f84c', &['\u5606']), - ('\U0002f84d', &['\u5717']), ('\U0002f84e', &['\u5651']), ('\U0002f84f', &['\u5674']), - ('\U0002f850', &['\u5207']), ('\U0002f851', &['\u58ee']), ('\U0002f852', &['\u57ce']), - ('\U0002f853', &['\u57f4']), ('\U0002f854', &['\u580d']), ('\U0002f855', &['\u578b']), - ('\U0002f856', &['\u5832']), ('\U0002f857', &['\u5831']), ('\U0002f858', &['\u58ac']), - ('\U0002f859', &['\U000214e4']), ('\U0002f85a', &['\u58f2']), ('\U0002f85b', &['\u58f7']), - ('\U0002f85c', &['\u5906']), ('\U0002f85d', &['\u591a']), ('\U0002f85e', &['\u5922']), - ('\U0002f85f', &['\u5962']), ('\U0002f860', &['\U000216a8']), ('\U0002f861', - &['\U000216ea']), ('\U0002f862', &['\u59ec']), ('\U0002f863', &['\u5a1b']), ('\U0002f864', - &['\u5a27']), ('\U0002f865', &['\u59d8']), ('\U0002f866', &['\u5a66']), ('\U0002f867', - &['\u36ee']), ('\U0002f868', &['\u36fc']), ('\U0002f869', &['\u5b08']), ('\U0002f86a', - &['\u5b3e']), ('\U0002f86b', &['\u5b3e']), ('\U0002f86c', &['\U000219c8']), ('\U0002f86d', - &['\u5bc3']), ('\U0002f86e', &['\u5bd8']), ('\U0002f86f', &['\u5be7']), ('\U0002f870', - &['\u5bf3']), ('\U0002f871', &['\U00021b18']), ('\U0002f872', &['\u5bff']), ('\U0002f873', - &['\u5c06']), ('\U0002f874', &['\u5f53']), ('\U0002f875', &['\u5c22']), ('\U0002f876', - &['\u3781']), ('\U0002f877', &['\u5c60']), ('\U0002f878', &['\u5c6e']), ('\U0002f879', - &['\u5cc0']), ('\U0002f87a', &['\u5c8d']), ('\U0002f87b', &['\U00021de4']), ('\U0002f87c', - &['\u5d43']), ('\U0002f87d', &['\U00021de6']), ('\U0002f87e', &['\u5d6e']), ('\U0002f87f', - &['\u5d6b']), ('\U0002f880', &['\u5d7c']), ('\U0002f881', &['\u5de1']), ('\U0002f882', - &['\u5de2']), ('\U0002f883', &['\u382f']), ('\U0002f884', &['\u5dfd']), ('\U0002f885', - &['\u5e28']), ('\U0002f886', &['\u5e3d']), ('\U0002f887', &['\u5e69']), ('\U0002f888', - &['\u3862']), ('\U0002f889', &['\U00022183']), ('\U0002f88a', &['\u387c']), ('\U0002f88b', - &['\u5eb0']), ('\U0002f88c', &['\u5eb3']), ('\U0002f88d', &['\u5eb6']), ('\U0002f88e', - &['\u5eca']), ('\U0002f88f', &['\U0002a392']), ('\U0002f890', &['\u5efe']), ('\U0002f891', - &['\U00022331']), ('\U0002f892', &['\U00022331']), ('\U0002f893', &['\u8201']), - ('\U0002f894', &['\u5f22']), ('\U0002f895', &['\u5f22']), ('\U0002f896', &['\u38c7']), - ('\U0002f897', &['\U000232b8']), ('\U0002f898', &['\U000261da']), ('\U0002f899', - &['\u5f62']), ('\U0002f89a', &['\u5f6b']), ('\U0002f89b', &['\u38e3']), ('\U0002f89c', - &['\u5f9a']), ('\U0002f89d', &['\u5fcd']), ('\U0002f89e', &['\u5fd7']), ('\U0002f89f', - &['\u5ff9']), ('\U0002f8a0', &['\u6081']), ('\U0002f8a1', &['\u393a']), ('\U0002f8a2', - &['\u391c']), ('\U0002f8a3', &['\u6094']), ('\U0002f8a4', &['\U000226d4']), ('\U0002f8a5', - &['\u60c7']), ('\U0002f8a6', &['\u6148']), ('\U0002f8a7', &['\u614c']), ('\U0002f8a8', - &['\u614e']), ('\U0002f8a9', &['\u614c']), ('\U0002f8aa', &['\u617a']), ('\U0002f8ab', - &['\u618e']), ('\U0002f8ac', &['\u61b2']), ('\U0002f8ad', &['\u61a4']), ('\U0002f8ae', - &['\u61af']), ('\U0002f8af', &['\u61de']), ('\U0002f8b0', &['\u61f2']), ('\U0002f8b1', - &['\u61f6']), ('\U0002f8b2', &['\u6210']), ('\U0002f8b3', &['\u621b']), ('\U0002f8b4', - &['\u625d']), ('\U0002f8b5', &['\u62b1']), ('\U0002f8b6', &['\u62d4']), ('\U0002f8b7', - &['\u6350']), ('\U0002f8b8', &['\U00022b0c']), ('\U0002f8b9', &['\u633d']), ('\U0002f8ba', - &['\u62fc']), ('\U0002f8bb', &['\u6368']), ('\U0002f8bc', &['\u6383']), ('\U0002f8bd', - &['\u63e4']), ('\U0002f8be', &['\U00022bf1']), ('\U0002f8bf', &['\u6422']), ('\U0002f8c0', - &['\u63c5']), ('\U0002f8c1', &['\u63a9']), ('\U0002f8c2', &['\u3a2e']), ('\U0002f8c3', - &['\u6469']), ('\U0002f8c4', &['\u647e']), ('\U0002f8c5', &['\u649d']), ('\U0002f8c6', - &['\u6477']), ('\U0002f8c7', &['\u3a6c']), ('\U0002f8c8', &['\u654f']), ('\U0002f8c9', - &['\u656c']), ('\U0002f8ca', &['\U0002300a']), ('\U0002f8cb', &['\u65e3']), ('\U0002f8cc', - &['\u66f8']), ('\U0002f8cd', &['\u6649']), ('\U0002f8ce', &['\u3b19']), ('\U0002f8cf', - &['\u6691']), ('\U0002f8d0', &['\u3b08']), ('\U0002f8d1', &['\u3ae4']), ('\U0002f8d2', - &['\u5192']), ('\U0002f8d3', &['\u5195']), ('\U0002f8d4', &['\u6700']), ('\U0002f8d5', - &['\u669c']), ('\U0002f8d6', &['\u80ad']), ('\U0002f8d7', &['\u43d9']), ('\U0002f8d8', - &['\u6717']), ('\U0002f8d9', &['\u671b']), ('\U0002f8da', &['\u6721']), ('\U0002f8db', - &['\u675e']), ('\U0002f8dc', &['\u6753']), ('\U0002f8dd', &['\U000233c3']), ('\U0002f8de', - &['\u3b49']), ('\U0002f8df', &['\u67fa']), ('\U0002f8e0', &['\u6785']), ('\U0002f8e1', - &['\u6852']), ('\U0002f8e2', &['\u6885']), ('\U0002f8e3', &['\U0002346d']), ('\U0002f8e4', - &['\u688e']), ('\U0002f8e5', &['\u681f']), ('\U0002f8e6', &['\u6914']), ('\U0002f8e7', - &['\u3b9d']), ('\U0002f8e8', &['\u6942']), ('\U0002f8e9', &['\u69a3']), ('\U0002f8ea', - &['\u69ea']), ('\U0002f8eb', &['\u6aa8']), ('\U0002f8ec', &['\U000236a3']), ('\U0002f8ed', - &['\u6adb']), ('\U0002f8ee', &['\u3c18']), ('\U0002f8ef', &['\u6b21']), ('\U0002f8f0', - &['\U000238a7']), ('\U0002f8f1', &['\u6b54']), ('\U0002f8f2', &['\u3c4e']), ('\U0002f8f3', - &['\u6b72']), ('\U0002f8f4', &['\u6b9f']), ('\U0002f8f5', &['\u6bba']), ('\U0002f8f6', - &['\u6bbb']), ('\U0002f8f7', &['\U00023a8d']), ('\U0002f8f8', &['\U00021d0b']), - ('\U0002f8f9', &['\U00023afa']), ('\U0002f8fa', &['\u6c4e']), ('\U0002f8fb', - &['\U00023cbc']), ('\U0002f8fc', &['\u6cbf']), ('\U0002f8fd', &['\u6ccd']), ('\U0002f8fe', - &['\u6c67']), ('\U0002f8ff', &['\u6d16']), ('\U0002f900', &['\u6d3e']), ('\U0002f901', - &['\u6d77']), ('\U0002f902', &['\u6d41']), ('\U0002f903', &['\u6d69']), ('\U0002f904', - &['\u6d78']), ('\U0002f905', &['\u6d85']), ('\U0002f906', &['\U00023d1e']), ('\U0002f907', - &['\u6d34']), ('\U0002f908', &['\u6e2f']), ('\U0002f909', &['\u6e6e']), ('\U0002f90a', - &['\u3d33']), ('\U0002f90b', &['\u6ecb']), ('\U0002f90c', &['\u6ec7']), ('\U0002f90d', - &['\U00023ed1']), ('\U0002f90e', &['\u6df9']), ('\U0002f90f', &['\u6f6e']), ('\U0002f910', - &['\U00023f5e']), ('\U0002f911', &['\U00023f8e']), ('\U0002f912', &['\u6fc6']), - ('\U0002f913', &['\u7039']), ('\U0002f914', &['\u701e']), ('\U0002f915', &['\u701b']), - ('\U0002f916', &['\u3d96']), ('\U0002f917', &['\u704a']), ('\U0002f918', &['\u707d']), - ('\U0002f919', &['\u7077']), ('\U0002f91a', &['\u70ad']), ('\U0002f91b', &['\U00020525']), - ('\U0002f91c', &['\u7145']), ('\U0002f91d', &['\U00024263']), ('\U0002f91e', &['\u719c']), - ('\U0002f91f', &['\U000243ab']), ('\U0002f920', &['\u7228']), ('\U0002f921', &['\u7235']), - ('\U0002f922', &['\u7250']), ('\U0002f923', &['\U00024608']), ('\U0002f924', &['\u7280']), - ('\U0002f925', &['\u7295']), ('\U0002f926', &['\U00024735']), ('\U0002f927', - &['\U00024814']), ('\U0002f928', &['\u737a']), ('\U0002f929', &['\u738b']), ('\U0002f92a', - &['\u3eac']), ('\U0002f92b', &['\u73a5']), ('\U0002f92c', &['\u3eb8']), ('\U0002f92d', - &['\u3eb8']), ('\U0002f92e', &['\u7447']), ('\U0002f92f', &['\u745c']), ('\U0002f930', - &['\u7471']), ('\U0002f931', &['\u7485']), ('\U0002f932', &['\u74ca']), ('\U0002f933', - &['\u3f1b']), ('\U0002f934', &['\u7524']), ('\U0002f935', &['\U00024c36']), ('\U0002f936', - &['\u753e']), ('\U0002f937', &['\U00024c92']), ('\U0002f938', &['\u7570']), ('\U0002f939', - &['\U0002219f']), ('\U0002f93a', &['\u7610']), ('\U0002f93b', &['\U00024fa1']), - ('\U0002f93c', &['\U00024fb8']), ('\U0002f93d', &['\U00025044']), ('\U0002f93e', - &['\u3ffc']), ('\U0002f93f', &['\u4008']), ('\U0002f940', &['\u76f4']), ('\U0002f941', - &['\U000250f3']), ('\U0002f942', &['\U000250f2']), ('\U0002f943', &['\U00025119']), - ('\U0002f944', &['\U00025133']), ('\U0002f945', &['\u771e']), ('\U0002f946', &['\u771f']), - ('\U0002f947', &['\u771f']), ('\U0002f948', &['\u774a']), ('\U0002f949', &['\u4039']), - ('\U0002f94a', &['\u778b']), ('\U0002f94b', &['\u4046']), ('\U0002f94c', &['\u4096']), - ('\U0002f94d', &['\U0002541d']), ('\U0002f94e', &['\u784e']), ('\U0002f94f', &['\u788c']), - ('\U0002f950', &['\u78cc']), ('\U0002f951', &['\u40e3']), ('\U0002f952', &['\U00025626']), - ('\U0002f953', &['\u7956']), ('\U0002f954', &['\U0002569a']), ('\U0002f955', - &['\U000256c5']), ('\U0002f956', &['\u798f']), ('\U0002f957', &['\u79eb']), ('\U0002f958', - &['\u412f']), ('\U0002f959', &['\u7a40']), ('\U0002f95a', &['\u7a4a']), ('\U0002f95b', - &['\u7a4f']), ('\U0002f95c', &['\U0002597c']), ('\U0002f95d', &['\U00025aa7']), - ('\U0002f95e', &['\U00025aa7']), ('\U0002f95f', &['\u7aee']), ('\U0002f960', &['\u4202']), - ('\U0002f961', &['\U00025bab']), ('\U0002f962', &['\u7bc6']), ('\U0002f963', &['\u7bc9']), - ('\U0002f964', &['\u4227']), ('\U0002f965', &['\U00025c80']), ('\U0002f966', &['\u7cd2']), - ('\U0002f967', &['\u42a0']), ('\U0002f968', &['\u7ce8']), ('\U0002f969', &['\u7ce3']), - ('\U0002f96a', &['\u7d00']), ('\U0002f96b', &['\U00025f86']), ('\U0002f96c', &['\u7d63']), - ('\U0002f96d', &['\u4301']), ('\U0002f96e', &['\u7dc7']), ('\U0002f96f', &['\u7e02']), - ('\U0002f970', &['\u7e45']), ('\U0002f971', &['\u4334']), ('\U0002f972', &['\U00026228']), - ('\U0002f973', &['\U00026247']), ('\U0002f974', &['\u4359']), ('\U0002f975', - &['\U000262d9']), ('\U0002f976', &['\u7f7a']), ('\U0002f977', &['\U0002633e']), - ('\U0002f978', &['\u7f95']), ('\U0002f979', &['\u7ffa']), ('\U0002f97a', &['\u8005']), - ('\U0002f97b', &['\U000264da']), ('\U0002f97c', &['\U00026523']), ('\U0002f97d', - &['\u8060']), ('\U0002f97e', &['\U000265a8']), ('\U0002f97f', &['\u8070']), ('\U0002f980', - &['\U0002335f']), ('\U0002f981', &['\u43d5']), ('\U0002f982', &['\u80b2']), ('\U0002f983', - &['\u8103']), ('\U0002f984', &['\u440b']), ('\U0002f985', &['\u813e']), ('\U0002f986', - &['\u5ab5']), ('\U0002f987', &['\U000267a7']), ('\U0002f988', &['\U000267b5']), - ('\U0002f989', &['\U00023393']), ('\U0002f98a', &['\U0002339c']), ('\U0002f98b', - &['\u8201']), ('\U0002f98c', &['\u8204']), ('\U0002f98d', &['\u8f9e']), ('\U0002f98e', - &['\u446b']), ('\U0002f98f', &['\u8291']), ('\U0002f990', &['\u828b']), ('\U0002f991', - &['\u829d']), ('\U0002f992', &['\u52b3']), ('\U0002f993', &['\u82b1']), ('\U0002f994', - &['\u82b3']), ('\U0002f995', &['\u82bd']), ('\U0002f996', &['\u82e6']), ('\U0002f997', - &['\U00026b3c']), ('\U0002f998', &['\u82e5']), ('\U0002f999', &['\u831d']), ('\U0002f99a', - &['\u8363']), ('\U0002f99b', &['\u83ad']), ('\U0002f99c', &['\u8323']), ('\U0002f99d', - &['\u83bd']), ('\U0002f99e', &['\u83e7']), ('\U0002f99f', &['\u8457']), ('\U0002f9a0', - &['\u8353']), ('\U0002f9a1', &['\u83ca']), ('\U0002f9a2', &['\u83cc']), ('\U0002f9a3', - &['\u83dc']), ('\U0002f9a4', &['\U00026c36']), ('\U0002f9a5', &['\U00026d6b']), - ('\U0002f9a6', &['\U00026cd5']), ('\U0002f9a7', &['\u452b']), ('\U0002f9a8', &['\u84f1']), - ('\U0002f9a9', &['\u84f3']), ('\U0002f9aa', &['\u8516']), ('\U0002f9ab', &['\U000273ca']), - ('\U0002f9ac', &['\u8564']), ('\U0002f9ad', &['\U00026f2c']), ('\U0002f9ae', &['\u455d']), - ('\U0002f9af', &['\u4561']), ('\U0002f9b0', &['\U00026fb1']), ('\U0002f9b1', - &['\U000270d2']), ('\U0002f9b2', &['\u456b']), ('\U0002f9b3', &['\u8650']), ('\U0002f9b4', - &['\u865c']), ('\U0002f9b5', &['\u8667']), ('\U0002f9b6', &['\u8669']), ('\U0002f9b7', - &['\u86a9']), ('\U0002f9b8', &['\u8688']), ('\U0002f9b9', &['\u870e']), ('\U0002f9ba', - &['\u86e2']), ('\U0002f9bb', &['\u8779']), ('\U0002f9bc', &['\u8728']), ('\U0002f9bd', - &['\u876b']), ('\U0002f9be', &['\u8786']), ('\U0002f9bf', &['\u45d7']), ('\U0002f9c0', - &['\u87e1']), ('\U0002f9c1', &['\u8801']), ('\U0002f9c2', &['\u45f9']), ('\U0002f9c3', - &['\u8860']), ('\U0002f9c4', &['\u8863']), ('\U0002f9c5', &['\U00027667']), ('\U0002f9c6', - &['\u88d7']), ('\U0002f9c7', &['\u88de']), ('\U0002f9c8', &['\u4635']), ('\U0002f9c9', - &['\u88fa']), ('\U0002f9ca', &['\u34bb']), ('\U0002f9cb', &['\U000278ae']), ('\U0002f9cc', - &['\U00027966']), ('\U0002f9cd', &['\u46be']), ('\U0002f9ce', &['\u46c7']), ('\U0002f9cf', - &['\u8aa0']), ('\U0002f9d0', &['\u8aed']), ('\U0002f9d1', &['\u8b8a']), ('\U0002f9d2', - &['\u8c55']), ('\U0002f9d3', &['\U00027ca8']), ('\U0002f9d4', &['\u8cab']), ('\U0002f9d5', - &['\u8cc1']), ('\U0002f9d6', &['\u8d1b']), ('\U0002f9d7', &['\u8d77']), ('\U0002f9d8', - &['\U00027f2f']), ('\U0002f9d9', &['\U00020804']), ('\U0002f9da', &['\u8dcb']), - ('\U0002f9db', &['\u8dbc']), ('\U0002f9dc', &['\u8df0']), ('\U0002f9dd', &['\U000208de']), - ('\U0002f9de', &['\u8ed4']), ('\U0002f9df', &['\u8f38']), ('\U0002f9e0', &['\U000285d2']), - ('\U0002f9e1', &['\U000285ed']), ('\U0002f9e2', &['\u9094']), ('\U0002f9e3', &['\u90f1']), - ('\U0002f9e4', &['\u9111']), ('\U0002f9e5', &['\U0002872e']), ('\U0002f9e6', &['\u911b']), - ('\U0002f9e7', &['\u9238']), ('\U0002f9e8', &['\u92d7']), ('\U0002f9e9', &['\u92d8']), - ('\U0002f9ea', &['\u927c']), ('\U0002f9eb', &['\u93f9']), ('\U0002f9ec', &['\u9415']), - ('\U0002f9ed', &['\U00028bfa']), ('\U0002f9ee', &['\u958b']), ('\U0002f9ef', &['\u4995']), - ('\U0002f9f0', &['\u95b7']), ('\U0002f9f1', &['\U00028d77']), ('\U0002f9f2', &['\u49e6']), - ('\U0002f9f3', &['\u96c3']), ('\U0002f9f4', &['\u5db2']), ('\U0002f9f5', &['\u9723']), - ('\U0002f9f6', &['\U00029145']), ('\U0002f9f7', &['\U0002921a']), ('\U0002f9f8', - &['\u4a6e']), ('\U0002f9f9', &['\u4a76']), ('\U0002f9fa', &['\u97e0']), ('\U0002f9fb', - &['\U0002940a']), ('\U0002f9fc', &['\u4ab2']), ('\U0002f9fd', &['\U00029496']), - ('\U0002f9fe', &['\u980b']), ('\U0002f9ff', &['\u980b']), ('\U0002fa00', &['\u9829']), - ('\U0002fa01', &['\U000295b6']), ('\U0002fa02', &['\u98e2']), ('\U0002fa03', &['\u4b33']), - ('\U0002fa04', &['\u9929']), ('\U0002fa05', &['\u99a7']), ('\U0002fa06', &['\u99c2']), - ('\U0002fa07', &['\u99fe']), ('\U0002fa08', &['\u4bce']), ('\U0002fa09', &['\U00029b30']), - ('\U0002fa0a', &['\u9b12']), ('\U0002fa0b', &['\u9c40']), ('\U0002fa0c', &['\u9cfd']), - ('\U0002fa0d', &['\u4cce']), ('\U0002fa0e', &['\u4ced']), ('\U0002fa0f', &['\u9d67']), - ('\U0002fa10', &['\U0002a0ce']), ('\U0002fa11', &['\u4cf8']), ('\U0002fa12', - &['\U0002a105']), ('\U0002fa13', &['\U0002a20e']), ('\U0002fa14', &['\U0002a291']), - ('\U0002fa15', &['\u9ebb']), ('\U0002fa16', &['\u4d56']), ('\U0002fa17', &['\u9ef9']), - ('\U0002fa18', &['\u9efe']), ('\U0002fa19', &['\u9f05']), ('\U0002fa1a', &['\u9f0f']), - ('\U0002fa1b', &['\u9f16']), ('\U0002fa1c', &['\u9f3b']), ('\U0002fa1d', &['\U0002a600']) - ]; - - // Compatibility decompositions - static compatibility_table : &'static [(char, &'static [char])] = &[ - ('\xa0', &['\x20']), ('\xa8', &['\x20', '\u0308']), ('\xaa', &['\x61']), ('\xaf', &['\x20', - '\u0304']), ('\xb2', &['\x32']), ('\xb3', &['\x33']), ('\xb4', &['\x20', '\u0301']), - ('\xb5', &['\u03bc']), ('\xb8', &['\x20', '\u0327']), ('\xb9', &['\x31']), ('\xba', - &['\x6f']), ('\xbc', &['\x31', '\u2044', '\x34']), ('\xbd', &['\x31', '\u2044', '\x32']), - ('\xbe', &['\x33', '\u2044', '\x34']), ('\u0132', &['\x49', '\x4a']), ('\u0133', &['\x69', - '\x6a']), ('\u013f', &['\x4c', '\xb7']), ('\u0140', &['\x6c', '\xb7']), ('\u0149', - &['\u02bc', '\x6e']), ('\u017f', &['\x73']), ('\u01c4', &['\x44', '\u017d']), ('\u01c5', - &['\x44', '\u017e']), ('\u01c6', &['\x64', '\u017e']), ('\u01c7', &['\x4c', '\x4a']), - ('\u01c8', &['\x4c', '\x6a']), ('\u01c9', &['\x6c', '\x6a']), ('\u01ca', &['\x4e', '\x4a']), - ('\u01cb', &['\x4e', '\x6a']), ('\u01cc', &['\x6e', '\x6a']), ('\u01f1', &['\x44', '\x5a']), - ('\u01f2', &['\x44', '\x7a']), ('\u01f3', &['\x64', '\x7a']), ('\u02b0', &['\x68']), - ('\u02b1', &['\u0266']), ('\u02b2', &['\x6a']), ('\u02b3', &['\x72']), ('\u02b4', - &['\u0279']), ('\u02b5', &['\u027b']), ('\u02b6', &['\u0281']), ('\u02b7', &['\x77']), - ('\u02b8', &['\x79']), ('\u02d8', &['\x20', '\u0306']), ('\u02d9', &['\x20', '\u0307']), - ('\u02da', &['\x20', '\u030a']), ('\u02db', &['\x20', '\u0328']), ('\u02dc', &['\x20', - '\u0303']), ('\u02dd', &['\x20', '\u030b']), ('\u02e0', &['\u0263']), ('\u02e1', &['\x6c']), - ('\u02e2', &['\x73']), ('\u02e3', &['\x78']), ('\u02e4', &['\u0295']), ('\u037a', &['\x20', - '\u0345']), ('\u0384', &['\x20', '\u0301']), ('\u03d0', &['\u03b2']), ('\u03d1', - &['\u03b8']), ('\u03d2', &['\u03a5']), ('\u03d5', &['\u03c6']), ('\u03d6', &['\u03c0']), - ('\u03f0', &['\u03ba']), ('\u03f1', &['\u03c1']), ('\u03f2', &['\u03c2']), ('\u03f4', - &['\u0398']), ('\u03f5', &['\u03b5']), ('\u03f9', &['\u03a3']), ('\u0587', &['\u0565', - '\u0582']), ('\u0675', &['\u0627', '\u0674']), ('\u0676', &['\u0648', '\u0674']), ('\u0677', - &['\u06c7', '\u0674']), ('\u0678', &['\u064a', '\u0674']), ('\u0e33', &['\u0e4d', - '\u0e32']), ('\u0eb3', &['\u0ecd', '\u0eb2']), ('\u0edc', &['\u0eab', '\u0e99']), ('\u0edd', - &['\u0eab', '\u0ea1']), ('\u0f0c', &['\u0f0b']), ('\u0f77', &['\u0fb2', '\u0f81']), - ('\u0f79', &['\u0fb3', '\u0f81']), ('\u10fc', &['\u10dc']), ('\u1d2c', &['\x41']), - ('\u1d2d', &['\xc6']), ('\u1d2e', &['\x42']), ('\u1d30', &['\x44']), ('\u1d31', &['\x45']), - ('\u1d32', &['\u018e']), ('\u1d33', &['\x47']), ('\u1d34', &['\x48']), ('\u1d35', - &['\x49']), ('\u1d36', &['\x4a']), ('\u1d37', &['\x4b']), ('\u1d38', &['\x4c']), ('\u1d39', - &['\x4d']), ('\u1d3a', &['\x4e']), ('\u1d3c', &['\x4f']), ('\u1d3d', &['\u0222']), - ('\u1d3e', &['\x50']), ('\u1d3f', &['\x52']), ('\u1d40', &['\x54']), ('\u1d41', &['\x55']), - ('\u1d42', &['\x57']), ('\u1d43', &['\x61']), ('\u1d44', &['\u0250']), ('\u1d45', - &['\u0251']), ('\u1d46', &['\u1d02']), ('\u1d47', &['\x62']), ('\u1d48', &['\x64']), - ('\u1d49', &['\x65']), ('\u1d4a', &['\u0259']), ('\u1d4b', &['\u025b']), ('\u1d4c', - &['\u025c']), ('\u1d4d', &['\x67']), ('\u1d4f', &['\x6b']), ('\u1d50', &['\x6d']), - ('\u1d51', &['\u014b']), ('\u1d52', &['\x6f']), ('\u1d53', &['\u0254']), ('\u1d54', - &['\u1d16']), ('\u1d55', &['\u1d17']), ('\u1d56', &['\x70']), ('\u1d57', &['\x74']), - ('\u1d58', &['\x75']), ('\u1d59', &['\u1d1d']), ('\u1d5a', &['\u026f']), ('\u1d5b', - &['\x76']), ('\u1d5c', &['\u1d25']), ('\u1d5d', &['\u03b2']), ('\u1d5e', &['\u03b3']), - ('\u1d5f', &['\u03b4']), ('\u1d60', &['\u03c6']), ('\u1d61', &['\u03c7']), ('\u1d62', - &['\x69']), ('\u1d63', &['\x72']), ('\u1d64', &['\x75']), ('\u1d65', &['\x76']), ('\u1d66', - &['\u03b2']), ('\u1d67', &['\u03b3']), ('\u1d68', &['\u03c1']), ('\u1d69', &['\u03c6']), - ('\u1d6a', &['\u03c7']), ('\u1d78', &['\u043d']), ('\u1d9b', &['\u0252']), ('\u1d9c', - &['\x63']), ('\u1d9d', &['\u0255']), ('\u1d9e', &['\xf0']), ('\u1d9f', &['\u025c']), - ('\u1da0', &['\x66']), ('\u1da1', &['\u025f']), ('\u1da2', &['\u0261']), ('\u1da3', - &['\u0265']), ('\u1da4', &['\u0268']), ('\u1da5', &['\u0269']), ('\u1da6', &['\u026a']), - ('\u1da7', &['\u1d7b']), ('\u1da8', &['\u029d']), ('\u1da9', &['\u026d']), ('\u1daa', - &['\u1d85']), ('\u1dab', &['\u029f']), ('\u1dac', &['\u0271']), ('\u1dad', &['\u0270']), - ('\u1dae', &['\u0272']), ('\u1daf', &['\u0273']), ('\u1db0', &['\u0274']), ('\u1db1', - &['\u0275']), ('\u1db2', &['\u0278']), ('\u1db3', &['\u0282']), ('\u1db4', &['\u0283']), - ('\u1db5', &['\u01ab']), ('\u1db6', &['\u0289']), ('\u1db7', &['\u028a']), ('\u1db8', - &['\u1d1c']), ('\u1db9', &['\u028b']), ('\u1dba', &['\u028c']), ('\u1dbb', &['\x7a']), - ('\u1dbc', &['\u0290']), ('\u1dbd', &['\u0291']), ('\u1dbe', &['\u0292']), ('\u1dbf', - &['\u03b8']), ('\u1e9a', &['\x61', '\u02be']), ('\u1fbd', &['\x20', '\u0313']), ('\u1fbf', - &['\x20', '\u0313']), ('\u1fc0', &['\x20', '\u0342']), ('\u1ffe', &['\x20', '\u0314']), - ('\u2002', &['\x20']), ('\u2003', &['\x20']), ('\u2004', &['\x20']), ('\u2005', &['\x20']), - ('\u2006', &['\x20']), ('\u2007', &['\x20']), ('\u2008', &['\x20']), ('\u2009', &['\x20']), - ('\u200a', &['\x20']), ('\u2011', &['\u2010']), ('\u2017', &['\x20', '\u0333']), ('\u2024', - &['\x2e']), ('\u2025', &['\x2e', '\x2e']), ('\u2026', &['\x2e', '\x2e', '\x2e']), ('\u202f', - &['\x20']), ('\u2033', &['\u2032', '\u2032']), ('\u2034', &['\u2032', '\u2032', '\u2032']), - ('\u2036', &['\u2035', '\u2035']), ('\u2037', &['\u2035', '\u2035', '\u2035']), ('\u203c', - &['\x21', '\x21']), ('\u203e', &['\x20', '\u0305']), ('\u2047', &['\x3f', '\x3f']), - ('\u2048', &['\x3f', '\x21']), ('\u2049', &['\x21', '\x3f']), ('\u2057', &['\u2032', - '\u2032', '\u2032', '\u2032']), ('\u205f', &['\x20']), ('\u2070', &['\x30']), ('\u2071', - &['\x69']), ('\u2074', &['\x34']), ('\u2075', &['\x35']), ('\u2076', &['\x36']), ('\u2077', - &['\x37']), ('\u2078', &['\x38']), ('\u2079', &['\x39']), ('\u207a', &['\x2b']), ('\u207b', - &['\u2212']), ('\u207c', &['\x3d']), ('\u207d', &['\x28']), ('\u207e', &['\x29']), - ('\u207f', &['\x6e']), ('\u2080', &['\x30']), ('\u2081', &['\x31']), ('\u2082', &['\x32']), - ('\u2083', &['\x33']), ('\u2084', &['\x34']), ('\u2085', &['\x35']), ('\u2086', &['\x36']), - ('\u2087', &['\x37']), ('\u2088', &['\x38']), ('\u2089', &['\x39']), ('\u208a', &['\x2b']), - ('\u208b', &['\u2212']), ('\u208c', &['\x3d']), ('\u208d', &['\x28']), ('\u208e', - &['\x29']), ('\u2090', &['\x61']), ('\u2091', &['\x65']), ('\u2092', &['\x6f']), ('\u2093', - &['\x78']), ('\u2094', &['\u0259']), ('\u2095', &['\x68']), ('\u2096', &['\x6b']), - ('\u2097', &['\x6c']), ('\u2098', &['\x6d']), ('\u2099', &['\x6e']), ('\u209a', &['\x70']), - ('\u209b', &['\x73']), ('\u209c', &['\x74']), ('\u20a8', &['\x52', '\x73']), ('\u2100', - &['\x61', '\x2f', '\x63']), ('\u2101', &['\x61', '\x2f', '\x73']), ('\u2102', &['\x43']), - ('\u2103', &['\xb0', '\x43']), ('\u2105', &['\x63', '\x2f', '\x6f']), ('\u2106', &['\x63', - '\x2f', '\x75']), ('\u2107', &['\u0190']), ('\u2109', &['\xb0', '\x46']), ('\u210a', - &['\x67']), ('\u210b', &['\x48']), ('\u210c', &['\x48']), ('\u210d', &['\x48']), ('\u210e', - &['\x68']), ('\u210f', &['\u0127']), ('\u2110', &['\x49']), ('\u2111', &['\x49']), - ('\u2112', &['\x4c']), ('\u2113', &['\x6c']), ('\u2115', &['\x4e']), ('\u2116', &['\x4e', - '\x6f']), ('\u2119', &['\x50']), ('\u211a', &['\x51']), ('\u211b', &['\x52']), ('\u211c', - &['\x52']), ('\u211d', &['\x52']), ('\u2120', &['\x53', '\x4d']), ('\u2121', &['\x54', - '\x45', '\x4c']), ('\u2122', &['\x54', '\x4d']), ('\u2124', &['\x5a']), ('\u2128', - &['\x5a']), ('\u212c', &['\x42']), ('\u212d', &['\x43']), ('\u212f', &['\x65']), ('\u2130', - &['\x45']), ('\u2131', &['\x46']), ('\u2133', &['\x4d']), ('\u2134', &['\x6f']), ('\u2135', - &['\u05d0']), ('\u2136', &['\u05d1']), ('\u2137', &['\u05d2']), ('\u2138', &['\u05d3']), - ('\u2139', &['\x69']), ('\u213b', &['\x46', '\x41', '\x58']), ('\u213c', &['\u03c0']), - ('\u213d', &['\u03b3']), ('\u213e', &['\u0393']), ('\u213f', &['\u03a0']), ('\u2140', - &['\u2211']), ('\u2145', &['\x44']), ('\u2146', &['\x64']), ('\u2147', &['\x65']), - ('\u2148', &['\x69']), ('\u2149', &['\x6a']), ('\u2150', &['\x31', '\u2044', '\x37']), - ('\u2151', &['\x31', '\u2044', '\x39']), ('\u2152', &['\x31', '\u2044', '\x31', '\x30']), - ('\u2153', &['\x31', '\u2044', '\x33']), ('\u2154', &['\x32', '\u2044', '\x33']), ('\u2155', - &['\x31', '\u2044', '\x35']), ('\u2156', &['\x32', '\u2044', '\x35']), ('\u2157', &['\x33', - '\u2044', '\x35']), ('\u2158', &['\x34', '\u2044', '\x35']), ('\u2159', &['\x31', '\u2044', - '\x36']), ('\u215a', &['\x35', '\u2044', '\x36']), ('\u215b', &['\x31', '\u2044', '\x38']), - ('\u215c', &['\x33', '\u2044', '\x38']), ('\u215d', &['\x35', '\u2044', '\x38']), ('\u215e', - &['\x37', '\u2044', '\x38']), ('\u215f', &['\x31', '\u2044']), ('\u2160', &['\x49']), - ('\u2161', &['\x49', '\x49']), ('\u2162', &['\x49', '\x49', '\x49']), ('\u2163', &['\x49', - '\x56']), ('\u2164', &['\x56']), ('\u2165', &['\x56', '\x49']), ('\u2166', &['\x56', '\x49', - '\x49']), ('\u2167', &['\x56', '\x49', '\x49', '\x49']), ('\u2168', &['\x49', '\x58']), - ('\u2169', &['\x58']), ('\u216a', &['\x58', '\x49']), ('\u216b', &['\x58', '\x49', '\x49']), - ('\u216c', &['\x4c']), ('\u216d', &['\x43']), ('\u216e', &['\x44']), ('\u216f', &['\x4d']), - ('\u2170', &['\x69']), ('\u2171', &['\x69', '\x69']), ('\u2172', &['\x69', '\x69', '\x69']), - ('\u2173', &['\x69', '\x76']), ('\u2174', &['\x76']), ('\u2175', &['\x76', '\x69']), - ('\u2176', &['\x76', '\x69', '\x69']), ('\u2177', &['\x76', '\x69', '\x69', '\x69']), - ('\u2178', &['\x69', '\x78']), ('\u2179', &['\x78']), ('\u217a', &['\x78', '\x69']), - ('\u217b', &['\x78', '\x69', '\x69']), ('\u217c', &['\x6c']), ('\u217d', &['\x63']), - ('\u217e', &['\x64']), ('\u217f', &['\x6d']), ('\u2189', &['\x30', '\u2044', '\x33']), - ('\u222c', &['\u222b', '\u222b']), ('\u222d', &['\u222b', '\u222b', '\u222b']), ('\u222f', - &['\u222e', '\u222e']), ('\u2230', &['\u222e', '\u222e', '\u222e']), ('\u2460', &['\x31']), - ('\u2461', &['\x32']), ('\u2462', &['\x33']), ('\u2463', &['\x34']), ('\u2464', &['\x35']), - ('\u2465', &['\x36']), ('\u2466', &['\x37']), ('\u2467', &['\x38']), ('\u2468', &['\x39']), - ('\u2469', &['\x31', '\x30']), ('\u246a', &['\x31', '\x31']), ('\u246b', &['\x31', '\x32']), - ('\u246c', &['\x31', '\x33']), ('\u246d', &['\x31', '\x34']), ('\u246e', &['\x31', '\x35']), - ('\u246f', &['\x31', '\x36']), ('\u2470', &['\x31', '\x37']), ('\u2471', &['\x31', '\x38']), - ('\u2472', &['\x31', '\x39']), ('\u2473', &['\x32', '\x30']), ('\u2474', &['\x28', '\x31', - '\x29']), ('\u2475', &['\x28', '\x32', '\x29']), ('\u2476', &['\x28', '\x33', '\x29']), - ('\u2477', &['\x28', '\x34', '\x29']), ('\u2478', &['\x28', '\x35', '\x29']), ('\u2479', - &['\x28', '\x36', '\x29']), ('\u247a', &['\x28', '\x37', '\x29']), ('\u247b', &['\x28', - '\x38', '\x29']), ('\u247c', &['\x28', '\x39', '\x29']), ('\u247d', &['\x28', '\x31', - '\x30', '\x29']), ('\u247e', &['\x28', '\x31', '\x31', '\x29']), ('\u247f', &['\x28', - '\x31', '\x32', '\x29']), ('\u2480', &['\x28', '\x31', '\x33', '\x29']), ('\u2481', - &['\x28', '\x31', '\x34', '\x29']), ('\u2482', &['\x28', '\x31', '\x35', '\x29']), - ('\u2483', &['\x28', '\x31', '\x36', '\x29']), ('\u2484', &['\x28', '\x31', '\x37', - '\x29']), ('\u2485', &['\x28', '\x31', '\x38', '\x29']), ('\u2486', &['\x28', '\x31', - '\x39', '\x29']), ('\u2487', &['\x28', '\x32', '\x30', '\x29']), ('\u2488', &['\x31', - '\x2e']), ('\u2489', &['\x32', '\x2e']), ('\u248a', &['\x33', '\x2e']), ('\u248b', &['\x34', - '\x2e']), ('\u248c', &['\x35', '\x2e']), ('\u248d', &['\x36', '\x2e']), ('\u248e', &['\x37', - '\x2e']), ('\u248f', &['\x38', '\x2e']), ('\u2490', &['\x39', '\x2e']), ('\u2491', &['\x31', - '\x30', '\x2e']), ('\u2492', &['\x31', '\x31', '\x2e']), ('\u2493', &['\x31', '\x32', - '\x2e']), ('\u2494', &['\x31', '\x33', '\x2e']), ('\u2495', &['\x31', '\x34', '\x2e']), - ('\u2496', &['\x31', '\x35', '\x2e']), ('\u2497', &['\x31', '\x36', '\x2e']), ('\u2498', - &['\x31', '\x37', '\x2e']), ('\u2499', &['\x31', '\x38', '\x2e']), ('\u249a', &['\x31', - '\x39', '\x2e']), ('\u249b', &['\x32', '\x30', '\x2e']), ('\u249c', &['\x28', '\x61', - '\x29']), ('\u249d', &['\x28', '\x62', '\x29']), ('\u249e', &['\x28', '\x63', '\x29']), - ('\u249f', &['\x28', '\x64', '\x29']), ('\u24a0', &['\x28', '\x65', '\x29']), ('\u24a1', - &['\x28', '\x66', '\x29']), ('\u24a2', &['\x28', '\x67', '\x29']), ('\u24a3', &['\x28', - '\x68', '\x29']), ('\u24a4', &['\x28', '\x69', '\x29']), ('\u24a5', &['\x28', '\x6a', - '\x29']), ('\u24a6', &['\x28', '\x6b', '\x29']), ('\u24a7', &['\x28', '\x6c', '\x29']), - ('\u24a8', &['\x28', '\x6d', '\x29']), ('\u24a9', &['\x28', '\x6e', '\x29']), ('\u24aa', - &['\x28', '\x6f', '\x29']), ('\u24ab', &['\x28', '\x70', '\x29']), ('\u24ac', &['\x28', - '\x71', '\x29']), ('\u24ad', &['\x28', '\x72', '\x29']), ('\u24ae', &['\x28', '\x73', - '\x29']), ('\u24af', &['\x28', '\x74', '\x29']), ('\u24b0', &['\x28', '\x75', '\x29']), - ('\u24b1', &['\x28', '\x76', '\x29']), ('\u24b2', &['\x28', '\x77', '\x29']), ('\u24b3', - &['\x28', '\x78', '\x29']), ('\u24b4', &['\x28', '\x79', '\x29']), ('\u24b5', &['\x28', - '\x7a', '\x29']), ('\u24b6', &['\x41']), ('\u24b7', &['\x42']), ('\u24b8', &['\x43']), - ('\u24b9', &['\x44']), ('\u24ba', &['\x45']), ('\u24bb', &['\x46']), ('\u24bc', &['\x47']), - ('\u24bd', &['\x48']), ('\u24be', &['\x49']), ('\u24bf', &['\x4a']), ('\u24c0', &['\x4b']), - ('\u24c1', &['\x4c']), ('\u24c2', &['\x4d']), ('\u24c3', &['\x4e']), ('\u24c4', &['\x4f']), - ('\u24c5', &['\x50']), ('\u24c6', &['\x51']), ('\u24c7', &['\x52']), ('\u24c8', &['\x53']), - ('\u24c9', &['\x54']), ('\u24ca', &['\x55']), ('\u24cb', &['\x56']), ('\u24cc', &['\x57']), - ('\u24cd', &['\x58']), ('\u24ce', &['\x59']), ('\u24cf', &['\x5a']), ('\u24d0', &['\x61']), - ('\u24d1', &['\x62']), ('\u24d2', &['\x63']), ('\u24d3', &['\x64']), ('\u24d4', &['\x65']), - ('\u24d5', &['\x66']), ('\u24d6', &['\x67']), ('\u24d7', &['\x68']), ('\u24d8', &['\x69']), - ('\u24d9', &['\x6a']), ('\u24da', &['\x6b']), ('\u24db', &['\x6c']), ('\u24dc', &['\x6d']), - ('\u24dd', &['\x6e']), ('\u24de', &['\x6f']), ('\u24df', &['\x70']), ('\u24e0', &['\x71']), - ('\u24e1', &['\x72']), ('\u24e2', &['\x73']), ('\u24e3', &['\x74']), ('\u24e4', &['\x75']), - ('\u24e5', &['\x76']), ('\u24e6', &['\x77']), ('\u24e7', &['\x78']), ('\u24e8', &['\x79']), - ('\u24e9', &['\x7a']), ('\u24ea', &['\x30']), ('\u2a0c', &['\u222b', '\u222b', '\u222b', - '\u222b']), ('\u2a74', &['\x3a', '\x3a', '\x3d']), ('\u2a75', &['\x3d', '\x3d']), ('\u2a76', - &['\x3d', '\x3d', '\x3d']), ('\u2c7c', &['\x6a']), ('\u2c7d', &['\x56']), ('\u2d6f', - &['\u2d61']), ('\u2e9f', &['\u6bcd']), ('\u2ef3', &['\u9f9f']), ('\u2f00', &['\u4e00']), - ('\u2f01', &['\u4e28']), ('\u2f02', &['\u4e36']), ('\u2f03', &['\u4e3f']), ('\u2f04', - &['\u4e59']), ('\u2f05', &['\u4e85']), ('\u2f06', &['\u4e8c']), ('\u2f07', &['\u4ea0']), - ('\u2f08', &['\u4eba']), ('\u2f09', &['\u513f']), ('\u2f0a', &['\u5165']), ('\u2f0b', - &['\u516b']), ('\u2f0c', &['\u5182']), ('\u2f0d', &['\u5196']), ('\u2f0e', &['\u51ab']), - ('\u2f0f', &['\u51e0']), ('\u2f10', &['\u51f5']), ('\u2f11', &['\u5200']), ('\u2f12', - &['\u529b']), ('\u2f13', &['\u52f9']), ('\u2f14', &['\u5315']), ('\u2f15', &['\u531a']), - ('\u2f16', &['\u5338']), ('\u2f17', &['\u5341']), ('\u2f18', &['\u535c']), ('\u2f19', - &['\u5369']), ('\u2f1a', &['\u5382']), ('\u2f1b', &['\u53b6']), ('\u2f1c', &['\u53c8']), - ('\u2f1d', &['\u53e3']), ('\u2f1e', &['\u56d7']), ('\u2f1f', &['\u571f']), ('\u2f20', - &['\u58eb']), ('\u2f21', &['\u5902']), ('\u2f22', &['\u590a']), ('\u2f23', &['\u5915']), - ('\u2f24', &['\u5927']), ('\u2f25', &['\u5973']), ('\u2f26', &['\u5b50']), ('\u2f27', - &['\u5b80']), ('\u2f28', &['\u5bf8']), ('\u2f29', &['\u5c0f']), ('\u2f2a', &['\u5c22']), - ('\u2f2b', &['\u5c38']), ('\u2f2c', &['\u5c6e']), ('\u2f2d', &['\u5c71']), ('\u2f2e', - &['\u5ddb']), ('\u2f2f', &['\u5de5']), ('\u2f30', &['\u5df1']), ('\u2f31', &['\u5dfe']), - ('\u2f32', &['\u5e72']), ('\u2f33', &['\u5e7a']), ('\u2f34', &['\u5e7f']), ('\u2f35', - &['\u5ef4']), ('\u2f36', &['\u5efe']), ('\u2f37', &['\u5f0b']), ('\u2f38', &['\u5f13']), - ('\u2f39', &['\u5f50']), ('\u2f3a', &['\u5f61']), ('\u2f3b', &['\u5f73']), ('\u2f3c', - &['\u5fc3']), ('\u2f3d', &['\u6208']), ('\u2f3e', &['\u6236']), ('\u2f3f', &['\u624b']), - ('\u2f40', &['\u652f']), ('\u2f41', &['\u6534']), ('\u2f42', &['\u6587']), ('\u2f43', - &['\u6597']), ('\u2f44', &['\u65a4']), ('\u2f45', &['\u65b9']), ('\u2f46', &['\u65e0']), - ('\u2f47', &['\u65e5']), ('\u2f48', &['\u66f0']), ('\u2f49', &['\u6708']), ('\u2f4a', - &['\u6728']), ('\u2f4b', &['\u6b20']), ('\u2f4c', &['\u6b62']), ('\u2f4d', &['\u6b79']), - ('\u2f4e', &['\u6bb3']), ('\u2f4f', &['\u6bcb']), ('\u2f50', &['\u6bd4']), ('\u2f51', - &['\u6bdb']), ('\u2f52', &['\u6c0f']), ('\u2f53', &['\u6c14']), ('\u2f54', &['\u6c34']), - ('\u2f55', &['\u706b']), ('\u2f56', &['\u722a']), ('\u2f57', &['\u7236']), ('\u2f58', - &['\u723b']), ('\u2f59', &['\u723f']), ('\u2f5a', &['\u7247']), ('\u2f5b', &['\u7259']), - ('\u2f5c', &['\u725b']), ('\u2f5d', &['\u72ac']), ('\u2f5e', &['\u7384']), ('\u2f5f', - &['\u7389']), ('\u2f60', &['\u74dc']), ('\u2f61', &['\u74e6']), ('\u2f62', &['\u7518']), - ('\u2f63', &['\u751f']), ('\u2f64', &['\u7528']), ('\u2f65', &['\u7530']), ('\u2f66', - &['\u758b']), ('\u2f67', &['\u7592']), ('\u2f68', &['\u7676']), ('\u2f69', &['\u767d']), - ('\u2f6a', &['\u76ae']), ('\u2f6b', &['\u76bf']), ('\u2f6c', &['\u76ee']), ('\u2f6d', - &['\u77db']), ('\u2f6e', &['\u77e2']), ('\u2f6f', &['\u77f3']), ('\u2f70', &['\u793a']), - ('\u2f71', &['\u79b8']), ('\u2f72', &['\u79be']), ('\u2f73', &['\u7a74']), ('\u2f74', - &['\u7acb']), ('\u2f75', &['\u7af9']), ('\u2f76', &['\u7c73']), ('\u2f77', &['\u7cf8']), - ('\u2f78', &['\u7f36']), ('\u2f79', &['\u7f51']), ('\u2f7a', &['\u7f8a']), ('\u2f7b', - &['\u7fbd']), ('\u2f7c', &['\u8001']), ('\u2f7d', &['\u800c']), ('\u2f7e', &['\u8012']), - ('\u2f7f', &['\u8033']), ('\u2f80', &['\u807f']), ('\u2f81', &['\u8089']), ('\u2f82', - &['\u81e3']), ('\u2f83', &['\u81ea']), ('\u2f84', &['\u81f3']), ('\u2f85', &['\u81fc']), - ('\u2f86', &['\u820c']), ('\u2f87', &['\u821b']), ('\u2f88', &['\u821f']), ('\u2f89', - &['\u826e']), ('\u2f8a', &['\u8272']), ('\u2f8b', &['\u8278']), ('\u2f8c', &['\u864d']), - ('\u2f8d', &['\u866b']), ('\u2f8e', &['\u8840']), ('\u2f8f', &['\u884c']), ('\u2f90', - &['\u8863']), ('\u2f91', &['\u897e']), ('\u2f92', &['\u898b']), ('\u2f93', &['\u89d2']), - ('\u2f94', &['\u8a00']), ('\u2f95', &['\u8c37']), ('\u2f96', &['\u8c46']), ('\u2f97', - &['\u8c55']), ('\u2f98', &['\u8c78']), ('\u2f99', &['\u8c9d']), ('\u2f9a', &['\u8d64']), - ('\u2f9b', &['\u8d70']), ('\u2f9c', &['\u8db3']), ('\u2f9d', &['\u8eab']), ('\u2f9e', - &['\u8eca']), ('\u2f9f', &['\u8f9b']), ('\u2fa0', &['\u8fb0']), ('\u2fa1', &['\u8fb5']), - ('\u2fa2', &['\u9091']), ('\u2fa3', &['\u9149']), ('\u2fa4', &['\u91c6']), ('\u2fa5', - &['\u91cc']), ('\u2fa6', &['\u91d1']), ('\u2fa7', &['\u9577']), ('\u2fa8', &['\u9580']), - ('\u2fa9', &['\u961c']), ('\u2faa', &['\u96b6']), ('\u2fab', &['\u96b9']), ('\u2fac', - &['\u96e8']), ('\u2fad', &['\u9751']), ('\u2fae', &['\u975e']), ('\u2faf', &['\u9762']), - ('\u2fb0', &['\u9769']), ('\u2fb1', &['\u97cb']), ('\u2fb2', &['\u97ed']), ('\u2fb3', - &['\u97f3']), ('\u2fb4', &['\u9801']), ('\u2fb5', &['\u98a8']), ('\u2fb6', &['\u98db']), - ('\u2fb7', &['\u98df']), ('\u2fb8', &['\u9996']), ('\u2fb9', &['\u9999']), ('\u2fba', - &['\u99ac']), ('\u2fbb', &['\u9aa8']), ('\u2fbc', &['\u9ad8']), ('\u2fbd', &['\u9adf']), - ('\u2fbe', &['\u9b25']), ('\u2fbf', &['\u9b2f']), ('\u2fc0', &['\u9b32']), ('\u2fc1', - &['\u9b3c']), ('\u2fc2', &['\u9b5a']), ('\u2fc3', &['\u9ce5']), ('\u2fc4', &['\u9e75']), - ('\u2fc5', &['\u9e7f']), ('\u2fc6', &['\u9ea5']), ('\u2fc7', &['\u9ebb']), ('\u2fc8', - &['\u9ec3']), ('\u2fc9', &['\u9ecd']), ('\u2fca', &['\u9ed1']), ('\u2fcb', &['\u9ef9']), - ('\u2fcc', &['\u9efd']), ('\u2fcd', &['\u9f0e']), ('\u2fce', &['\u9f13']), ('\u2fcf', - &['\u9f20']), ('\u2fd0', &['\u9f3b']), ('\u2fd1', &['\u9f4a']), ('\u2fd2', &['\u9f52']), - ('\u2fd3', &['\u9f8d']), ('\u2fd4', &['\u9f9c']), ('\u2fd5', &['\u9fa0']), ('\u3000', - &['\x20']), ('\u3036', &['\u3012']), ('\u3038', &['\u5341']), ('\u3039', &['\u5344']), - ('\u303a', &['\u5345']), ('\u309b', &['\x20', '\u3099']), ('\u309c', &['\x20', '\u309a']), - ('\u309f', &['\u3088', '\u308a']), ('\u30ff', &['\u30b3', '\u30c8']), ('\u3131', - &['\u1100']), ('\u3132', &['\u1101']), ('\u3133', &['\u11aa']), ('\u3134', &['\u1102']), - ('\u3135', &['\u11ac']), ('\u3136', &['\u11ad']), ('\u3137', &['\u1103']), ('\u3138', - &['\u1104']), ('\u3139', &['\u1105']), ('\u313a', &['\u11b0']), ('\u313b', &['\u11b1']), - ('\u313c', &['\u11b2']), ('\u313d', &['\u11b3']), ('\u313e', &['\u11b4']), ('\u313f', - &['\u11b5']), ('\u3140', &['\u111a']), ('\u3141', &['\u1106']), ('\u3142', &['\u1107']), - ('\u3143', &['\u1108']), ('\u3144', &['\u1121']), ('\u3145', &['\u1109']), ('\u3146', - &['\u110a']), ('\u3147', &['\u110b']), ('\u3148', &['\u110c']), ('\u3149', &['\u110d']), - ('\u314a', &['\u110e']), ('\u314b', &['\u110f']), ('\u314c', &['\u1110']), ('\u314d', - &['\u1111']), ('\u314e', &['\u1112']), ('\u314f', &['\u1161']), ('\u3150', &['\u1162']), - ('\u3151', &['\u1163']), ('\u3152', &['\u1164']), ('\u3153', &['\u1165']), ('\u3154', - &['\u1166']), ('\u3155', &['\u1167']), ('\u3156', &['\u1168']), ('\u3157', &['\u1169']), - ('\u3158', &['\u116a']), ('\u3159', &['\u116b']), ('\u315a', &['\u116c']), ('\u315b', - &['\u116d']), ('\u315c', &['\u116e']), ('\u315d', &['\u116f']), ('\u315e', &['\u1170']), - ('\u315f', &['\u1171']), ('\u3160', &['\u1172']), ('\u3161', &['\u1173']), ('\u3162', - &['\u1174']), ('\u3163', &['\u1175']), ('\u3164', &['\u1160']), ('\u3165', &['\u1114']), - ('\u3166', &['\u1115']), ('\u3167', &['\u11c7']), ('\u3168', &['\u11c8']), ('\u3169', - &['\u11cc']), ('\u316a', &['\u11ce']), ('\u316b', &['\u11d3']), ('\u316c', &['\u11d7']), - ('\u316d', &['\u11d9']), ('\u316e', &['\u111c']), ('\u316f', &['\u11dd']), ('\u3170', - &['\u11df']), ('\u3171', &['\u111d']), ('\u3172', &['\u111e']), ('\u3173', &['\u1120']), - ('\u3174', &['\u1122']), ('\u3175', &['\u1123']), ('\u3176', &['\u1127']), ('\u3177', - &['\u1129']), ('\u3178', &['\u112b']), ('\u3179', &['\u112c']), ('\u317a', &['\u112d']), - ('\u317b', &['\u112e']), ('\u317c', &['\u112f']), ('\u317d', &['\u1132']), ('\u317e', - &['\u1136']), ('\u317f', &['\u1140']), ('\u3180', &['\u1147']), ('\u3181', &['\u114c']), - ('\u3182', &['\u11f1']), ('\u3183', &['\u11f2']), ('\u3184', &['\u1157']), ('\u3185', - &['\u1158']), ('\u3186', &['\u1159']), ('\u3187', &['\u1184']), ('\u3188', &['\u1185']), - ('\u3189', &['\u1188']), ('\u318a', &['\u1191']), ('\u318b', &['\u1192']), ('\u318c', - &['\u1194']), ('\u318d', &['\u119e']), ('\u318e', &['\u11a1']), ('\u3192', &['\u4e00']), - ('\u3193', &['\u4e8c']), ('\u3194', &['\u4e09']), ('\u3195', &['\u56db']), ('\u3196', - &['\u4e0a']), ('\u3197', &['\u4e2d']), ('\u3198', &['\u4e0b']), ('\u3199', &['\u7532']), - ('\u319a', &['\u4e59']), ('\u319b', &['\u4e19']), ('\u319c', &['\u4e01']), ('\u319d', - &['\u5929']), ('\u319e', &['\u5730']), ('\u319f', &['\u4eba']), ('\u3200', &['\x28', - '\u1100', '\x29']), ('\u3201', &['\x28', '\u1102', '\x29']), ('\u3202', &['\x28', '\u1103', - '\x29']), ('\u3203', &['\x28', '\u1105', '\x29']), ('\u3204', &['\x28', '\u1106', '\x29']), - ('\u3205', &['\x28', '\u1107', '\x29']), ('\u3206', &['\x28', '\u1109', '\x29']), ('\u3207', - &['\x28', '\u110b', '\x29']), ('\u3208', &['\x28', '\u110c', '\x29']), ('\u3209', &['\x28', - '\u110e', '\x29']), ('\u320a', &['\x28', '\u110f', '\x29']), ('\u320b', &['\x28', '\u1110', - '\x29']), ('\u320c', &['\x28', '\u1111', '\x29']), ('\u320d', &['\x28', '\u1112', '\x29']), - ('\u320e', &['\x28', '\u1100', '\u1161', '\x29']), ('\u320f', &['\x28', '\u1102', '\u1161', - '\x29']), ('\u3210', &['\x28', '\u1103', '\u1161', '\x29']), ('\u3211', &['\x28', '\u1105', - '\u1161', '\x29']), ('\u3212', &['\x28', '\u1106', '\u1161', '\x29']), ('\u3213', &['\x28', - '\u1107', '\u1161', '\x29']), ('\u3214', &['\x28', '\u1109', '\u1161', '\x29']), ('\u3215', - &['\x28', '\u110b', '\u1161', '\x29']), ('\u3216', &['\x28', '\u110c', '\u1161', '\x29']), - ('\u3217', &['\x28', '\u110e', '\u1161', '\x29']), ('\u3218', &['\x28', '\u110f', '\u1161', - '\x29']), ('\u3219', &['\x28', '\u1110', '\u1161', '\x29']), ('\u321a', &['\x28', '\u1111', - '\u1161', '\x29']), ('\u321b', &['\x28', '\u1112', '\u1161', '\x29']), ('\u321c', &['\x28', - '\u110c', '\u116e', '\x29']), ('\u321d', &['\x28', '\u110b', '\u1169', '\u110c', '\u1165', - '\u11ab', '\x29']), ('\u321e', &['\x28', '\u110b', '\u1169', '\u1112', '\u116e', '\x29']), - ('\u3220', &['\x28', '\u4e00', '\x29']), ('\u3221', &['\x28', '\u4e8c', '\x29']), ('\u3222', - &['\x28', '\u4e09', '\x29']), ('\u3223', &['\x28', '\u56db', '\x29']), ('\u3224', &['\x28', - '\u4e94', '\x29']), ('\u3225', &['\x28', '\u516d', '\x29']), ('\u3226', &['\x28', '\u4e03', - '\x29']), ('\u3227', &['\x28', '\u516b', '\x29']), ('\u3228', &['\x28', '\u4e5d', '\x29']), - ('\u3229', &['\x28', '\u5341', '\x29']), ('\u322a', &['\x28', '\u6708', '\x29']), ('\u322b', - &['\x28', '\u706b', '\x29']), ('\u322c', &['\x28', '\u6c34', '\x29']), ('\u322d', &['\x28', - '\u6728', '\x29']), ('\u322e', &['\x28', '\u91d1', '\x29']), ('\u322f', &['\x28', '\u571f', - '\x29']), ('\u3230', &['\x28', '\u65e5', '\x29']), ('\u3231', &['\x28', '\u682a', '\x29']), - ('\u3232', &['\x28', '\u6709', '\x29']), ('\u3233', &['\x28', '\u793e', '\x29']), ('\u3234', - &['\x28', '\u540d', '\x29']), ('\u3235', &['\x28', '\u7279', '\x29']), ('\u3236', &['\x28', - '\u8ca1', '\x29']), ('\u3237', &['\x28', '\u795d', '\x29']), ('\u3238', &['\x28', '\u52b4', - '\x29']), ('\u3239', &['\x28', '\u4ee3', '\x29']), ('\u323a', &['\x28', '\u547c', '\x29']), - ('\u323b', &['\x28', '\u5b66', '\x29']), ('\u323c', &['\x28', '\u76e3', '\x29']), ('\u323d', - &['\x28', '\u4f01', '\x29']), ('\u323e', &['\x28', '\u8cc7', '\x29']), ('\u323f', &['\x28', - '\u5354', '\x29']), ('\u3240', &['\x28', '\u796d', '\x29']), ('\u3241', &['\x28', '\u4f11', - '\x29']), ('\u3242', &['\x28', '\u81ea', '\x29']), ('\u3243', &['\x28', '\u81f3', '\x29']), - ('\u3244', &['\u554f']), ('\u3245', &['\u5e7c']), ('\u3246', &['\u6587']), ('\u3247', - &['\u7b8f']), ('\u3250', &['\x50', '\x54', '\x45']), ('\u3251', &['\x32', '\x31']), - ('\u3252', &['\x32', '\x32']), ('\u3253', &['\x32', '\x33']), ('\u3254', &['\x32', '\x34']), - ('\u3255', &['\x32', '\x35']), ('\u3256', &['\x32', '\x36']), ('\u3257', &['\x32', '\x37']), - ('\u3258', &['\x32', '\x38']), ('\u3259', &['\x32', '\x39']), ('\u325a', &['\x33', '\x30']), - ('\u325b', &['\x33', '\x31']), ('\u325c', &['\x33', '\x32']), ('\u325d', &['\x33', '\x33']), - ('\u325e', &['\x33', '\x34']), ('\u325f', &['\x33', '\x35']), ('\u3260', &['\u1100']), - ('\u3261', &['\u1102']), ('\u3262', &['\u1103']), ('\u3263', &['\u1105']), ('\u3264', - &['\u1106']), ('\u3265', &['\u1107']), ('\u3266', &['\u1109']), ('\u3267', &['\u110b']), - ('\u3268', &['\u110c']), ('\u3269', &['\u110e']), ('\u326a', &['\u110f']), ('\u326b', - &['\u1110']), ('\u326c', &['\u1111']), ('\u326d', &['\u1112']), ('\u326e', &['\u1100', - '\u1161']), ('\u326f', &['\u1102', '\u1161']), ('\u3270', &['\u1103', '\u1161']), ('\u3271', - &['\u1105', '\u1161']), ('\u3272', &['\u1106', '\u1161']), ('\u3273', &['\u1107', - '\u1161']), ('\u3274', &['\u1109', '\u1161']), ('\u3275', &['\u110b', '\u1161']), ('\u3276', - &['\u110c', '\u1161']), ('\u3277', &['\u110e', '\u1161']), ('\u3278', &['\u110f', - '\u1161']), ('\u3279', &['\u1110', '\u1161']), ('\u327a', &['\u1111', '\u1161']), ('\u327b', - &['\u1112', '\u1161']), ('\u327c', &['\u110e', '\u1161', '\u11b7', '\u1100', '\u1169']), - ('\u327d', &['\u110c', '\u116e', '\u110b', '\u1174']), ('\u327e', &['\u110b', '\u116e']), - ('\u3280', &['\u4e00']), ('\u3281', &['\u4e8c']), ('\u3282', &['\u4e09']), ('\u3283', - &['\u56db']), ('\u3284', &['\u4e94']), ('\u3285', &['\u516d']), ('\u3286', &['\u4e03']), - ('\u3287', &['\u516b']), ('\u3288', &['\u4e5d']), ('\u3289', &['\u5341']), ('\u328a', - &['\u6708']), ('\u328b', &['\u706b']), ('\u328c', &['\u6c34']), ('\u328d', &['\u6728']), - ('\u328e', &['\u91d1']), ('\u328f', &['\u571f']), ('\u3290', &['\u65e5']), ('\u3291', - &['\u682a']), ('\u3292', &['\u6709']), ('\u3293', &['\u793e']), ('\u3294', &['\u540d']), - ('\u3295', &['\u7279']), ('\u3296', &['\u8ca1']), ('\u3297', &['\u795d']), ('\u3298', - &['\u52b4']), ('\u3299', &['\u79d8']), ('\u329a', &['\u7537']), ('\u329b', &['\u5973']), - ('\u329c', &['\u9069']), ('\u329d', &['\u512a']), ('\u329e', &['\u5370']), ('\u329f', - &['\u6ce8']), ('\u32a0', &['\u9805']), ('\u32a1', &['\u4f11']), ('\u32a2', &['\u5199']), - ('\u32a3', &['\u6b63']), ('\u32a4', &['\u4e0a']), ('\u32a5', &['\u4e2d']), ('\u32a6', - &['\u4e0b']), ('\u32a7', &['\u5de6']), ('\u32a8', &['\u53f3']), ('\u32a9', &['\u533b']), - ('\u32aa', &['\u5b97']), ('\u32ab', &['\u5b66']), ('\u32ac', &['\u76e3']), ('\u32ad', - &['\u4f01']), ('\u32ae', &['\u8cc7']), ('\u32af', &['\u5354']), ('\u32b0', &['\u591c']), - ('\u32b1', &['\x33', '\x36']), ('\u32b2', &['\x33', '\x37']), ('\u32b3', &['\x33', '\x38']), - ('\u32b4', &['\x33', '\x39']), ('\u32b5', &['\x34', '\x30']), ('\u32b6', &['\x34', '\x31']), - ('\u32b7', &['\x34', '\x32']), ('\u32b8', &['\x34', '\x33']), ('\u32b9', &['\x34', '\x34']), - ('\u32ba', &['\x34', '\x35']), ('\u32bb', &['\x34', '\x36']), ('\u32bc', &['\x34', '\x37']), - ('\u32bd', &['\x34', '\x38']), ('\u32be', &['\x34', '\x39']), ('\u32bf', &['\x35', '\x30']), - ('\u32c0', &['\x31', '\u6708']), ('\u32c1', &['\x32', '\u6708']), ('\u32c2', &['\x33', - '\u6708']), ('\u32c3', &['\x34', '\u6708']), ('\u32c4', &['\x35', '\u6708']), ('\u32c5', - &['\x36', '\u6708']), ('\u32c6', &['\x37', '\u6708']), ('\u32c7', &['\x38', '\u6708']), - ('\u32c8', &['\x39', '\u6708']), ('\u32c9', &['\x31', '\x30', '\u6708']), ('\u32ca', - &['\x31', '\x31', '\u6708']), ('\u32cb', &['\x31', '\x32', '\u6708']), ('\u32cc', &['\x48', - '\x67']), ('\u32cd', &['\x65', '\x72', '\x67']), ('\u32ce', &['\x65', '\x56']), ('\u32cf', - &['\x4c', '\x54', '\x44']), ('\u32d0', &['\u30a2']), ('\u32d1', &['\u30a4']), ('\u32d2', - &['\u30a6']), ('\u32d3', &['\u30a8']), ('\u32d4', &['\u30aa']), ('\u32d5', &['\u30ab']), - ('\u32d6', &['\u30ad']), ('\u32d7', &['\u30af']), ('\u32d8', &['\u30b1']), ('\u32d9', - &['\u30b3']), ('\u32da', &['\u30b5']), ('\u32db', &['\u30b7']), ('\u32dc', &['\u30b9']), - ('\u32dd', &['\u30bb']), ('\u32de', &['\u30bd']), ('\u32df', &['\u30bf']), ('\u32e0', - &['\u30c1']), ('\u32e1', &['\u30c4']), ('\u32e2', &['\u30c6']), ('\u32e3', &['\u30c8']), - ('\u32e4', &['\u30ca']), ('\u32e5', &['\u30cb']), ('\u32e6', &['\u30cc']), ('\u32e7', - &['\u30cd']), ('\u32e8', &['\u30ce']), ('\u32e9', &['\u30cf']), ('\u32ea', &['\u30d2']), - ('\u32eb', &['\u30d5']), ('\u32ec', &['\u30d8']), ('\u32ed', &['\u30db']), ('\u32ee', - &['\u30de']), ('\u32ef', &['\u30df']), ('\u32f0', &['\u30e0']), ('\u32f1', &['\u30e1']), - ('\u32f2', &['\u30e2']), ('\u32f3', &['\u30e4']), ('\u32f4', &['\u30e6']), ('\u32f5', - &['\u30e8']), ('\u32f6', &['\u30e9']), ('\u32f7', &['\u30ea']), ('\u32f8', &['\u30eb']), - ('\u32f9', &['\u30ec']), ('\u32fa', &['\u30ed']), ('\u32fb', &['\u30ef']), ('\u32fc', - &['\u30f0']), ('\u32fd', &['\u30f1']), ('\u32fe', &['\u30f2']), ('\u3300', &['\u30a2', - '\u30d1', '\u30fc', '\u30c8']), ('\u3301', &['\u30a2', '\u30eb', '\u30d5', '\u30a1']), - ('\u3302', &['\u30a2', '\u30f3', '\u30da', '\u30a2']), ('\u3303', &['\u30a2', '\u30fc', - '\u30eb']), ('\u3304', &['\u30a4', '\u30cb', '\u30f3', '\u30b0']), ('\u3305', &['\u30a4', - '\u30f3', '\u30c1']), ('\u3306', &['\u30a6', '\u30a9', '\u30f3']), ('\u3307', &['\u30a8', - '\u30b9', '\u30af', '\u30fc', '\u30c9']), ('\u3308', &['\u30a8', '\u30fc', '\u30ab', - '\u30fc']), ('\u3309', &['\u30aa', '\u30f3', '\u30b9']), ('\u330a', &['\u30aa', '\u30fc', - '\u30e0']), ('\u330b', &['\u30ab', '\u30a4', '\u30ea']), ('\u330c', &['\u30ab', '\u30e9', - '\u30c3', '\u30c8']), ('\u330d', &['\u30ab', '\u30ed', '\u30ea', '\u30fc']), ('\u330e', - &['\u30ac', '\u30ed', '\u30f3']), ('\u330f', &['\u30ac', '\u30f3', '\u30de']), ('\u3310', - &['\u30ae', '\u30ac']), ('\u3311', &['\u30ae', '\u30cb', '\u30fc']), ('\u3312', &['\u30ad', - '\u30e5', '\u30ea', '\u30fc']), ('\u3313', &['\u30ae', '\u30eb', '\u30c0', '\u30fc']), - ('\u3314', &['\u30ad', '\u30ed']), ('\u3315', &['\u30ad', '\u30ed', '\u30b0', '\u30e9', - '\u30e0']), ('\u3316', &['\u30ad', '\u30ed', '\u30e1', '\u30fc', '\u30c8', '\u30eb']), - ('\u3317', &['\u30ad', '\u30ed', '\u30ef', '\u30c3', '\u30c8']), ('\u3318', &['\u30b0', - '\u30e9', '\u30e0']), ('\u3319', &['\u30b0', '\u30e9', '\u30e0', '\u30c8', '\u30f3']), - ('\u331a', &['\u30af', '\u30eb', '\u30bc', '\u30a4', '\u30ed']), ('\u331b', &['\u30af', - '\u30ed', '\u30fc', '\u30cd']), ('\u331c', &['\u30b1', '\u30fc', '\u30b9']), ('\u331d', - &['\u30b3', '\u30eb', '\u30ca']), ('\u331e', &['\u30b3', '\u30fc', '\u30dd']), ('\u331f', - &['\u30b5', '\u30a4', '\u30af', '\u30eb']), ('\u3320', &['\u30b5', '\u30f3', '\u30c1', - '\u30fc', '\u30e0']), ('\u3321', &['\u30b7', '\u30ea', '\u30f3', '\u30b0']), ('\u3322', - &['\u30bb', '\u30f3', '\u30c1']), ('\u3323', &['\u30bb', '\u30f3', '\u30c8']), ('\u3324', - &['\u30c0', '\u30fc', '\u30b9']), ('\u3325', &['\u30c7', '\u30b7']), ('\u3326', &['\u30c9', - '\u30eb']), ('\u3327', &['\u30c8', '\u30f3']), ('\u3328', &['\u30ca', '\u30ce']), ('\u3329', - &['\u30ce', '\u30c3', '\u30c8']), ('\u332a', &['\u30cf', '\u30a4', '\u30c4']), ('\u332b', - &['\u30d1', '\u30fc', '\u30bb', '\u30f3', '\u30c8']), ('\u332c', &['\u30d1', '\u30fc', - '\u30c4']), ('\u332d', &['\u30d0', '\u30fc', '\u30ec', '\u30eb']), ('\u332e', &['\u30d4', - '\u30a2', '\u30b9', '\u30c8', '\u30eb']), ('\u332f', &['\u30d4', '\u30af', '\u30eb']), - ('\u3330', &['\u30d4', '\u30b3']), ('\u3331', &['\u30d3', '\u30eb']), ('\u3332', &['\u30d5', - '\u30a1', '\u30e9', '\u30c3', '\u30c9']), ('\u3333', &['\u30d5', '\u30a3', '\u30fc', - '\u30c8']), ('\u3334', &['\u30d6', '\u30c3', '\u30b7', '\u30a7', '\u30eb']), ('\u3335', - &['\u30d5', '\u30e9', '\u30f3']), ('\u3336', &['\u30d8', '\u30af', '\u30bf', '\u30fc', - '\u30eb']), ('\u3337', &['\u30da', '\u30bd']), ('\u3338', &['\u30da', '\u30cb', '\u30d2']), - ('\u3339', &['\u30d8', '\u30eb', '\u30c4']), ('\u333a', &['\u30da', '\u30f3', '\u30b9']), - ('\u333b', &['\u30da', '\u30fc', '\u30b8']), ('\u333c', &['\u30d9', '\u30fc', '\u30bf']), - ('\u333d', &['\u30dd', '\u30a4', '\u30f3', '\u30c8']), ('\u333e', &['\u30dc', '\u30eb', - '\u30c8']), ('\u333f', &['\u30db', '\u30f3']), ('\u3340', &['\u30dd', '\u30f3', '\u30c9']), - ('\u3341', &['\u30db', '\u30fc', '\u30eb']), ('\u3342', &['\u30db', '\u30fc', '\u30f3']), - ('\u3343', &['\u30de', '\u30a4', '\u30af', '\u30ed']), ('\u3344', &['\u30de', '\u30a4', - '\u30eb']), ('\u3345', &['\u30de', '\u30c3', '\u30cf']), ('\u3346', &['\u30de', '\u30eb', - '\u30af']), ('\u3347', &['\u30de', '\u30f3', '\u30b7', '\u30e7', '\u30f3']), ('\u3348', - &['\u30df', '\u30af', '\u30ed', '\u30f3']), ('\u3349', &['\u30df', '\u30ea']), ('\u334a', - &['\u30df', '\u30ea', '\u30d0', '\u30fc', '\u30eb']), ('\u334b', &['\u30e1', '\u30ac']), - ('\u334c', &['\u30e1', '\u30ac', '\u30c8', '\u30f3']), ('\u334d', &['\u30e1', '\u30fc', - '\u30c8', '\u30eb']), ('\u334e', &['\u30e4', '\u30fc', '\u30c9']), ('\u334f', &['\u30e4', - '\u30fc', '\u30eb']), ('\u3350', &['\u30e6', '\u30a2', '\u30f3']), ('\u3351', &['\u30ea', - '\u30c3', '\u30c8', '\u30eb']), ('\u3352', &['\u30ea', '\u30e9']), ('\u3353', &['\u30eb', - '\u30d4', '\u30fc']), ('\u3354', &['\u30eb', '\u30fc', '\u30d6', '\u30eb']), ('\u3355', - &['\u30ec', '\u30e0']), ('\u3356', &['\u30ec', '\u30f3', '\u30c8', '\u30b2', '\u30f3']), - ('\u3357', &['\u30ef', '\u30c3', '\u30c8']), ('\u3358', &['\x30', '\u70b9']), ('\u3359', - &['\x31', '\u70b9']), ('\u335a', &['\x32', '\u70b9']), ('\u335b', &['\x33', '\u70b9']), - ('\u335c', &['\x34', '\u70b9']), ('\u335d', &['\x35', '\u70b9']), ('\u335e', &['\x36', - '\u70b9']), ('\u335f', &['\x37', '\u70b9']), ('\u3360', &['\x38', '\u70b9']), ('\u3361', - &['\x39', '\u70b9']), ('\u3362', &['\x31', '\x30', '\u70b9']), ('\u3363', &['\x31', '\x31', - '\u70b9']), ('\u3364', &['\x31', '\x32', '\u70b9']), ('\u3365', &['\x31', '\x33', - '\u70b9']), ('\u3366', &['\x31', '\x34', '\u70b9']), ('\u3367', &['\x31', '\x35', - '\u70b9']), ('\u3368', &['\x31', '\x36', '\u70b9']), ('\u3369', &['\x31', '\x37', - '\u70b9']), ('\u336a', &['\x31', '\x38', '\u70b9']), ('\u336b', &['\x31', '\x39', - '\u70b9']), ('\u336c', &['\x32', '\x30', '\u70b9']), ('\u336d', &['\x32', '\x31', - '\u70b9']), ('\u336e', &['\x32', '\x32', '\u70b9']), ('\u336f', &['\x32', '\x33', - '\u70b9']), ('\u3370', &['\x32', '\x34', '\u70b9']), ('\u3371', &['\x68', '\x50', '\x61']), - ('\u3372', &['\x64', '\x61']), ('\u3373', &['\x41', '\x55']), ('\u3374', &['\x62', '\x61', - '\x72']), ('\u3375', &['\x6f', '\x56']), ('\u3376', &['\x70', '\x63']), ('\u3377', &['\x64', - '\x6d']), ('\u3378', &['\x64', '\x6d', '\xb2']), ('\u3379', &['\x64', '\x6d', '\xb3']), - ('\u337a', &['\x49', '\x55']), ('\u337b', &['\u5e73', '\u6210']), ('\u337c', &['\u662d', - '\u548c']), ('\u337d', &['\u5927', '\u6b63']), ('\u337e', &['\u660e', '\u6cbb']), ('\u337f', - &['\u682a', '\u5f0f', '\u4f1a', '\u793e']), ('\u3380', &['\x70', '\x41']), ('\u3381', - &['\x6e', '\x41']), ('\u3382', &['\u03bc', '\x41']), ('\u3383', &['\x6d', '\x41']), - ('\u3384', &['\x6b', '\x41']), ('\u3385', &['\x4b', '\x42']), ('\u3386', &['\x4d', '\x42']), - ('\u3387', &['\x47', '\x42']), ('\u3388', &['\x63', '\x61', '\x6c']), ('\u3389', &['\x6b', - '\x63', '\x61', '\x6c']), ('\u338a', &['\x70', '\x46']), ('\u338b', &['\x6e', '\x46']), - ('\u338c', &['\u03bc', '\x46']), ('\u338d', &['\u03bc', '\x67']), ('\u338e', &['\x6d', - '\x67']), ('\u338f', &['\x6b', '\x67']), ('\u3390', &['\x48', '\x7a']), ('\u3391', &['\x6b', - '\x48', '\x7a']), ('\u3392', &['\x4d', '\x48', '\x7a']), ('\u3393', &['\x47', '\x48', - '\x7a']), ('\u3394', &['\x54', '\x48', '\x7a']), ('\u3395', &['\u03bc', '\u2113']), - ('\u3396', &['\x6d', '\u2113']), ('\u3397', &['\x64', '\u2113']), ('\u3398', &['\x6b', - '\u2113']), ('\u3399', &['\x66', '\x6d']), ('\u339a', &['\x6e', '\x6d']), ('\u339b', - &['\u03bc', '\x6d']), ('\u339c', &['\x6d', '\x6d']), ('\u339d', &['\x63', '\x6d']), - ('\u339e', &['\x6b', '\x6d']), ('\u339f', &['\x6d', '\x6d', '\xb2']), ('\u33a0', &['\x63', - '\x6d', '\xb2']), ('\u33a1', &['\x6d', '\xb2']), ('\u33a2', &['\x6b', '\x6d', '\xb2']), - ('\u33a3', &['\x6d', '\x6d', '\xb3']), ('\u33a4', &['\x63', '\x6d', '\xb3']), ('\u33a5', - &['\x6d', '\xb3']), ('\u33a6', &['\x6b', '\x6d', '\xb3']), ('\u33a7', &['\x6d', '\u2215', - '\x73']), ('\u33a8', &['\x6d', '\u2215', '\x73', '\xb2']), ('\u33a9', &['\x50', '\x61']), - ('\u33aa', &['\x6b', '\x50', '\x61']), ('\u33ab', &['\x4d', '\x50', '\x61']), ('\u33ac', - &['\x47', '\x50', '\x61']), ('\u33ad', &['\x72', '\x61', '\x64']), ('\u33ae', &['\x72', - '\x61', '\x64', '\u2215', '\x73']), ('\u33af', &['\x72', '\x61', '\x64', '\u2215', '\x73', - '\xb2']), ('\u33b0', &['\x70', '\x73']), ('\u33b1', &['\x6e', '\x73']), ('\u33b2', - &['\u03bc', '\x73']), ('\u33b3', &['\x6d', '\x73']), ('\u33b4', &['\x70', '\x56']), - ('\u33b5', &['\x6e', '\x56']), ('\u33b6', &['\u03bc', '\x56']), ('\u33b7', &['\x6d', - '\x56']), ('\u33b8', &['\x6b', '\x56']), ('\u33b9', &['\x4d', '\x56']), ('\u33ba', &['\x70', - '\x57']), ('\u33bb', &['\x6e', '\x57']), ('\u33bc', &['\u03bc', '\x57']), ('\u33bd', - &['\x6d', '\x57']), ('\u33be', &['\x6b', '\x57']), ('\u33bf', &['\x4d', '\x57']), ('\u33c0', - &['\x6b', '\u03a9']), ('\u33c1', &['\x4d', '\u03a9']), ('\u33c2', &['\x61', '\x2e', '\x6d', - '\x2e']), ('\u33c3', &['\x42', '\x71']), ('\u33c4', &['\x63', '\x63']), ('\u33c5', &['\x63', - '\x64']), ('\u33c6', &['\x43', '\u2215', '\x6b', '\x67']), ('\u33c7', &['\x43', '\x6f', - '\x2e']), ('\u33c8', &['\x64', '\x42']), ('\u33c9', &['\x47', '\x79']), ('\u33ca', &['\x68', - '\x61']), ('\u33cb', &['\x48', '\x50']), ('\u33cc', &['\x69', '\x6e']), ('\u33cd', &['\x4b', - '\x4b']), ('\u33ce', &['\x4b', '\x4d']), ('\u33cf', &['\x6b', '\x74']), ('\u33d0', &['\x6c', - '\x6d']), ('\u33d1', &['\x6c', '\x6e']), ('\u33d2', &['\x6c', '\x6f', '\x67']), ('\u33d3', - &['\x6c', '\x78']), ('\u33d4', &['\x6d', '\x62']), ('\u33d5', &['\x6d', '\x69', '\x6c']), - ('\u33d6', &['\x6d', '\x6f', '\x6c']), ('\u33d7', &['\x50', '\x48']), ('\u33d8', &['\x70', - '\x2e', '\x6d', '\x2e']), ('\u33d9', &['\x50', '\x50', '\x4d']), ('\u33da', &['\x50', - '\x52']), ('\u33db', &['\x73', '\x72']), ('\u33dc', &['\x53', '\x76']), ('\u33dd', &['\x57', - '\x62']), ('\u33de', &['\x56', '\u2215', '\x6d']), ('\u33df', &['\x41', '\u2215', '\x6d']), - ('\u33e0', &['\x31', '\u65e5']), ('\u33e1', &['\x32', '\u65e5']), ('\u33e2', &['\x33', - '\u65e5']), ('\u33e3', &['\x34', '\u65e5']), ('\u33e4', &['\x35', '\u65e5']), ('\u33e5', - &['\x36', '\u65e5']), ('\u33e6', &['\x37', '\u65e5']), ('\u33e7', &['\x38', '\u65e5']), - ('\u33e8', &['\x39', '\u65e5']), ('\u33e9', &['\x31', '\x30', '\u65e5']), ('\u33ea', - &['\x31', '\x31', '\u65e5']), ('\u33eb', &['\x31', '\x32', '\u65e5']), ('\u33ec', &['\x31', - '\x33', '\u65e5']), ('\u33ed', &['\x31', '\x34', '\u65e5']), ('\u33ee', &['\x31', '\x35', - '\u65e5']), ('\u33ef', &['\x31', '\x36', '\u65e5']), ('\u33f0', &['\x31', '\x37', - '\u65e5']), ('\u33f1', &['\x31', '\x38', '\u65e5']), ('\u33f2', &['\x31', '\x39', - '\u65e5']), ('\u33f3', &['\x32', '\x30', '\u65e5']), ('\u33f4', &['\x32', '\x31', - '\u65e5']), ('\u33f5', &['\x32', '\x32', '\u65e5']), ('\u33f6', &['\x32', '\x33', - '\u65e5']), ('\u33f7', &['\x32', '\x34', '\u65e5']), ('\u33f8', &['\x32', '\x35', - '\u65e5']), ('\u33f9', &['\x32', '\x36', '\u65e5']), ('\u33fa', &['\x32', '\x37', - '\u65e5']), ('\u33fb', &['\x32', '\x38', '\u65e5']), ('\u33fc', &['\x32', '\x39', - '\u65e5']), ('\u33fd', &['\x33', '\x30', '\u65e5']), ('\u33fe', &['\x33', '\x31', - '\u65e5']), ('\u33ff', &['\x67', '\x61', '\x6c']), ('\ua770', &['\ua76f']), ('\ua7f8', - &['\u0126']), ('\ua7f9', &['\u0153']), ('\ufb00', &['\x66', '\x66']), ('\ufb01', &['\x66', - '\x69']), ('\ufb02', &['\x66', '\x6c']), ('\ufb03', &['\x66', '\x66', '\x69']), ('\ufb04', - &['\x66', '\x66', '\x6c']), ('\ufb05', &['\u017f', '\x74']), ('\ufb06', &['\x73', '\x74']), - ('\ufb13', &['\u0574', '\u0576']), ('\ufb14', &['\u0574', '\u0565']), ('\ufb15', &['\u0574', - '\u056b']), ('\ufb16', &['\u057e', '\u0576']), ('\ufb17', &['\u0574', '\u056d']), ('\ufb20', - &['\u05e2']), ('\ufb21', &['\u05d0']), ('\ufb22', &['\u05d3']), ('\ufb23', &['\u05d4']), - ('\ufb24', &['\u05db']), ('\ufb25', &['\u05dc']), ('\ufb26', &['\u05dd']), ('\ufb27', - &['\u05e8']), ('\ufb28', &['\u05ea']), ('\ufb29', &['\x2b']), ('\ufb4f', &['\u05d0', - '\u05dc']), ('\ufb50', &['\u0671']), ('\ufb51', &['\u0671']), ('\ufb52', &['\u067b']), - ('\ufb53', &['\u067b']), ('\ufb54', &['\u067b']), ('\ufb55', &['\u067b']), ('\ufb56', - &['\u067e']), ('\ufb57', &['\u067e']), ('\ufb58', &['\u067e']), ('\ufb59', &['\u067e']), - ('\ufb5a', &['\u0680']), ('\ufb5b', &['\u0680']), ('\ufb5c', &['\u0680']), ('\ufb5d', - &['\u0680']), ('\ufb5e', &['\u067a']), ('\ufb5f', &['\u067a']), ('\ufb60', &['\u067a']), - ('\ufb61', &['\u067a']), ('\ufb62', &['\u067f']), ('\ufb63', &['\u067f']), ('\ufb64', - &['\u067f']), ('\ufb65', &['\u067f']), ('\ufb66', &['\u0679']), ('\ufb67', &['\u0679']), - ('\ufb68', &['\u0679']), ('\ufb69', &['\u0679']), ('\ufb6a', &['\u06a4']), ('\ufb6b', - &['\u06a4']), ('\ufb6c', &['\u06a4']), ('\ufb6d', &['\u06a4']), ('\ufb6e', &['\u06a6']), - ('\ufb6f', &['\u06a6']), ('\ufb70', &['\u06a6']), ('\ufb71', &['\u06a6']), ('\ufb72', - &['\u0684']), ('\ufb73', &['\u0684']), ('\ufb74', &['\u0684']), ('\ufb75', &['\u0684']), - ('\ufb76', &['\u0683']), ('\ufb77', &['\u0683']), ('\ufb78', &['\u0683']), ('\ufb79', - &['\u0683']), ('\ufb7a', &['\u0686']), ('\ufb7b', &['\u0686']), ('\ufb7c', &['\u0686']), - ('\ufb7d', &['\u0686']), ('\ufb7e', &['\u0687']), ('\ufb7f', &['\u0687']), ('\ufb80', - &['\u0687']), ('\ufb81', &['\u0687']), ('\ufb82', &['\u068d']), ('\ufb83', &['\u068d']), - ('\ufb84', &['\u068c']), ('\ufb85', &['\u068c']), ('\ufb86', &['\u068e']), ('\ufb87', - &['\u068e']), ('\ufb88', &['\u0688']), ('\ufb89', &['\u0688']), ('\ufb8a', &['\u0698']), - ('\ufb8b', &['\u0698']), ('\ufb8c', &['\u0691']), ('\ufb8d', &['\u0691']), ('\ufb8e', - &['\u06a9']), ('\ufb8f', &['\u06a9']), ('\ufb90', &['\u06a9']), ('\ufb91', &['\u06a9']), - ('\ufb92', &['\u06af']), ('\ufb93', &['\u06af']), ('\ufb94', &['\u06af']), ('\ufb95', - &['\u06af']), ('\ufb96', &['\u06b3']), ('\ufb97', &['\u06b3']), ('\ufb98', &['\u06b3']), - ('\ufb99', &['\u06b3']), ('\ufb9a', &['\u06b1']), ('\ufb9b', &['\u06b1']), ('\ufb9c', - &['\u06b1']), ('\ufb9d', &['\u06b1']), ('\ufb9e', &['\u06ba']), ('\ufb9f', &['\u06ba']), - ('\ufba0', &['\u06bb']), ('\ufba1', &['\u06bb']), ('\ufba2', &['\u06bb']), ('\ufba3', - &['\u06bb']), ('\ufba4', &['\u06c0']), ('\ufba5', &['\u06c0']), ('\ufba6', &['\u06c1']), - ('\ufba7', &['\u06c1']), ('\ufba8', &['\u06c1']), ('\ufba9', &['\u06c1']), ('\ufbaa', - &['\u06be']), ('\ufbab', &['\u06be']), ('\ufbac', &['\u06be']), ('\ufbad', &['\u06be']), - ('\ufbae', &['\u06d2']), ('\ufbaf', &['\u06d2']), ('\ufbb0', &['\u06d3']), ('\ufbb1', - &['\u06d3']), ('\ufbd3', &['\u06ad']), ('\ufbd4', &['\u06ad']), ('\ufbd5', &['\u06ad']), - ('\ufbd6', &['\u06ad']), ('\ufbd7', &['\u06c7']), ('\ufbd8', &['\u06c7']), ('\ufbd9', - &['\u06c6']), ('\ufbda', &['\u06c6']), ('\ufbdb', &['\u06c8']), ('\ufbdc', &['\u06c8']), - ('\ufbdd', &['\u0677']), ('\ufbde', &['\u06cb']), ('\ufbdf', &['\u06cb']), ('\ufbe0', - &['\u06c5']), ('\ufbe1', &['\u06c5']), ('\ufbe2', &['\u06c9']), ('\ufbe3', &['\u06c9']), - ('\ufbe4', &['\u06d0']), ('\ufbe5', &['\u06d0']), ('\ufbe6', &['\u06d0']), ('\ufbe7', - &['\u06d0']), ('\ufbe8', &['\u0649']), ('\ufbe9', &['\u0649']), ('\ufbea', &['\u0626', - '\u0627']), ('\ufbeb', &['\u0626', '\u0627']), ('\ufbec', &['\u0626', '\u06d5']), ('\ufbed', - &['\u0626', '\u06d5']), ('\ufbee', &['\u0626', '\u0648']), ('\ufbef', &['\u0626', - '\u0648']), ('\ufbf0', &['\u0626', '\u06c7']), ('\ufbf1', &['\u0626', '\u06c7']), ('\ufbf2', - &['\u0626', '\u06c6']), ('\ufbf3', &['\u0626', '\u06c6']), ('\ufbf4', &['\u0626', - '\u06c8']), ('\ufbf5', &['\u0626', '\u06c8']), ('\ufbf6', &['\u0626', '\u06d0']), ('\ufbf7', - &['\u0626', '\u06d0']), ('\ufbf8', &['\u0626', '\u06d0']), ('\ufbf9', &['\u0626', - '\u0649']), ('\ufbfa', &['\u0626', '\u0649']), ('\ufbfb', &['\u0626', '\u0649']), ('\ufbfc', - &['\u06cc']), ('\ufbfd', &['\u06cc']), ('\ufbfe', &['\u06cc']), ('\ufbff', &['\u06cc']), - ('\ufc00', &['\u0626', '\u062c']), ('\ufc01', &['\u0626', '\u062d']), ('\ufc02', &['\u0626', - '\u0645']), ('\ufc03', &['\u0626', '\u0649']), ('\ufc04', &['\u0626', '\u064a']), ('\ufc05', - &['\u0628', '\u062c']), ('\ufc06', &['\u0628', '\u062d']), ('\ufc07', &['\u0628', - '\u062e']), ('\ufc08', &['\u0628', '\u0645']), ('\ufc09', &['\u0628', '\u0649']), ('\ufc0a', - &['\u0628', '\u064a']), ('\ufc0b', &['\u062a', '\u062c']), ('\ufc0c', &['\u062a', - '\u062d']), ('\ufc0d', &['\u062a', '\u062e']), ('\ufc0e', &['\u062a', '\u0645']), ('\ufc0f', - &['\u062a', '\u0649']), ('\ufc10', &['\u062a', '\u064a']), ('\ufc11', &['\u062b', - '\u062c']), ('\ufc12', &['\u062b', '\u0645']), ('\ufc13', &['\u062b', '\u0649']), ('\ufc14', - &['\u062b', '\u064a']), ('\ufc15', &['\u062c', '\u062d']), ('\ufc16', &['\u062c', - '\u0645']), ('\ufc17', &['\u062d', '\u062c']), ('\ufc18', &['\u062d', '\u0645']), ('\ufc19', - &['\u062e', '\u062c']), ('\ufc1a', &['\u062e', '\u062d']), ('\ufc1b', &['\u062e', - '\u0645']), ('\ufc1c', &['\u0633', '\u062c']), ('\ufc1d', &['\u0633', '\u062d']), ('\ufc1e', - &['\u0633', '\u062e']), ('\ufc1f', &['\u0633', '\u0645']), ('\ufc20', &['\u0635', - '\u062d']), ('\ufc21', &['\u0635', '\u0645']), ('\ufc22', &['\u0636', '\u062c']), ('\ufc23', - &['\u0636', '\u062d']), ('\ufc24', &['\u0636', '\u062e']), ('\ufc25', &['\u0636', - '\u0645']), ('\ufc26', &['\u0637', '\u062d']), ('\ufc27', &['\u0637', '\u0645']), ('\ufc28', - &['\u0638', '\u0645']), ('\ufc29', &['\u0639', '\u062c']), ('\ufc2a', &['\u0639', - '\u0645']), ('\ufc2b', &['\u063a', '\u062c']), ('\ufc2c', &['\u063a', '\u0645']), ('\ufc2d', - &['\u0641', '\u062c']), ('\ufc2e', &['\u0641', '\u062d']), ('\ufc2f', &['\u0641', - '\u062e']), ('\ufc30', &['\u0641', '\u0645']), ('\ufc31', &['\u0641', '\u0649']), ('\ufc32', - &['\u0641', '\u064a']), ('\ufc33', &['\u0642', '\u062d']), ('\ufc34', &['\u0642', - '\u0645']), ('\ufc35', &['\u0642', '\u0649']), ('\ufc36', &['\u0642', '\u064a']), ('\ufc37', - &['\u0643', '\u0627']), ('\ufc38', &['\u0643', '\u062c']), ('\ufc39', &['\u0643', - '\u062d']), ('\ufc3a', &['\u0643', '\u062e']), ('\ufc3b', &['\u0643', '\u0644']), ('\ufc3c', - &['\u0643', '\u0645']), ('\ufc3d', &['\u0643', '\u0649']), ('\ufc3e', &['\u0643', - '\u064a']), ('\ufc3f', &['\u0644', '\u062c']), ('\ufc40', &['\u0644', '\u062d']), ('\ufc41', - &['\u0644', '\u062e']), ('\ufc42', &['\u0644', '\u0645']), ('\ufc43', &['\u0644', - '\u0649']), ('\ufc44', &['\u0644', '\u064a']), ('\ufc45', &['\u0645', '\u062c']), ('\ufc46', - &['\u0645', '\u062d']), ('\ufc47', &['\u0645', '\u062e']), ('\ufc48', &['\u0645', - '\u0645']), ('\ufc49', &['\u0645', '\u0649']), ('\ufc4a', &['\u0645', '\u064a']), ('\ufc4b', - &['\u0646', '\u062c']), ('\ufc4c', &['\u0646', '\u062d']), ('\ufc4d', &['\u0646', - '\u062e']), ('\ufc4e', &['\u0646', '\u0645']), ('\ufc4f', &['\u0646', '\u0649']), ('\ufc50', - &['\u0646', '\u064a']), ('\ufc51', &['\u0647', '\u062c']), ('\ufc52', &['\u0647', - '\u0645']), ('\ufc53', &['\u0647', '\u0649']), ('\ufc54', &['\u0647', '\u064a']), ('\ufc55', - &['\u064a', '\u062c']), ('\ufc56', &['\u064a', '\u062d']), ('\ufc57', &['\u064a', - '\u062e']), ('\ufc58', &['\u064a', '\u0645']), ('\ufc59', &['\u064a', '\u0649']), ('\ufc5a', - &['\u064a', '\u064a']), ('\ufc5b', &['\u0630', '\u0670']), ('\ufc5c', &['\u0631', - '\u0670']), ('\ufc5d', &['\u0649', '\u0670']), ('\ufc5e', &['\x20', '\u064c', '\u0651']), - ('\ufc5f', &['\x20', '\u064d', '\u0651']), ('\ufc60', &['\x20', '\u064e', '\u0651']), - ('\ufc61', &['\x20', '\u064f', '\u0651']), ('\ufc62', &['\x20', '\u0650', '\u0651']), - ('\ufc63', &['\x20', '\u0651', '\u0670']), ('\ufc64', &['\u0626', '\u0631']), ('\ufc65', - &['\u0626', '\u0632']), ('\ufc66', &['\u0626', '\u0645']), ('\ufc67', &['\u0626', - '\u0646']), ('\ufc68', &['\u0626', '\u0649']), ('\ufc69', &['\u0626', '\u064a']), ('\ufc6a', - &['\u0628', '\u0631']), ('\ufc6b', &['\u0628', '\u0632']), ('\ufc6c', &['\u0628', - '\u0645']), ('\ufc6d', &['\u0628', '\u0646']), ('\ufc6e', &['\u0628', '\u0649']), ('\ufc6f', - &['\u0628', '\u064a']), ('\ufc70', &['\u062a', '\u0631']), ('\ufc71', &['\u062a', - '\u0632']), ('\ufc72', &['\u062a', '\u0645']), ('\ufc73', &['\u062a', '\u0646']), ('\ufc74', - &['\u062a', '\u0649']), ('\ufc75', &['\u062a', '\u064a']), ('\ufc76', &['\u062b', - '\u0631']), ('\ufc77', &['\u062b', '\u0632']), ('\ufc78', &['\u062b', '\u0645']), ('\ufc79', - &['\u062b', '\u0646']), ('\ufc7a', &['\u062b', '\u0649']), ('\ufc7b', &['\u062b', - '\u064a']), ('\ufc7c', &['\u0641', '\u0649']), ('\ufc7d', &['\u0641', '\u064a']), ('\ufc7e', - &['\u0642', '\u0649']), ('\ufc7f', &['\u0642', '\u064a']), ('\ufc80', &['\u0643', - '\u0627']), ('\ufc81', &['\u0643', '\u0644']), ('\ufc82', &['\u0643', '\u0645']), ('\ufc83', - &['\u0643', '\u0649']), ('\ufc84', &['\u0643', '\u064a']), ('\ufc85', &['\u0644', - '\u0645']), ('\ufc86', &['\u0644', '\u0649']), ('\ufc87', &['\u0644', '\u064a']), ('\ufc88', - &['\u0645', '\u0627']), ('\ufc89', &['\u0645', '\u0645']), ('\ufc8a', &['\u0646', - '\u0631']), ('\ufc8b', &['\u0646', '\u0632']), ('\ufc8c', &['\u0646', '\u0645']), ('\ufc8d', - &['\u0646', '\u0646']), ('\ufc8e', &['\u0646', '\u0649']), ('\ufc8f', &['\u0646', - '\u064a']), ('\ufc90', &['\u0649', '\u0670']), ('\ufc91', &['\u064a', '\u0631']), ('\ufc92', - &['\u064a', '\u0632']), ('\ufc93', &['\u064a', '\u0645']), ('\ufc94', &['\u064a', - '\u0646']), ('\ufc95', &['\u064a', '\u0649']), ('\ufc96', &['\u064a', '\u064a']), ('\ufc97', - &['\u0626', '\u062c']), ('\ufc98', &['\u0626', '\u062d']), ('\ufc99', &['\u0626', - '\u062e']), ('\ufc9a', &['\u0626', '\u0645']), ('\ufc9b', &['\u0626', '\u0647']), ('\ufc9c', - &['\u0628', '\u062c']), ('\ufc9d', &['\u0628', '\u062d']), ('\ufc9e', &['\u0628', - '\u062e']), ('\ufc9f', &['\u0628', '\u0645']), ('\ufca0', &['\u0628', '\u0647']), ('\ufca1', - &['\u062a', '\u062c']), ('\ufca2', &['\u062a', '\u062d']), ('\ufca3', &['\u062a', - '\u062e']), ('\ufca4', &['\u062a', '\u0645']), ('\ufca5', &['\u062a', '\u0647']), ('\ufca6', - &['\u062b', '\u0645']), ('\ufca7', &['\u062c', '\u062d']), ('\ufca8', &['\u062c', - '\u0645']), ('\ufca9', &['\u062d', '\u062c']), ('\ufcaa', &['\u062d', '\u0645']), ('\ufcab', - &['\u062e', '\u062c']), ('\ufcac', &['\u062e', '\u0645']), ('\ufcad', &['\u0633', - '\u062c']), ('\ufcae', &['\u0633', '\u062d']), ('\ufcaf', &['\u0633', '\u062e']), ('\ufcb0', - &['\u0633', '\u0645']), ('\ufcb1', &['\u0635', '\u062d']), ('\ufcb2', &['\u0635', - '\u062e']), ('\ufcb3', &['\u0635', '\u0645']), ('\ufcb4', &['\u0636', '\u062c']), ('\ufcb5', - &['\u0636', '\u062d']), ('\ufcb6', &['\u0636', '\u062e']), ('\ufcb7', &['\u0636', - '\u0645']), ('\ufcb8', &['\u0637', '\u062d']), ('\ufcb9', &['\u0638', '\u0645']), ('\ufcba', - &['\u0639', '\u062c']), ('\ufcbb', &['\u0639', '\u0645']), ('\ufcbc', &['\u063a', - '\u062c']), ('\ufcbd', &['\u063a', '\u0645']), ('\ufcbe', &['\u0641', '\u062c']), ('\ufcbf', - &['\u0641', '\u062d']), ('\ufcc0', &['\u0641', '\u062e']), ('\ufcc1', &['\u0641', - '\u0645']), ('\ufcc2', &['\u0642', '\u062d']), ('\ufcc3', &['\u0642', '\u0645']), ('\ufcc4', - &['\u0643', '\u062c']), ('\ufcc5', &['\u0643', '\u062d']), ('\ufcc6', &['\u0643', - '\u062e']), ('\ufcc7', &['\u0643', '\u0644']), ('\ufcc8', &['\u0643', '\u0645']), ('\ufcc9', - &['\u0644', '\u062c']), ('\ufcca', &['\u0644', '\u062d']), ('\ufccb', &['\u0644', - '\u062e']), ('\ufccc', &['\u0644', '\u0645']), ('\ufccd', &['\u0644', '\u0647']), ('\ufcce', - &['\u0645', '\u062c']), ('\ufccf', &['\u0645', '\u062d']), ('\ufcd0', &['\u0645', - '\u062e']), ('\ufcd1', &['\u0645', '\u0645']), ('\ufcd2', &['\u0646', '\u062c']), ('\ufcd3', - &['\u0646', '\u062d']), ('\ufcd4', &['\u0646', '\u062e']), ('\ufcd5', &['\u0646', - '\u0645']), ('\ufcd6', &['\u0646', '\u0647']), ('\ufcd7', &['\u0647', '\u062c']), ('\ufcd8', - &['\u0647', '\u0645']), ('\ufcd9', &['\u0647', '\u0670']), ('\ufcda', &['\u064a', - '\u062c']), ('\ufcdb', &['\u064a', '\u062d']), ('\ufcdc', &['\u064a', '\u062e']), ('\ufcdd', - &['\u064a', '\u0645']), ('\ufcde', &['\u064a', '\u0647']), ('\ufcdf', &['\u0626', - '\u0645']), ('\ufce0', &['\u0626', '\u0647']), ('\ufce1', &['\u0628', '\u0645']), ('\ufce2', - &['\u0628', '\u0647']), ('\ufce3', &['\u062a', '\u0645']), ('\ufce4', &['\u062a', - '\u0647']), ('\ufce5', &['\u062b', '\u0645']), ('\ufce6', &['\u062b', '\u0647']), ('\ufce7', - &['\u0633', '\u0645']), ('\ufce8', &['\u0633', '\u0647']), ('\ufce9', &['\u0634', - '\u0645']), ('\ufcea', &['\u0634', '\u0647']), ('\ufceb', &['\u0643', '\u0644']), ('\ufcec', - &['\u0643', '\u0645']), ('\ufced', &['\u0644', '\u0645']), ('\ufcee', &['\u0646', - '\u0645']), ('\ufcef', &['\u0646', '\u0647']), ('\ufcf0', &['\u064a', '\u0645']), ('\ufcf1', - &['\u064a', '\u0647']), ('\ufcf2', &['\u0640', '\u064e', '\u0651']), ('\ufcf3', &['\u0640', - '\u064f', '\u0651']), ('\ufcf4', &['\u0640', '\u0650', '\u0651']), ('\ufcf5', &['\u0637', - '\u0649']), ('\ufcf6', &['\u0637', '\u064a']), ('\ufcf7', &['\u0639', '\u0649']), ('\ufcf8', - &['\u0639', '\u064a']), ('\ufcf9', &['\u063a', '\u0649']), ('\ufcfa', &['\u063a', - '\u064a']), ('\ufcfb', &['\u0633', '\u0649']), ('\ufcfc', &['\u0633', '\u064a']), ('\ufcfd', - &['\u0634', '\u0649']), ('\ufcfe', &['\u0634', '\u064a']), ('\ufcff', &['\u062d', - '\u0649']), ('\ufd00', &['\u062d', '\u064a']), ('\ufd01', &['\u062c', '\u0649']), ('\ufd02', - &['\u062c', '\u064a']), ('\ufd03', &['\u062e', '\u0649']), ('\ufd04', &['\u062e', - '\u064a']), ('\ufd05', &['\u0635', '\u0649']), ('\ufd06', &['\u0635', '\u064a']), ('\ufd07', - &['\u0636', '\u0649']), ('\ufd08', &['\u0636', '\u064a']), ('\ufd09', &['\u0634', - '\u062c']), ('\ufd0a', &['\u0634', '\u062d']), ('\ufd0b', &['\u0634', '\u062e']), ('\ufd0c', - &['\u0634', '\u0645']), ('\ufd0d', &['\u0634', '\u0631']), ('\ufd0e', &['\u0633', - '\u0631']), ('\ufd0f', &['\u0635', '\u0631']), ('\ufd10', &['\u0636', '\u0631']), ('\ufd11', - &['\u0637', '\u0649']), ('\ufd12', &['\u0637', '\u064a']), ('\ufd13', &['\u0639', - '\u0649']), ('\ufd14', &['\u0639', '\u064a']), ('\ufd15', &['\u063a', '\u0649']), ('\ufd16', - &['\u063a', '\u064a']), ('\ufd17', &['\u0633', '\u0649']), ('\ufd18', &['\u0633', - '\u064a']), ('\ufd19', &['\u0634', '\u0649']), ('\ufd1a', &['\u0634', '\u064a']), ('\ufd1b', - &['\u062d', '\u0649']), ('\ufd1c', &['\u062d', '\u064a']), ('\ufd1d', &['\u062c', - '\u0649']), ('\ufd1e', &['\u062c', '\u064a']), ('\ufd1f', &['\u062e', '\u0649']), ('\ufd20', - &['\u062e', '\u064a']), ('\ufd21', &['\u0635', '\u0649']), ('\ufd22', &['\u0635', - '\u064a']), ('\ufd23', &['\u0636', '\u0649']), ('\ufd24', &['\u0636', '\u064a']), ('\ufd25', - &['\u0634', '\u062c']), ('\ufd26', &['\u0634', '\u062d']), ('\ufd27', &['\u0634', - '\u062e']), ('\ufd28', &['\u0634', '\u0645']), ('\ufd29', &['\u0634', '\u0631']), ('\ufd2a', - &['\u0633', '\u0631']), ('\ufd2b', &['\u0635', '\u0631']), ('\ufd2c', &['\u0636', - '\u0631']), ('\ufd2d', &['\u0634', '\u062c']), ('\ufd2e', &['\u0634', '\u062d']), ('\ufd2f', - &['\u0634', '\u062e']), ('\ufd30', &['\u0634', '\u0645']), ('\ufd31', &['\u0633', - '\u0647']), ('\ufd32', &['\u0634', '\u0647']), ('\ufd33', &['\u0637', '\u0645']), ('\ufd34', - &['\u0633', '\u062c']), ('\ufd35', &['\u0633', '\u062d']), ('\ufd36', &['\u0633', - '\u062e']), ('\ufd37', &['\u0634', '\u062c']), ('\ufd38', &['\u0634', '\u062d']), ('\ufd39', - &['\u0634', '\u062e']), ('\ufd3a', &['\u0637', '\u0645']), ('\ufd3b', &['\u0638', - '\u0645']), ('\ufd3c', &['\u0627', '\u064b']), ('\ufd3d', &['\u0627', '\u064b']), ('\ufd50', - &['\u062a', '\u062c', '\u0645']), ('\ufd51', &['\u062a', '\u062d', '\u062c']), ('\ufd52', - &['\u062a', '\u062d', '\u062c']), ('\ufd53', &['\u062a', '\u062d', '\u0645']), ('\ufd54', - &['\u062a', '\u062e', '\u0645']), ('\ufd55', &['\u062a', '\u0645', '\u062c']), ('\ufd56', - &['\u062a', '\u0645', '\u062d']), ('\ufd57', &['\u062a', '\u0645', '\u062e']), ('\ufd58', - &['\u062c', '\u0645', '\u062d']), ('\ufd59', &['\u062c', '\u0645', '\u062d']), ('\ufd5a', - &['\u062d', '\u0645', '\u064a']), ('\ufd5b', &['\u062d', '\u0645', '\u0649']), ('\ufd5c', - &['\u0633', '\u062d', '\u062c']), ('\ufd5d', &['\u0633', '\u062c', '\u062d']), ('\ufd5e', - &['\u0633', '\u062c', '\u0649']), ('\ufd5f', &['\u0633', '\u0645', '\u062d']), ('\ufd60', - &['\u0633', '\u0645', '\u062d']), ('\ufd61', &['\u0633', '\u0645', '\u062c']), ('\ufd62', - &['\u0633', '\u0645', '\u0645']), ('\ufd63', &['\u0633', '\u0645', '\u0645']), ('\ufd64', - &['\u0635', '\u062d', '\u062d']), ('\ufd65', &['\u0635', '\u062d', '\u062d']), ('\ufd66', - &['\u0635', '\u0645', '\u0645']), ('\ufd67', &['\u0634', '\u062d', '\u0645']), ('\ufd68', - &['\u0634', '\u062d', '\u0645']), ('\ufd69', &['\u0634', '\u062c', '\u064a']), ('\ufd6a', - &['\u0634', '\u0645', '\u062e']), ('\ufd6b', &['\u0634', '\u0645', '\u062e']), ('\ufd6c', - &['\u0634', '\u0645', '\u0645']), ('\ufd6d', &['\u0634', '\u0645', '\u0645']), ('\ufd6e', - &['\u0636', '\u062d', '\u0649']), ('\ufd6f', &['\u0636', '\u062e', '\u0645']), ('\ufd70', - &['\u0636', '\u062e', '\u0645']), ('\ufd71', &['\u0637', '\u0645', '\u062d']), ('\ufd72', - &['\u0637', '\u0645', '\u062d']), ('\ufd73', &['\u0637', '\u0645', '\u0645']), ('\ufd74', - &['\u0637', '\u0645', '\u064a']), ('\ufd75', &['\u0639', '\u062c', '\u0645']), ('\ufd76', - &['\u0639', '\u0645', '\u0645']), ('\ufd77', &['\u0639', '\u0645', '\u0645']), ('\ufd78', - &['\u0639', '\u0645', '\u0649']), ('\ufd79', &['\u063a', '\u0645', '\u0645']), ('\ufd7a', - &['\u063a', '\u0645', '\u064a']), ('\ufd7b', &['\u063a', '\u0645', '\u0649']), ('\ufd7c', - &['\u0641', '\u062e', '\u0645']), ('\ufd7d', &['\u0641', '\u062e', '\u0645']), ('\ufd7e', - &['\u0642', '\u0645', '\u062d']), ('\ufd7f', &['\u0642', '\u0645', '\u0645']), ('\ufd80', - &['\u0644', '\u062d', '\u0645']), ('\ufd81', &['\u0644', '\u062d', '\u064a']), ('\ufd82', - &['\u0644', '\u062d', '\u0649']), ('\ufd83', &['\u0644', '\u062c', '\u062c']), ('\ufd84', - &['\u0644', '\u062c', '\u062c']), ('\ufd85', &['\u0644', '\u062e', '\u0645']), ('\ufd86', - &['\u0644', '\u062e', '\u0645']), ('\ufd87', &['\u0644', '\u0645', '\u062d']), ('\ufd88', - &['\u0644', '\u0645', '\u062d']), ('\ufd89', &['\u0645', '\u062d', '\u062c']), ('\ufd8a', - &['\u0645', '\u062d', '\u0645']), ('\ufd8b', &['\u0645', '\u062d', '\u064a']), ('\ufd8c', - &['\u0645', '\u062c', '\u062d']), ('\ufd8d', &['\u0645', '\u062c', '\u0645']), ('\ufd8e', - &['\u0645', '\u062e', '\u062c']), ('\ufd8f', &['\u0645', '\u062e', '\u0645']), ('\ufd92', - &['\u0645', '\u062c', '\u062e']), ('\ufd93', &['\u0647', '\u0645', '\u062c']), ('\ufd94', - &['\u0647', '\u0645', '\u0645']), ('\ufd95', &['\u0646', '\u062d', '\u0645']), ('\ufd96', - &['\u0646', '\u062d', '\u0649']), ('\ufd97', &['\u0646', '\u062c', '\u0645']), ('\ufd98', - &['\u0646', '\u062c', '\u0645']), ('\ufd99', &['\u0646', '\u062c', '\u0649']), ('\ufd9a', - &['\u0646', '\u0645', '\u064a']), ('\ufd9b', &['\u0646', '\u0645', '\u0649']), ('\ufd9c', - &['\u064a', '\u0645', '\u0645']), ('\ufd9d', &['\u064a', '\u0645', '\u0645']), ('\ufd9e', - &['\u0628', '\u062e', '\u064a']), ('\ufd9f', &['\u062a', '\u062c', '\u064a']), ('\ufda0', - &['\u062a', '\u062c', '\u0649']), ('\ufda1', &['\u062a', '\u062e', '\u064a']), ('\ufda2', - &['\u062a', '\u062e', '\u0649']), ('\ufda3', &['\u062a', '\u0645', '\u064a']), ('\ufda4', - &['\u062a', '\u0645', '\u0649']), ('\ufda5', &['\u062c', '\u0645', '\u064a']), ('\ufda6', - &['\u062c', '\u062d', '\u0649']), ('\ufda7', &['\u062c', '\u0645', '\u0649']), ('\ufda8', - &['\u0633', '\u062e', '\u0649']), ('\ufda9', &['\u0635', '\u062d', '\u064a']), ('\ufdaa', - &['\u0634', '\u062d', '\u064a']), ('\ufdab', &['\u0636', '\u062d', '\u064a']), ('\ufdac', - &['\u0644', '\u062c', '\u064a']), ('\ufdad', &['\u0644', '\u0645', '\u064a']), ('\ufdae', - &['\u064a', '\u062d', '\u064a']), ('\ufdaf', &['\u064a', '\u062c', '\u064a']), ('\ufdb0', - &['\u064a', '\u0645', '\u064a']), ('\ufdb1', &['\u0645', '\u0645', '\u064a']), ('\ufdb2', - &['\u0642', '\u0645', '\u064a']), ('\ufdb3', &['\u0646', '\u062d', '\u064a']), ('\ufdb4', - &['\u0642', '\u0645', '\u062d']), ('\ufdb5', &['\u0644', '\u062d', '\u0645']), ('\ufdb6', - &['\u0639', '\u0645', '\u064a']), ('\ufdb7', &['\u0643', '\u0645', '\u064a']), ('\ufdb8', - &['\u0646', '\u062c', '\u062d']), ('\ufdb9', &['\u0645', '\u062e', '\u064a']), ('\ufdba', - &['\u0644', '\u062c', '\u0645']), ('\ufdbb', &['\u0643', '\u0645', '\u0645']), ('\ufdbc', - &['\u0644', '\u062c', '\u0645']), ('\ufdbd', &['\u0646', '\u062c', '\u062d']), ('\ufdbe', - &['\u062c', '\u062d', '\u064a']), ('\ufdbf', &['\u062d', '\u062c', '\u064a']), ('\ufdc0', - &['\u0645', '\u062c', '\u064a']), ('\ufdc1', &['\u0641', '\u0645', '\u064a']), ('\ufdc2', - &['\u0628', '\u062d', '\u064a']), ('\ufdc3', &['\u0643', '\u0645', '\u0645']), ('\ufdc4', - &['\u0639', '\u062c', '\u0645']), ('\ufdc5', &['\u0635', '\u0645', '\u0645']), ('\ufdc6', - &['\u0633', '\u062e', '\u064a']), ('\ufdc7', &['\u0646', '\u062c', '\u064a']), ('\ufdf0', - &['\u0635', '\u0644', '\u06d2']), ('\ufdf1', &['\u0642', '\u0644', '\u06d2']), ('\ufdf2', - &['\u0627', '\u0644', '\u0644', '\u0647']), ('\ufdf3', &['\u0627', '\u0643', '\u0628', - '\u0631']), ('\ufdf4', &['\u0645', '\u062d', '\u0645', '\u062f']), ('\ufdf5', &['\u0635', - '\u0644', '\u0639', '\u0645']), ('\ufdf6', &['\u0631', '\u0633', '\u0648', '\u0644']), - ('\ufdf7', &['\u0639', '\u0644', '\u064a', '\u0647']), ('\ufdf8', &['\u0648', '\u0633', - '\u0644', '\u0645']), ('\ufdf9', &['\u0635', '\u0644', '\u0649']), ('\ufdfa', &['\u0635', - '\u0644', '\u0649', '\x20', '\u0627', '\u0644', '\u0644', '\u0647', '\x20', '\u0639', - '\u0644', '\u064a', '\u0647', '\x20', '\u0648', '\u0633', '\u0644', '\u0645']), ('\ufdfb', - &['\u062c', '\u0644', '\x20', '\u062c', '\u0644', '\u0627', '\u0644', '\u0647']), ('\ufdfc', - &['\u0631', '\u06cc', '\u0627', '\u0644']), ('\ufe10', &['\x2c']), ('\ufe11', &['\u3001']), - ('\ufe12', &['\u3002']), ('\ufe13', &['\x3a']), ('\ufe14', &['\x3b']), ('\ufe15', - &['\x21']), ('\ufe16', &['\x3f']), ('\ufe17', &['\u3016']), ('\ufe18', &['\u3017']), - ('\ufe19', &['\u2026']), ('\ufe30', &['\u2025']), ('\ufe31', &['\u2014']), ('\ufe32', - &['\u2013']), ('\ufe33', &['\x5f']), ('\ufe34', &['\x5f']), ('\ufe35', &['\x28']), - ('\ufe36', &['\x29']), ('\ufe37', &['\x7b']), ('\ufe38', &['\x7d']), ('\ufe39', - &['\u3014']), ('\ufe3a', &['\u3015']), ('\ufe3b', &['\u3010']), ('\ufe3c', &['\u3011']), - ('\ufe3d', &['\u300a']), ('\ufe3e', &['\u300b']), ('\ufe3f', &['\u3008']), ('\ufe40', - &['\u3009']), ('\ufe41', &['\u300c']), ('\ufe42', &['\u300d']), ('\ufe43', &['\u300e']), - ('\ufe44', &['\u300f']), ('\ufe47', &['\x5b']), ('\ufe48', &['\x5d']), ('\ufe49', - &['\u203e']), ('\ufe4a', &['\u203e']), ('\ufe4b', &['\u203e']), ('\ufe4c', &['\u203e']), - ('\ufe4d', &['\x5f']), ('\ufe4e', &['\x5f']), ('\ufe4f', &['\x5f']), ('\ufe50', &['\x2c']), - ('\ufe51', &['\u3001']), ('\ufe52', &['\x2e']), ('\ufe54', &['\x3b']), ('\ufe55', - &['\x3a']), ('\ufe56', &['\x3f']), ('\ufe57', &['\x21']), ('\ufe58', &['\u2014']), - ('\ufe59', &['\x28']), ('\ufe5a', &['\x29']), ('\ufe5b', &['\x7b']), ('\ufe5c', &['\x7d']), - ('\ufe5d', &['\u3014']), ('\ufe5e', &['\u3015']), ('\ufe5f', &['\x23']), ('\ufe60', - &['\x26']), ('\ufe61', &['\x2a']), ('\ufe62', &['\x2b']), ('\ufe63', &['\x2d']), ('\ufe64', - &['\x3c']), ('\ufe65', &['\x3e']), ('\ufe66', &['\x3d']), ('\ufe68', &['\x5c']), ('\ufe69', - &['\x24']), ('\ufe6a', &['\x25']), ('\ufe6b', &['\x40']), ('\ufe70', &['\x20', '\u064b']), - ('\ufe71', &['\u0640', '\u064b']), ('\ufe72', &['\x20', '\u064c']), ('\ufe74', &['\x20', - '\u064d']), ('\ufe76', &['\x20', '\u064e']), ('\ufe77', &['\u0640', '\u064e']), ('\ufe78', - &['\x20', '\u064f']), ('\ufe79', &['\u0640', '\u064f']), ('\ufe7a', &['\x20', '\u0650']), - ('\ufe7b', &['\u0640', '\u0650']), ('\ufe7c', &['\x20', '\u0651']), ('\ufe7d', &['\u0640', - '\u0651']), ('\ufe7e', &['\x20', '\u0652']), ('\ufe7f', &['\u0640', '\u0652']), ('\ufe80', - &['\u0621']), ('\ufe81', &['\u0622']), ('\ufe82', &['\u0622']), ('\ufe83', &['\u0623']), - ('\ufe84', &['\u0623']), ('\ufe85', &['\u0624']), ('\ufe86', &['\u0624']), ('\ufe87', - &['\u0625']), ('\ufe88', &['\u0625']), ('\ufe89', &['\u0626']), ('\ufe8a', &['\u0626']), - ('\ufe8b', &['\u0626']), ('\ufe8c', &['\u0626']), ('\ufe8d', &['\u0627']), ('\ufe8e', - &['\u0627']), ('\ufe8f', &['\u0628']), ('\ufe90', &['\u0628']), ('\ufe91', &['\u0628']), - ('\ufe92', &['\u0628']), ('\ufe93', &['\u0629']), ('\ufe94', &['\u0629']), ('\ufe95', - &['\u062a']), ('\ufe96', &['\u062a']), ('\ufe97', &['\u062a']), ('\ufe98', &['\u062a']), - ('\ufe99', &['\u062b']), ('\ufe9a', &['\u062b']), ('\ufe9b', &['\u062b']), ('\ufe9c', - &['\u062b']), ('\ufe9d', &['\u062c']), ('\ufe9e', &['\u062c']), ('\ufe9f', &['\u062c']), - ('\ufea0', &['\u062c']), ('\ufea1', &['\u062d']), ('\ufea2', &['\u062d']), ('\ufea3', - &['\u062d']), ('\ufea4', &['\u062d']), ('\ufea5', &['\u062e']), ('\ufea6', &['\u062e']), - ('\ufea7', &['\u062e']), ('\ufea8', &['\u062e']), ('\ufea9', &['\u062f']), ('\ufeaa', - &['\u062f']), ('\ufeab', &['\u0630']), ('\ufeac', &['\u0630']), ('\ufead', &['\u0631']), - ('\ufeae', &['\u0631']), ('\ufeaf', &['\u0632']), ('\ufeb0', &['\u0632']), ('\ufeb1', - &['\u0633']), ('\ufeb2', &['\u0633']), ('\ufeb3', &['\u0633']), ('\ufeb4', &['\u0633']), - ('\ufeb5', &['\u0634']), ('\ufeb6', &['\u0634']), ('\ufeb7', &['\u0634']), ('\ufeb8', - &['\u0634']), ('\ufeb9', &['\u0635']), ('\ufeba', &['\u0635']), ('\ufebb', &['\u0635']), - ('\ufebc', &['\u0635']), ('\ufebd', &['\u0636']), ('\ufebe', &['\u0636']), ('\ufebf', - &['\u0636']), ('\ufec0', &['\u0636']), ('\ufec1', &['\u0637']), ('\ufec2', &['\u0637']), - ('\ufec3', &['\u0637']), ('\ufec4', &['\u0637']), ('\ufec5', &['\u0638']), ('\ufec6', - &['\u0638']), ('\ufec7', &['\u0638']), ('\ufec8', &['\u0638']), ('\ufec9', &['\u0639']), - ('\ufeca', &['\u0639']), ('\ufecb', &['\u0639']), ('\ufecc', &['\u0639']), ('\ufecd', - &['\u063a']), ('\ufece', &['\u063a']), ('\ufecf', &['\u063a']), ('\ufed0', &['\u063a']), - ('\ufed1', &['\u0641']), ('\ufed2', &['\u0641']), ('\ufed3', &['\u0641']), ('\ufed4', - &['\u0641']), ('\ufed5', &['\u0642']), ('\ufed6', &['\u0642']), ('\ufed7', &['\u0642']), - ('\ufed8', &['\u0642']), ('\ufed9', &['\u0643']), ('\ufeda', &['\u0643']), ('\ufedb', - &['\u0643']), ('\ufedc', &['\u0643']), ('\ufedd', &['\u0644']), ('\ufede', &['\u0644']), - ('\ufedf', &['\u0644']), ('\ufee0', &['\u0644']), ('\ufee1', &['\u0645']), ('\ufee2', - &['\u0645']), ('\ufee3', &['\u0645']), ('\ufee4', &['\u0645']), ('\ufee5', &['\u0646']), - ('\ufee6', &['\u0646']), ('\ufee7', &['\u0646']), ('\ufee8', &['\u0646']), ('\ufee9', - &['\u0647']), ('\ufeea', &['\u0647']), ('\ufeeb', &['\u0647']), ('\ufeec', &['\u0647']), - ('\ufeed', &['\u0648']), ('\ufeee', &['\u0648']), ('\ufeef', &['\u0649']), ('\ufef0', - &['\u0649']), ('\ufef1', &['\u064a']), ('\ufef2', &['\u064a']), ('\ufef3', &['\u064a']), - ('\ufef4', &['\u064a']), ('\ufef5', &['\u0644', '\u0622']), ('\ufef6', &['\u0644', - '\u0622']), ('\ufef7', &['\u0644', '\u0623']), ('\ufef8', &['\u0644', '\u0623']), ('\ufef9', - &['\u0644', '\u0625']), ('\ufefa', &['\u0644', '\u0625']), ('\ufefb', &['\u0644', - '\u0627']), ('\ufefc', &['\u0644', '\u0627']), ('\uff01', &['\x21']), ('\uff02', &['\x22']), - ('\uff03', &['\x23']), ('\uff04', &['\x24']), ('\uff05', &['\x25']), ('\uff06', &['\x26']), - ('\uff07', &['\x27']), ('\uff08', &['\x28']), ('\uff09', &['\x29']), ('\uff0a', &['\x2a']), - ('\uff0b', &['\x2b']), ('\uff0c', &['\x2c']), ('\uff0d', &['\x2d']), ('\uff0e', &['\x2e']), - ('\uff0f', &['\x2f']), ('\uff10', &['\x30']), ('\uff11', &['\x31']), ('\uff12', &['\x32']), - ('\uff13', &['\x33']), ('\uff14', &['\x34']), ('\uff15', &['\x35']), ('\uff16', &['\x36']), - ('\uff17', &['\x37']), ('\uff18', &['\x38']), ('\uff19', &['\x39']), ('\uff1a', &['\x3a']), - ('\uff1b', &['\x3b']), ('\uff1c', &['\x3c']), ('\uff1d', &['\x3d']), ('\uff1e', &['\x3e']), - ('\uff1f', &['\x3f']), ('\uff20', &['\x40']), ('\uff21', &['\x41']), ('\uff22', &['\x42']), - ('\uff23', &['\x43']), ('\uff24', &['\x44']), ('\uff25', &['\x45']), ('\uff26', &['\x46']), - ('\uff27', &['\x47']), ('\uff28', &['\x48']), ('\uff29', &['\x49']), ('\uff2a', &['\x4a']), - ('\uff2b', &['\x4b']), ('\uff2c', &['\x4c']), ('\uff2d', &['\x4d']), ('\uff2e', &['\x4e']), - ('\uff2f', &['\x4f']), ('\uff30', &['\x50']), ('\uff31', &['\x51']), ('\uff32', &['\x52']), - ('\uff33', &['\x53']), ('\uff34', &['\x54']), ('\uff35', &['\x55']), ('\uff36', &['\x56']), - ('\uff37', &['\x57']), ('\uff38', &['\x58']), ('\uff39', &['\x59']), ('\uff3a', &['\x5a']), - ('\uff3b', &['\x5b']), ('\uff3c', &['\x5c']), ('\uff3d', &['\x5d']), ('\uff3e', &['\x5e']), - ('\uff3f', &['\x5f']), ('\uff40', &['\x60']), ('\uff41', &['\x61']), ('\uff42', &['\x62']), - ('\uff43', &['\x63']), ('\uff44', &['\x64']), ('\uff45', &['\x65']), ('\uff46', &['\x66']), - ('\uff47', &['\x67']), ('\uff48', &['\x68']), ('\uff49', &['\x69']), ('\uff4a', &['\x6a']), - ('\uff4b', &['\x6b']), ('\uff4c', &['\x6c']), ('\uff4d', &['\x6d']), ('\uff4e', &['\x6e']), - ('\uff4f', &['\x6f']), ('\uff50', &['\x70']), ('\uff51', &['\x71']), ('\uff52', &['\x72']), - ('\uff53', &['\x73']), ('\uff54', &['\x74']), ('\uff55', &['\x75']), ('\uff56', &['\x76']), - ('\uff57', &['\x77']), ('\uff58', &['\x78']), ('\uff59', &['\x79']), ('\uff5a', &['\x7a']), - ('\uff5b', &['\x7b']), ('\uff5c', &['\x7c']), ('\uff5d', &['\x7d']), ('\uff5e', &['\x7e']), - ('\uff5f', &['\u2985']), ('\uff60', &['\u2986']), ('\uff61', &['\u3002']), ('\uff62', - &['\u300c']), ('\uff63', &['\u300d']), ('\uff64', &['\u3001']), ('\uff65', &['\u30fb']), - ('\uff66', &['\u30f2']), ('\uff67', &['\u30a1']), ('\uff68', &['\u30a3']), ('\uff69', - &['\u30a5']), ('\uff6a', &['\u30a7']), ('\uff6b', &['\u30a9']), ('\uff6c', &['\u30e3']), - ('\uff6d', &['\u30e5']), ('\uff6e', &['\u30e7']), ('\uff6f', &['\u30c3']), ('\uff70', - &['\u30fc']), ('\uff71', &['\u30a2']), ('\uff72', &['\u30a4']), ('\uff73', &['\u30a6']), - ('\uff74', &['\u30a8']), ('\uff75', &['\u30aa']), ('\uff76', &['\u30ab']), ('\uff77', - &['\u30ad']), ('\uff78', &['\u30af']), ('\uff79', &['\u30b1']), ('\uff7a', &['\u30b3']), - ('\uff7b', &['\u30b5']), ('\uff7c', &['\u30b7']), ('\uff7d', &['\u30b9']), ('\uff7e', - &['\u30bb']), ('\uff7f', &['\u30bd']), ('\uff80', &['\u30bf']), ('\uff81', &['\u30c1']), - ('\uff82', &['\u30c4']), ('\uff83', &['\u30c6']), ('\uff84', &['\u30c8']), ('\uff85', - &['\u30ca']), ('\uff86', &['\u30cb']), ('\uff87', &['\u30cc']), ('\uff88', &['\u30cd']), - ('\uff89', &['\u30ce']), ('\uff8a', &['\u30cf']), ('\uff8b', &['\u30d2']), ('\uff8c', - &['\u30d5']), ('\uff8d', &['\u30d8']), ('\uff8e', &['\u30db']), ('\uff8f', &['\u30de']), - ('\uff90', &['\u30df']), ('\uff91', &['\u30e0']), ('\uff92', &['\u30e1']), ('\uff93', - &['\u30e2']), ('\uff94', &['\u30e4']), ('\uff95', &['\u30e6']), ('\uff96', &['\u30e8']), - ('\uff97', &['\u30e9']), ('\uff98', &['\u30ea']), ('\uff99', &['\u30eb']), ('\uff9a', - &['\u30ec']), ('\uff9b', &['\u30ed']), ('\uff9c', &['\u30ef']), ('\uff9d', &['\u30f3']), - ('\uff9e', &['\u3099']), ('\uff9f', &['\u309a']), ('\uffa0', &['\u3164']), ('\uffa1', - &['\u3131']), ('\uffa2', &['\u3132']), ('\uffa3', &['\u3133']), ('\uffa4', &['\u3134']), - ('\uffa5', &['\u3135']), ('\uffa6', &['\u3136']), ('\uffa7', &['\u3137']), ('\uffa8', - &['\u3138']), ('\uffa9', &['\u3139']), ('\uffaa', &['\u313a']), ('\uffab', &['\u313b']), - ('\uffac', &['\u313c']), ('\uffad', &['\u313d']), ('\uffae', &['\u313e']), ('\uffaf', - &['\u313f']), ('\uffb0', &['\u3140']), ('\uffb1', &['\u3141']), ('\uffb2', &['\u3142']), - ('\uffb3', &['\u3143']), ('\uffb4', &['\u3144']), ('\uffb5', &['\u3145']), ('\uffb6', - &['\u3146']), ('\uffb7', &['\u3147']), ('\uffb8', &['\u3148']), ('\uffb9', &['\u3149']), - ('\uffba', &['\u314a']), ('\uffbb', &['\u314b']), ('\uffbc', &['\u314c']), ('\uffbd', - &['\u314d']), ('\uffbe', &['\u314e']), ('\uffc2', &['\u314f']), ('\uffc3', &['\u3150']), - ('\uffc4', &['\u3151']), ('\uffc5', &['\u3152']), ('\uffc6', &['\u3153']), ('\uffc7', - &['\u3154']), ('\uffca', &['\u3155']), ('\uffcb', &['\u3156']), ('\uffcc', &['\u3157']), - ('\uffcd', &['\u3158']), ('\uffce', &['\u3159']), ('\uffcf', &['\u315a']), ('\uffd2', - &['\u315b']), ('\uffd3', &['\u315c']), ('\uffd4', &['\u315d']), ('\uffd5', &['\u315e']), - ('\uffd6', &['\u315f']), ('\uffd7', &['\u3160']), ('\uffda', &['\u3161']), ('\uffdb', - &['\u3162']), ('\uffdc', &['\u3163']), ('\uffe0', &['\xa2']), ('\uffe1', &['\xa3']), - ('\uffe2', &['\xac']), ('\uffe3', &['\xaf']), ('\uffe4', &['\xa6']), ('\uffe5', &['\xa5']), - ('\uffe6', &['\u20a9']), ('\uffe8', &['\u2502']), ('\uffe9', &['\u2190']), ('\uffea', - &['\u2191']), ('\uffeb', &['\u2192']), ('\uffec', &['\u2193']), ('\uffed', &['\u25a0']), - ('\uffee', &['\u25cb']), ('\U0001d400', &['\x41']), ('\U0001d401', &['\x42']), - ('\U0001d402', &['\x43']), ('\U0001d403', &['\x44']), ('\U0001d404', &['\x45']), - ('\U0001d405', &['\x46']), ('\U0001d406', &['\x47']), ('\U0001d407', &['\x48']), - ('\U0001d408', &['\x49']), ('\U0001d409', &['\x4a']), ('\U0001d40a', &['\x4b']), - ('\U0001d40b', &['\x4c']), ('\U0001d40c', &['\x4d']), ('\U0001d40d', &['\x4e']), - ('\U0001d40e', &['\x4f']), ('\U0001d40f', &['\x50']), ('\U0001d410', &['\x51']), - ('\U0001d411', &['\x52']), ('\U0001d412', &['\x53']), ('\U0001d413', &['\x54']), - ('\U0001d414', &['\x55']), ('\U0001d415', &['\x56']), ('\U0001d416', &['\x57']), - ('\U0001d417', &['\x58']), ('\U0001d418', &['\x59']), ('\U0001d419', &['\x5a']), - ('\U0001d41a', &['\x61']), ('\U0001d41b', &['\x62']), ('\U0001d41c', &['\x63']), - ('\U0001d41d', &['\x64']), ('\U0001d41e', &['\x65']), ('\U0001d41f', &['\x66']), - ('\U0001d420', &['\x67']), ('\U0001d421', &['\x68']), ('\U0001d422', &['\x69']), - ('\U0001d423', &['\x6a']), ('\U0001d424', &['\x6b']), ('\U0001d425', &['\x6c']), - ('\U0001d426', &['\x6d']), ('\U0001d427', &['\x6e']), ('\U0001d428', &['\x6f']), - ('\U0001d429', &['\x70']), ('\U0001d42a', &['\x71']), ('\U0001d42b', &['\x72']), - ('\U0001d42c', &['\x73']), ('\U0001d42d', &['\x74']), ('\U0001d42e', &['\x75']), - ('\U0001d42f', &['\x76']), ('\U0001d430', &['\x77']), ('\U0001d431', &['\x78']), - ('\U0001d432', &['\x79']), ('\U0001d433', &['\x7a']), ('\U0001d434', &['\x41']), - ('\U0001d435', &['\x42']), ('\U0001d436', &['\x43']), ('\U0001d437', &['\x44']), - ('\U0001d438', &['\x45']), ('\U0001d439', &['\x46']), ('\U0001d43a', &['\x47']), - ('\U0001d43b', &['\x48']), ('\U0001d43c', &['\x49']), ('\U0001d43d', &['\x4a']), - ('\U0001d43e', &['\x4b']), ('\U0001d43f', &['\x4c']), ('\U0001d440', &['\x4d']), - ('\U0001d441', &['\x4e']), ('\U0001d442', &['\x4f']), ('\U0001d443', &['\x50']), - ('\U0001d444', &['\x51']), ('\U0001d445', &['\x52']), ('\U0001d446', &['\x53']), - ('\U0001d447', &['\x54']), ('\U0001d448', &['\x55']), ('\U0001d449', &['\x56']), - ('\U0001d44a', &['\x57']), ('\U0001d44b', &['\x58']), ('\U0001d44c', &['\x59']), - ('\U0001d44d', &['\x5a']), ('\U0001d44e', &['\x61']), ('\U0001d44f', &['\x62']), - ('\U0001d450', &['\x63']), ('\U0001d451', &['\x64']), ('\U0001d452', &['\x65']), - ('\U0001d453', &['\x66']), ('\U0001d454', &['\x67']), ('\U0001d456', &['\x69']), - ('\U0001d457', &['\x6a']), ('\U0001d458', &['\x6b']), ('\U0001d459', &['\x6c']), - ('\U0001d45a', &['\x6d']), ('\U0001d45b', &['\x6e']), ('\U0001d45c', &['\x6f']), - ('\U0001d45d', &['\x70']), ('\U0001d45e', &['\x71']), ('\U0001d45f', &['\x72']), - ('\U0001d460', &['\x73']), ('\U0001d461', &['\x74']), ('\U0001d462', &['\x75']), - ('\U0001d463', &['\x76']), ('\U0001d464', &['\x77']), ('\U0001d465', &['\x78']), - ('\U0001d466', &['\x79']), ('\U0001d467', &['\x7a']), ('\U0001d468', &['\x41']), - ('\U0001d469', &['\x42']), ('\U0001d46a', &['\x43']), ('\U0001d46b', &['\x44']), - ('\U0001d46c', &['\x45']), ('\U0001d46d', &['\x46']), ('\U0001d46e', &['\x47']), - ('\U0001d46f', &['\x48']), ('\U0001d470', &['\x49']), ('\U0001d471', &['\x4a']), - ('\U0001d472', &['\x4b']), ('\U0001d473', &['\x4c']), ('\U0001d474', &['\x4d']), - ('\U0001d475', &['\x4e']), ('\U0001d476', &['\x4f']), ('\U0001d477', &['\x50']), - ('\U0001d478', &['\x51']), ('\U0001d479', &['\x52']), ('\U0001d47a', &['\x53']), - ('\U0001d47b', &['\x54']), ('\U0001d47c', &['\x55']), ('\U0001d47d', &['\x56']), - ('\U0001d47e', &['\x57']), ('\U0001d47f', &['\x58']), ('\U0001d480', &['\x59']), - ('\U0001d481', &['\x5a']), ('\U0001d482', &['\x61']), ('\U0001d483', &['\x62']), - ('\U0001d484', &['\x63']), ('\U0001d485', &['\x64']), ('\U0001d486', &['\x65']), - ('\U0001d487', &['\x66']), ('\U0001d488', &['\x67']), ('\U0001d489', &['\x68']), - ('\U0001d48a', &['\x69']), ('\U0001d48b', &['\x6a']), ('\U0001d48c', &['\x6b']), - ('\U0001d48d', &['\x6c']), ('\U0001d48e', &['\x6d']), ('\U0001d48f', &['\x6e']), - ('\U0001d490', &['\x6f']), ('\U0001d491', &['\x70']), ('\U0001d492', &['\x71']), - ('\U0001d493', &['\x72']), ('\U0001d494', &['\x73']), ('\U0001d495', &['\x74']), - ('\U0001d496', &['\x75']), ('\U0001d497', &['\x76']), ('\U0001d498', &['\x77']), - ('\U0001d499', &['\x78']), ('\U0001d49a', &['\x79']), ('\U0001d49b', &['\x7a']), - ('\U0001d49c', &['\x41']), ('\U0001d49e', &['\x43']), ('\U0001d49f', &['\x44']), - ('\U0001d4a2', &['\x47']), ('\U0001d4a5', &['\x4a']), ('\U0001d4a6', &['\x4b']), - ('\U0001d4a9', &['\x4e']), ('\U0001d4aa', &['\x4f']), ('\U0001d4ab', &['\x50']), - ('\U0001d4ac', &['\x51']), ('\U0001d4ae', &['\x53']), ('\U0001d4af', &['\x54']), - ('\U0001d4b0', &['\x55']), ('\U0001d4b1', &['\x56']), ('\U0001d4b2', &['\x57']), - ('\U0001d4b3', &['\x58']), ('\U0001d4b4', &['\x59']), ('\U0001d4b5', &['\x5a']), - ('\U0001d4b6', &['\x61']), ('\U0001d4b7', &['\x62']), ('\U0001d4b8', &['\x63']), - ('\U0001d4b9', &['\x64']), ('\U0001d4bb', &['\x66']), ('\U0001d4bd', &['\x68']), - ('\U0001d4be', &['\x69']), ('\U0001d4bf', &['\x6a']), ('\U0001d4c0', &['\x6b']), - ('\U0001d4c1', &['\x6c']), ('\U0001d4c2', &['\x6d']), ('\U0001d4c3', &['\x6e']), - ('\U0001d4c5', &['\x70']), ('\U0001d4c6', &['\x71']), ('\U0001d4c7', &['\x72']), - ('\U0001d4c8', &['\x73']), ('\U0001d4c9', &['\x74']), ('\U0001d4ca', &['\x75']), - ('\U0001d4cb', &['\x76']), ('\U0001d4cc', &['\x77']), ('\U0001d4cd', &['\x78']), - ('\U0001d4ce', &['\x79']), ('\U0001d4cf', &['\x7a']), ('\U0001d4d0', &['\x41']), - ('\U0001d4d1', &['\x42']), ('\U0001d4d2', &['\x43']), ('\U0001d4d3', &['\x44']), - ('\U0001d4d4', &['\x45']), ('\U0001d4d5', &['\x46']), ('\U0001d4d6', &['\x47']), - ('\U0001d4d7', &['\x48']), ('\U0001d4d8', &['\x49']), ('\U0001d4d9', &['\x4a']), - ('\U0001d4da', &['\x4b']), ('\U0001d4db', &['\x4c']), ('\U0001d4dc', &['\x4d']), - ('\U0001d4dd', &['\x4e']), ('\U0001d4de', &['\x4f']), ('\U0001d4df', &['\x50']), - ('\U0001d4e0', &['\x51']), ('\U0001d4e1', &['\x52']), ('\U0001d4e2', &['\x53']), - ('\U0001d4e3', &['\x54']), ('\U0001d4e4', &['\x55']), ('\U0001d4e5', &['\x56']), - ('\U0001d4e6', &['\x57']), ('\U0001d4e7', &['\x58']), ('\U0001d4e8', &['\x59']), - ('\U0001d4e9', &['\x5a']), ('\U0001d4ea', &['\x61']), ('\U0001d4eb', &['\x62']), - ('\U0001d4ec', &['\x63']), ('\U0001d4ed', &['\x64']), ('\U0001d4ee', &['\x65']), - ('\U0001d4ef', &['\x66']), ('\U0001d4f0', &['\x67']), ('\U0001d4f1', &['\x68']), - ('\U0001d4f2', &['\x69']), ('\U0001d4f3', &['\x6a']), ('\U0001d4f4', &['\x6b']), - ('\U0001d4f5', &['\x6c']), ('\U0001d4f6', &['\x6d']), ('\U0001d4f7', &['\x6e']), - ('\U0001d4f8', &['\x6f']), ('\U0001d4f9', &['\x70']), ('\U0001d4fa', &['\x71']), - ('\U0001d4fb', &['\x72']), ('\U0001d4fc', &['\x73']), ('\U0001d4fd', &['\x74']), - ('\U0001d4fe', &['\x75']), ('\U0001d4ff', &['\x76']), ('\U0001d500', &['\x77']), - ('\U0001d501', &['\x78']), ('\U0001d502', &['\x79']), ('\U0001d503', &['\x7a']), - ('\U0001d504', &['\x41']), ('\U0001d505', &['\x42']), ('\U0001d507', &['\x44']), - ('\U0001d508', &['\x45']), ('\U0001d509', &['\x46']), ('\U0001d50a', &['\x47']), - ('\U0001d50d', &['\x4a']), ('\U0001d50e', &['\x4b']), ('\U0001d50f', &['\x4c']), - ('\U0001d510', &['\x4d']), ('\U0001d511', &['\x4e']), ('\U0001d512', &['\x4f']), - ('\U0001d513', &['\x50']), ('\U0001d514', &['\x51']), ('\U0001d516', &['\x53']), - ('\U0001d517', &['\x54']), ('\U0001d518', &['\x55']), ('\U0001d519', &['\x56']), - ('\U0001d51a', &['\x57']), ('\U0001d51b', &['\x58']), ('\U0001d51c', &['\x59']), - ('\U0001d51e', &['\x61']), ('\U0001d51f', &['\x62']), ('\U0001d520', &['\x63']), - ('\U0001d521', &['\x64']), ('\U0001d522', &['\x65']), ('\U0001d523', &['\x66']), - ('\U0001d524', &['\x67']), ('\U0001d525', &['\x68']), ('\U0001d526', &['\x69']), - ('\U0001d527', &['\x6a']), ('\U0001d528', &['\x6b']), ('\U0001d529', &['\x6c']), - ('\U0001d52a', &['\x6d']), ('\U0001d52b', &['\x6e']), ('\U0001d52c', &['\x6f']), - ('\U0001d52d', &['\x70']), ('\U0001d52e', &['\x71']), ('\U0001d52f', &['\x72']), - ('\U0001d530', &['\x73']), ('\U0001d531', &['\x74']), ('\U0001d532', &['\x75']), - ('\U0001d533', &['\x76']), ('\U0001d534', &['\x77']), ('\U0001d535', &['\x78']), - ('\U0001d536', &['\x79']), ('\U0001d537', &['\x7a']), ('\U0001d538', &['\x41']), - ('\U0001d539', &['\x42']), ('\U0001d53b', &['\x44']), ('\U0001d53c', &['\x45']), - ('\U0001d53d', &['\x46']), ('\U0001d53e', &['\x47']), ('\U0001d540', &['\x49']), - ('\U0001d541', &['\x4a']), ('\U0001d542', &['\x4b']), ('\U0001d543', &['\x4c']), - ('\U0001d544', &['\x4d']), ('\U0001d546', &['\x4f']), ('\U0001d54a', &['\x53']), - ('\U0001d54b', &['\x54']), ('\U0001d54c', &['\x55']), ('\U0001d54d', &['\x56']), - ('\U0001d54e', &['\x57']), ('\U0001d54f', &['\x58']), ('\U0001d550', &['\x59']), - ('\U0001d552', &['\x61']), ('\U0001d553', &['\x62']), ('\U0001d554', &['\x63']), - ('\U0001d555', &['\x64']), ('\U0001d556', &['\x65']), ('\U0001d557', &['\x66']), - ('\U0001d558', &['\x67']), ('\U0001d559', &['\x68']), ('\U0001d55a', &['\x69']), - ('\U0001d55b', &['\x6a']), ('\U0001d55c', &['\x6b']), ('\U0001d55d', &['\x6c']), - ('\U0001d55e', &['\x6d']), ('\U0001d55f', &['\x6e']), ('\U0001d560', &['\x6f']), - ('\U0001d561', &['\x70']), ('\U0001d562', &['\x71']), ('\U0001d563', &['\x72']), - ('\U0001d564', &['\x73']), ('\U0001d565', &['\x74']), ('\U0001d566', &['\x75']), - ('\U0001d567', &['\x76']), ('\U0001d568', &['\x77']), ('\U0001d569', &['\x78']), - ('\U0001d56a', &['\x79']), ('\U0001d56b', &['\x7a']), ('\U0001d56c', &['\x41']), - ('\U0001d56d', &['\x42']), ('\U0001d56e', &['\x43']), ('\U0001d56f', &['\x44']), - ('\U0001d570', &['\x45']), ('\U0001d571', &['\x46']), ('\U0001d572', &['\x47']), - ('\U0001d573', &['\x48']), ('\U0001d574', &['\x49']), ('\U0001d575', &['\x4a']), - ('\U0001d576', &['\x4b']), ('\U0001d577', &['\x4c']), ('\U0001d578', &['\x4d']), - ('\U0001d579', &['\x4e']), ('\U0001d57a', &['\x4f']), ('\U0001d57b', &['\x50']), - ('\U0001d57c', &['\x51']), ('\U0001d57d', &['\x52']), ('\U0001d57e', &['\x53']), - ('\U0001d57f', &['\x54']), ('\U0001d580', &['\x55']), ('\U0001d581', &['\x56']), - ('\U0001d582', &['\x57']), ('\U0001d583', &['\x58']), ('\U0001d584', &['\x59']), - ('\U0001d585', &['\x5a']), ('\U0001d586', &['\x61']), ('\U0001d587', &['\x62']), - ('\U0001d588', &['\x63']), ('\U0001d589', &['\x64']), ('\U0001d58a', &['\x65']), - ('\U0001d58b', &['\x66']), ('\U0001d58c', &['\x67']), ('\U0001d58d', &['\x68']), - ('\U0001d58e', &['\x69']), ('\U0001d58f', &['\x6a']), ('\U0001d590', &['\x6b']), - ('\U0001d591', &['\x6c']), ('\U0001d592', &['\x6d']), ('\U0001d593', &['\x6e']), - ('\U0001d594', &['\x6f']), ('\U0001d595', &['\x70']), ('\U0001d596', &['\x71']), - ('\U0001d597', &['\x72']), ('\U0001d598', &['\x73']), ('\U0001d599', &['\x74']), - ('\U0001d59a', &['\x75']), ('\U0001d59b', &['\x76']), ('\U0001d59c', &['\x77']), - ('\U0001d59d', &['\x78']), ('\U0001d59e', &['\x79']), ('\U0001d59f', &['\x7a']), - ('\U0001d5a0', &['\x41']), ('\U0001d5a1', &['\x42']), ('\U0001d5a2', &['\x43']), - ('\U0001d5a3', &['\x44']), ('\U0001d5a4', &['\x45']), ('\U0001d5a5', &['\x46']), - ('\U0001d5a6', &['\x47']), ('\U0001d5a7', &['\x48']), ('\U0001d5a8', &['\x49']), - ('\U0001d5a9', &['\x4a']), ('\U0001d5aa', &['\x4b']), ('\U0001d5ab', &['\x4c']), - ('\U0001d5ac', &['\x4d']), ('\U0001d5ad', &['\x4e']), ('\U0001d5ae', &['\x4f']), - ('\U0001d5af', &['\x50']), ('\U0001d5b0', &['\x51']), ('\U0001d5b1', &['\x52']), - ('\U0001d5b2', &['\x53']), ('\U0001d5b3', &['\x54']), ('\U0001d5b4', &['\x55']), - ('\U0001d5b5', &['\x56']), ('\U0001d5b6', &['\x57']), ('\U0001d5b7', &['\x58']), - ('\U0001d5b8', &['\x59']), ('\U0001d5b9', &['\x5a']), ('\U0001d5ba', &['\x61']), - ('\U0001d5bb', &['\x62']), ('\U0001d5bc', &['\x63']), ('\U0001d5bd', &['\x64']), - ('\U0001d5be', &['\x65']), ('\U0001d5bf', &['\x66']), ('\U0001d5c0', &['\x67']), - ('\U0001d5c1', &['\x68']), ('\U0001d5c2', &['\x69']), ('\U0001d5c3', &['\x6a']), - ('\U0001d5c4', &['\x6b']), ('\U0001d5c5', &['\x6c']), ('\U0001d5c6', &['\x6d']), - ('\U0001d5c7', &['\x6e']), ('\U0001d5c8', &['\x6f']), ('\U0001d5c9', &['\x70']), - ('\U0001d5ca', &['\x71']), ('\U0001d5cb', &['\x72']), ('\U0001d5cc', &['\x73']), - ('\U0001d5cd', &['\x74']), ('\U0001d5ce', &['\x75']), ('\U0001d5cf', &['\x76']), - ('\U0001d5d0', &['\x77']), ('\U0001d5d1', &['\x78']), ('\U0001d5d2', &['\x79']), - ('\U0001d5d3', &['\x7a']), ('\U0001d5d4', &['\x41']), ('\U0001d5d5', &['\x42']), - ('\U0001d5d6', &['\x43']), ('\U0001d5d7', &['\x44']), ('\U0001d5d8', &['\x45']), - ('\U0001d5d9', &['\x46']), ('\U0001d5da', &['\x47']), ('\U0001d5db', &['\x48']), - ('\U0001d5dc', &['\x49']), ('\U0001d5dd', &['\x4a']), ('\U0001d5de', &['\x4b']), - ('\U0001d5df', &['\x4c']), ('\U0001d5e0', &['\x4d']), ('\U0001d5e1', &['\x4e']), - ('\U0001d5e2', &['\x4f']), ('\U0001d5e3', &['\x50']), ('\U0001d5e4', &['\x51']), - ('\U0001d5e5', &['\x52']), ('\U0001d5e6', &['\x53']), ('\U0001d5e7', &['\x54']), - ('\U0001d5e8', &['\x55']), ('\U0001d5e9', &['\x56']), ('\U0001d5ea', &['\x57']), - ('\U0001d5eb', &['\x58']), ('\U0001d5ec', &['\x59']), ('\U0001d5ed', &['\x5a']), - ('\U0001d5ee', &['\x61']), ('\U0001d5ef', &['\x62']), ('\U0001d5f0', &['\x63']), - ('\U0001d5f1', &['\x64']), ('\U0001d5f2', &['\x65']), ('\U0001d5f3', &['\x66']), - ('\U0001d5f4', &['\x67']), ('\U0001d5f5', &['\x68']), ('\U0001d5f6', &['\x69']), - ('\U0001d5f7', &['\x6a']), ('\U0001d5f8', &['\x6b']), ('\U0001d5f9', &['\x6c']), - ('\U0001d5fa', &['\x6d']), ('\U0001d5fb', &['\x6e']), ('\U0001d5fc', &['\x6f']), - ('\U0001d5fd', &['\x70']), ('\U0001d5fe', &['\x71']), ('\U0001d5ff', &['\x72']), - ('\U0001d600', &['\x73']), ('\U0001d601', &['\x74']), ('\U0001d602', &['\x75']), - ('\U0001d603', &['\x76']), ('\U0001d604', &['\x77']), ('\U0001d605', &['\x78']), - ('\U0001d606', &['\x79']), ('\U0001d607', &['\x7a']), ('\U0001d608', &['\x41']), - ('\U0001d609', &['\x42']), ('\U0001d60a', &['\x43']), ('\U0001d60b', &['\x44']), - ('\U0001d60c', &['\x45']), ('\U0001d60d', &['\x46']), ('\U0001d60e', &['\x47']), - ('\U0001d60f', &['\x48']), ('\U0001d610', &['\x49']), ('\U0001d611', &['\x4a']), - ('\U0001d612', &['\x4b']), ('\U0001d613', &['\x4c']), ('\U0001d614', &['\x4d']), - ('\U0001d615', &['\x4e']), ('\U0001d616', &['\x4f']), ('\U0001d617', &['\x50']), - ('\U0001d618', &['\x51']), ('\U0001d619', &['\x52']), ('\U0001d61a', &['\x53']), - ('\U0001d61b', &['\x54']), ('\U0001d61c', &['\x55']), ('\U0001d61d', &['\x56']), - ('\U0001d61e', &['\x57']), ('\U0001d61f', &['\x58']), ('\U0001d620', &['\x59']), - ('\U0001d621', &['\x5a']), ('\U0001d622', &['\x61']), ('\U0001d623', &['\x62']), - ('\U0001d624', &['\x63']), ('\U0001d625', &['\x64']), ('\U0001d626', &['\x65']), - ('\U0001d627', &['\x66']), ('\U0001d628', &['\x67']), ('\U0001d629', &['\x68']), - ('\U0001d62a', &['\x69']), ('\U0001d62b', &['\x6a']), ('\U0001d62c', &['\x6b']), - ('\U0001d62d', &['\x6c']), ('\U0001d62e', &['\x6d']), ('\U0001d62f', &['\x6e']), - ('\U0001d630', &['\x6f']), ('\U0001d631', &['\x70']), ('\U0001d632', &['\x71']), - ('\U0001d633', &['\x72']), ('\U0001d634', &['\x73']), ('\U0001d635', &['\x74']), - ('\U0001d636', &['\x75']), ('\U0001d637', &['\x76']), ('\U0001d638', &['\x77']), - ('\U0001d639', &['\x78']), ('\U0001d63a', &['\x79']), ('\U0001d63b', &['\x7a']), - ('\U0001d63c', &['\x41']), ('\U0001d63d', &['\x42']), ('\U0001d63e', &['\x43']), - ('\U0001d63f', &['\x44']), ('\U0001d640', &['\x45']), ('\U0001d641', &['\x46']), - ('\U0001d642', &['\x47']), ('\U0001d643', &['\x48']), ('\U0001d644', &['\x49']), - ('\U0001d645', &['\x4a']), ('\U0001d646', &['\x4b']), ('\U0001d647', &['\x4c']), - ('\U0001d648', &['\x4d']), ('\U0001d649', &['\x4e']), ('\U0001d64a', &['\x4f']), - ('\U0001d64b', &['\x50']), ('\U0001d64c', &['\x51']), ('\U0001d64d', &['\x52']), - ('\U0001d64e', &['\x53']), ('\U0001d64f', &['\x54']), ('\U0001d650', &['\x55']), - ('\U0001d651', &['\x56']), ('\U0001d652', &['\x57']), ('\U0001d653', &['\x58']), - ('\U0001d654', &['\x59']), ('\U0001d655', &['\x5a']), ('\U0001d656', &['\x61']), - ('\U0001d657', &['\x62']), ('\U0001d658', &['\x63']), ('\U0001d659', &['\x64']), - ('\U0001d65a', &['\x65']), ('\U0001d65b', &['\x66']), ('\U0001d65c', &['\x67']), - ('\U0001d65d', &['\x68']), ('\U0001d65e', &['\x69']), ('\U0001d65f', &['\x6a']), - ('\U0001d660', &['\x6b']), ('\U0001d661', &['\x6c']), ('\U0001d662', &['\x6d']), - ('\U0001d663', &['\x6e']), ('\U0001d664', &['\x6f']), ('\U0001d665', &['\x70']), - ('\U0001d666', &['\x71']), ('\U0001d667', &['\x72']), ('\U0001d668', &['\x73']), - ('\U0001d669', &['\x74']), ('\U0001d66a', &['\x75']), ('\U0001d66b', &['\x76']), - ('\U0001d66c', &['\x77']), ('\U0001d66d', &['\x78']), ('\U0001d66e', &['\x79']), - ('\U0001d66f', &['\x7a']), ('\U0001d670', &['\x41']), ('\U0001d671', &['\x42']), - ('\U0001d672', &['\x43']), ('\U0001d673', &['\x44']), ('\U0001d674', &['\x45']), - ('\U0001d675', &['\x46']), ('\U0001d676', &['\x47']), ('\U0001d677', &['\x48']), - ('\U0001d678', &['\x49']), ('\U0001d679', &['\x4a']), ('\U0001d67a', &['\x4b']), - ('\U0001d67b', &['\x4c']), ('\U0001d67c', &['\x4d']), ('\U0001d67d', &['\x4e']), - ('\U0001d67e', &['\x4f']), ('\U0001d67f', &['\x50']), ('\U0001d680', &['\x51']), - ('\U0001d681', &['\x52']), ('\U0001d682', &['\x53']), ('\U0001d683', &['\x54']), - ('\U0001d684', &['\x55']), ('\U0001d685', &['\x56']), ('\U0001d686', &['\x57']), - ('\U0001d687', &['\x58']), ('\U0001d688', &['\x59']), ('\U0001d689', &['\x5a']), - ('\U0001d68a', &['\x61']), ('\U0001d68b', &['\x62']), ('\U0001d68c', &['\x63']), - ('\U0001d68d', &['\x64']), ('\U0001d68e', &['\x65']), ('\U0001d68f', &['\x66']), - ('\U0001d690', &['\x67']), ('\U0001d691', &['\x68']), ('\U0001d692', &['\x69']), - ('\U0001d693', &['\x6a']), ('\U0001d694', &['\x6b']), ('\U0001d695', &['\x6c']), - ('\U0001d696', &['\x6d']), ('\U0001d697', &['\x6e']), ('\U0001d698', &['\x6f']), - ('\U0001d699', &['\x70']), ('\U0001d69a', &['\x71']), ('\U0001d69b', &['\x72']), - ('\U0001d69c', &['\x73']), ('\U0001d69d', &['\x74']), ('\U0001d69e', &['\x75']), - ('\U0001d69f', &['\x76']), ('\U0001d6a0', &['\x77']), ('\U0001d6a1', &['\x78']), - ('\U0001d6a2', &['\x79']), ('\U0001d6a3', &['\x7a']), ('\U0001d6a4', &['\u0131']), - ('\U0001d6a5', &['\u0237']), ('\U0001d6a8', &['\u0391']), ('\U0001d6a9', &['\u0392']), - ('\U0001d6aa', &['\u0393']), ('\U0001d6ab', &['\u0394']), ('\U0001d6ac', &['\u0395']), - ('\U0001d6ad', &['\u0396']), ('\U0001d6ae', &['\u0397']), ('\U0001d6af', &['\u0398']), - ('\U0001d6b0', &['\u0399']), ('\U0001d6b1', &['\u039a']), ('\U0001d6b2', &['\u039b']), - ('\U0001d6b3', &['\u039c']), ('\U0001d6b4', &['\u039d']), ('\U0001d6b5', &['\u039e']), - ('\U0001d6b6', &['\u039f']), ('\U0001d6b7', &['\u03a0']), ('\U0001d6b8', &['\u03a1']), - ('\U0001d6b9', &['\u03f4']), ('\U0001d6ba', &['\u03a3']), ('\U0001d6bb', &['\u03a4']), - ('\U0001d6bc', &['\u03a5']), ('\U0001d6bd', &['\u03a6']), ('\U0001d6be', &['\u03a7']), - ('\U0001d6bf', &['\u03a8']), ('\U0001d6c0', &['\u03a9']), ('\U0001d6c1', &['\u2207']), - ('\U0001d6c2', &['\u03b1']), ('\U0001d6c3', &['\u03b2']), ('\U0001d6c4', &['\u03b3']), - ('\U0001d6c5', &['\u03b4']), ('\U0001d6c6', &['\u03b5']), ('\U0001d6c7', &['\u03b6']), - ('\U0001d6c8', &['\u03b7']), ('\U0001d6c9', &['\u03b8']), ('\U0001d6ca', &['\u03b9']), - ('\U0001d6cb', &['\u03ba']), ('\U0001d6cc', &['\u03bb']), ('\U0001d6cd', &['\u03bc']), - ('\U0001d6ce', &['\u03bd']), ('\U0001d6cf', &['\u03be']), ('\U0001d6d0', &['\u03bf']), - ('\U0001d6d1', &['\u03c0']), ('\U0001d6d2', &['\u03c1']), ('\U0001d6d3', &['\u03c2']), - ('\U0001d6d4', &['\u03c3']), ('\U0001d6d5', &['\u03c4']), ('\U0001d6d6', &['\u03c5']), - ('\U0001d6d7', &['\u03c6']), ('\U0001d6d8', &['\u03c7']), ('\U0001d6d9', &['\u03c8']), - ('\U0001d6da', &['\u03c9']), ('\U0001d6db', &['\u2202']), ('\U0001d6dc', &['\u03f5']), - ('\U0001d6dd', &['\u03d1']), ('\U0001d6de', &['\u03f0']), ('\U0001d6df', &['\u03d5']), - ('\U0001d6e0', &['\u03f1']), ('\U0001d6e1', &['\u03d6']), ('\U0001d6e2', &['\u0391']), - ('\U0001d6e3', &['\u0392']), ('\U0001d6e4', &['\u0393']), ('\U0001d6e5', &['\u0394']), - ('\U0001d6e6', &['\u0395']), ('\U0001d6e7', &['\u0396']), ('\U0001d6e8', &['\u0397']), - ('\U0001d6e9', &['\u0398']), ('\U0001d6ea', &['\u0399']), ('\U0001d6eb', &['\u039a']), - ('\U0001d6ec', &['\u039b']), ('\U0001d6ed', &['\u039c']), ('\U0001d6ee', &['\u039d']), - ('\U0001d6ef', &['\u039e']), ('\U0001d6f0', &['\u039f']), ('\U0001d6f1', &['\u03a0']), - ('\U0001d6f2', &['\u03a1']), ('\U0001d6f3', &['\u03f4']), ('\U0001d6f4', &['\u03a3']), - ('\U0001d6f5', &['\u03a4']), ('\U0001d6f6', &['\u03a5']), ('\U0001d6f7', &['\u03a6']), - ('\U0001d6f8', &['\u03a7']), ('\U0001d6f9', &['\u03a8']), ('\U0001d6fa', &['\u03a9']), - ('\U0001d6fb', &['\u2207']), ('\U0001d6fc', &['\u03b1']), ('\U0001d6fd', &['\u03b2']), - ('\U0001d6fe', &['\u03b3']), ('\U0001d6ff', &['\u03b4']), ('\U0001d700', &['\u03b5']), - ('\U0001d701', &['\u03b6']), ('\U0001d702', &['\u03b7']), ('\U0001d703', &['\u03b8']), - ('\U0001d704', &['\u03b9']), ('\U0001d705', &['\u03ba']), ('\U0001d706', &['\u03bb']), - ('\U0001d707', &['\u03bc']), ('\U0001d708', &['\u03bd']), ('\U0001d709', &['\u03be']), - ('\U0001d70a', &['\u03bf']), ('\U0001d70b', &['\u03c0']), ('\U0001d70c', &['\u03c1']), - ('\U0001d70d', &['\u03c2']), ('\U0001d70e', &['\u03c3']), ('\U0001d70f', &['\u03c4']), - ('\U0001d710', &['\u03c5']), ('\U0001d711', &['\u03c6']), ('\U0001d712', &['\u03c7']), - ('\U0001d713', &['\u03c8']), ('\U0001d714', &['\u03c9']), ('\U0001d715', &['\u2202']), - ('\U0001d716', &['\u03f5']), ('\U0001d717', &['\u03d1']), ('\U0001d718', &['\u03f0']), - ('\U0001d719', &['\u03d5']), ('\U0001d71a', &['\u03f1']), ('\U0001d71b', &['\u03d6']), - ('\U0001d71c', &['\u0391']), ('\U0001d71d', &['\u0392']), ('\U0001d71e', &['\u0393']), - ('\U0001d71f', &['\u0394']), ('\U0001d720', &['\u0395']), ('\U0001d721', &['\u0396']), - ('\U0001d722', &['\u0397']), ('\U0001d723', &['\u0398']), ('\U0001d724', &['\u0399']), - ('\U0001d725', &['\u039a']), ('\U0001d726', &['\u039b']), ('\U0001d727', &['\u039c']), - ('\U0001d728', &['\u039d']), ('\U0001d729', &['\u039e']), ('\U0001d72a', &['\u039f']), - ('\U0001d72b', &['\u03a0']), ('\U0001d72c', &['\u03a1']), ('\U0001d72d', &['\u03f4']), - ('\U0001d72e', &['\u03a3']), ('\U0001d72f', &['\u03a4']), ('\U0001d730', &['\u03a5']), - ('\U0001d731', &['\u03a6']), ('\U0001d732', &['\u03a7']), ('\U0001d733', &['\u03a8']), - ('\U0001d734', &['\u03a9']), ('\U0001d735', &['\u2207']), ('\U0001d736', &['\u03b1']), - ('\U0001d737', &['\u03b2']), ('\U0001d738', &['\u03b3']), ('\U0001d739', &['\u03b4']), - ('\U0001d73a', &['\u03b5']), ('\U0001d73b', &['\u03b6']), ('\U0001d73c', &['\u03b7']), - ('\U0001d73d', &['\u03b8']), ('\U0001d73e', &['\u03b9']), ('\U0001d73f', &['\u03ba']), - ('\U0001d740', &['\u03bb']), ('\U0001d741', &['\u03bc']), ('\U0001d742', &['\u03bd']), - ('\U0001d743', &['\u03be']), ('\U0001d744', &['\u03bf']), ('\U0001d745', &['\u03c0']), - ('\U0001d746', &['\u03c1']), ('\U0001d747', &['\u03c2']), ('\U0001d748', &['\u03c3']), - ('\U0001d749', &['\u03c4']), ('\U0001d74a', &['\u03c5']), ('\U0001d74b', &['\u03c6']), - ('\U0001d74c', &['\u03c7']), ('\U0001d74d', &['\u03c8']), ('\U0001d74e', &['\u03c9']), - ('\U0001d74f', &['\u2202']), ('\U0001d750', &['\u03f5']), ('\U0001d751', &['\u03d1']), - ('\U0001d752', &['\u03f0']), ('\U0001d753', &['\u03d5']), ('\U0001d754', &['\u03f1']), - ('\U0001d755', &['\u03d6']), ('\U0001d756', &['\u0391']), ('\U0001d757', &['\u0392']), - ('\U0001d758', &['\u0393']), ('\U0001d759', &['\u0394']), ('\U0001d75a', &['\u0395']), - ('\U0001d75b', &['\u0396']), ('\U0001d75c', &['\u0397']), ('\U0001d75d', &['\u0398']), - ('\U0001d75e', &['\u0399']), ('\U0001d75f', &['\u039a']), ('\U0001d760', &['\u039b']), - ('\U0001d761', &['\u039c']), ('\U0001d762', &['\u039d']), ('\U0001d763', &['\u039e']), - ('\U0001d764', &['\u039f']), ('\U0001d765', &['\u03a0']), ('\U0001d766', &['\u03a1']), - ('\U0001d767', &['\u03f4']), ('\U0001d768', &['\u03a3']), ('\U0001d769', &['\u03a4']), - ('\U0001d76a', &['\u03a5']), ('\U0001d76b', &['\u03a6']), ('\U0001d76c', &['\u03a7']), - ('\U0001d76d', &['\u03a8']), ('\U0001d76e', &['\u03a9']), ('\U0001d76f', &['\u2207']), - ('\U0001d770', &['\u03b1']), ('\U0001d771', &['\u03b2']), ('\U0001d772', &['\u03b3']), - ('\U0001d773', &['\u03b4']), ('\U0001d774', &['\u03b5']), ('\U0001d775', &['\u03b6']), - ('\U0001d776', &['\u03b7']), ('\U0001d777', &['\u03b8']), ('\U0001d778', &['\u03b9']), - ('\U0001d779', &['\u03ba']), ('\U0001d77a', &['\u03bb']), ('\U0001d77b', &['\u03bc']), - ('\U0001d77c', &['\u03bd']), ('\U0001d77d', &['\u03be']), ('\U0001d77e', &['\u03bf']), - ('\U0001d77f', &['\u03c0']), ('\U0001d780', &['\u03c1']), ('\U0001d781', &['\u03c2']), - ('\U0001d782', &['\u03c3']), ('\U0001d783', &['\u03c4']), ('\U0001d784', &['\u03c5']), - ('\U0001d785', &['\u03c6']), ('\U0001d786', &['\u03c7']), ('\U0001d787', &['\u03c8']), - ('\U0001d788', &['\u03c9']), ('\U0001d789', &['\u2202']), ('\U0001d78a', &['\u03f5']), - ('\U0001d78b', &['\u03d1']), ('\U0001d78c', &['\u03f0']), ('\U0001d78d', &['\u03d5']), - ('\U0001d78e', &['\u03f1']), ('\U0001d78f', &['\u03d6']), ('\U0001d790', &['\u0391']), - ('\U0001d791', &['\u0392']), ('\U0001d792', &['\u0393']), ('\U0001d793', &['\u0394']), - ('\U0001d794', &['\u0395']), ('\U0001d795', &['\u0396']), ('\U0001d796', &['\u0397']), - ('\U0001d797', &['\u0398']), ('\U0001d798', &['\u0399']), ('\U0001d799', &['\u039a']), - ('\U0001d79a', &['\u039b']), ('\U0001d79b', &['\u039c']), ('\U0001d79c', &['\u039d']), - ('\U0001d79d', &['\u039e']), ('\U0001d79e', &['\u039f']), ('\U0001d79f', &['\u03a0']), - ('\U0001d7a0', &['\u03a1']), ('\U0001d7a1', &['\u03f4']), ('\U0001d7a2', &['\u03a3']), - ('\U0001d7a3', &['\u03a4']), ('\U0001d7a4', &['\u03a5']), ('\U0001d7a5', &['\u03a6']), - ('\U0001d7a6', &['\u03a7']), ('\U0001d7a7', &['\u03a8']), ('\U0001d7a8', &['\u03a9']), - ('\U0001d7a9', &['\u2207']), ('\U0001d7aa', &['\u03b1']), ('\U0001d7ab', &['\u03b2']), - ('\U0001d7ac', &['\u03b3']), ('\U0001d7ad', &['\u03b4']), ('\U0001d7ae', &['\u03b5']), - ('\U0001d7af', &['\u03b6']), ('\U0001d7b0', &['\u03b7']), ('\U0001d7b1', &['\u03b8']), - ('\U0001d7b2', &['\u03b9']), ('\U0001d7b3', &['\u03ba']), ('\U0001d7b4', &['\u03bb']), - ('\U0001d7b5', &['\u03bc']), ('\U0001d7b6', &['\u03bd']), ('\U0001d7b7', &['\u03be']), - ('\U0001d7b8', &['\u03bf']), ('\U0001d7b9', &['\u03c0']), ('\U0001d7ba', &['\u03c1']), - ('\U0001d7bb', &['\u03c2']), ('\U0001d7bc', &['\u03c3']), ('\U0001d7bd', &['\u03c4']), - ('\U0001d7be', &['\u03c5']), ('\U0001d7bf', &['\u03c6']), ('\U0001d7c0', &['\u03c7']), - ('\U0001d7c1', &['\u03c8']), ('\U0001d7c2', &['\u03c9']), ('\U0001d7c3', &['\u2202']), - ('\U0001d7c4', &['\u03f5']), ('\U0001d7c5', &['\u03d1']), ('\U0001d7c6', &['\u03f0']), - ('\U0001d7c7', &['\u03d5']), ('\U0001d7c8', &['\u03f1']), ('\U0001d7c9', &['\u03d6']), - ('\U0001d7ca', &['\u03dc']), ('\U0001d7cb', &['\u03dd']), ('\U0001d7ce', &['\x30']), - ('\U0001d7cf', &['\x31']), ('\U0001d7d0', &['\x32']), ('\U0001d7d1', &['\x33']), - ('\U0001d7d2', &['\x34']), ('\U0001d7d3', &['\x35']), ('\U0001d7d4', &['\x36']), - ('\U0001d7d5', &['\x37']), ('\U0001d7d6', &['\x38']), ('\U0001d7d7', &['\x39']), - ('\U0001d7d8', &['\x30']), ('\U0001d7d9', &['\x31']), ('\U0001d7da', &['\x32']), - ('\U0001d7db', &['\x33']), ('\U0001d7dc', &['\x34']), ('\U0001d7dd', &['\x35']), - ('\U0001d7de', &['\x36']), ('\U0001d7df', &['\x37']), ('\U0001d7e0', &['\x38']), - ('\U0001d7e1', &['\x39']), ('\U0001d7e2', &['\x30']), ('\U0001d7e3', &['\x31']), - ('\U0001d7e4', &['\x32']), ('\U0001d7e5', &['\x33']), ('\U0001d7e6', &['\x34']), - ('\U0001d7e7', &['\x35']), ('\U0001d7e8', &['\x36']), ('\U0001d7e9', &['\x37']), - ('\U0001d7ea', &['\x38']), ('\U0001d7eb', &['\x39']), ('\U0001d7ec', &['\x30']), - ('\U0001d7ed', &['\x31']), ('\U0001d7ee', &['\x32']), ('\U0001d7ef', &['\x33']), - ('\U0001d7f0', &['\x34']), ('\U0001d7f1', &['\x35']), ('\U0001d7f2', &['\x36']), - ('\U0001d7f3', &['\x37']), ('\U0001d7f4', &['\x38']), ('\U0001d7f5', &['\x39']), - ('\U0001d7f6', &['\x30']), ('\U0001d7f7', &['\x31']), ('\U0001d7f8', &['\x32']), - ('\U0001d7f9', &['\x33']), ('\U0001d7fa', &['\x34']), ('\U0001d7fb', &['\x35']), - ('\U0001d7fc', &['\x36']), ('\U0001d7fd', &['\x37']), ('\U0001d7fe', &['\x38']), - ('\U0001d7ff', &['\x39']), ('\U0001ee00', &['\u0627']), ('\U0001ee01', &['\u0628']), - ('\U0001ee02', &['\u062c']), ('\U0001ee03', &['\u062f']), ('\U0001ee05', &['\u0648']), - ('\U0001ee06', &['\u0632']), ('\U0001ee07', &['\u062d']), ('\U0001ee08', &['\u0637']), - ('\U0001ee09', &['\u064a']), ('\U0001ee0a', &['\u0643']), ('\U0001ee0b', &['\u0644']), - ('\U0001ee0c', &['\u0645']), ('\U0001ee0d', &['\u0646']), ('\U0001ee0e', &['\u0633']), - ('\U0001ee0f', &['\u0639']), ('\U0001ee10', &['\u0641']), ('\U0001ee11', &['\u0635']), - ('\U0001ee12', &['\u0642']), ('\U0001ee13', &['\u0631']), ('\U0001ee14', &['\u0634']), - ('\U0001ee15', &['\u062a']), ('\U0001ee16', &['\u062b']), ('\U0001ee17', &['\u062e']), - ('\U0001ee18', &['\u0630']), ('\U0001ee19', &['\u0636']), ('\U0001ee1a', &['\u0638']), - ('\U0001ee1b', &['\u063a']), ('\U0001ee1c', &['\u066e']), ('\U0001ee1d', &['\u06ba']), - ('\U0001ee1e', &['\u06a1']), ('\U0001ee1f', &['\u066f']), ('\U0001ee21', &['\u0628']), - ('\U0001ee22', &['\u062c']), ('\U0001ee24', &['\u0647']), ('\U0001ee27', &['\u062d']), - ('\U0001ee29', &['\u064a']), ('\U0001ee2a', &['\u0643']), ('\U0001ee2b', &['\u0644']), - ('\U0001ee2c', &['\u0645']), ('\U0001ee2d', &['\u0646']), ('\U0001ee2e', &['\u0633']), - ('\U0001ee2f', &['\u0639']), ('\U0001ee30', &['\u0641']), ('\U0001ee31', &['\u0635']), - ('\U0001ee32', &['\u0642']), ('\U0001ee34', &['\u0634']), ('\U0001ee35', &['\u062a']), - ('\U0001ee36', &['\u062b']), ('\U0001ee37', &['\u062e']), ('\U0001ee39', &['\u0636']), - ('\U0001ee3b', &['\u063a']), ('\U0001ee42', &['\u062c']), ('\U0001ee47', &['\u062d']), - ('\U0001ee49', &['\u064a']), ('\U0001ee4b', &['\u0644']), ('\U0001ee4d', &['\u0646']), - ('\U0001ee4e', &['\u0633']), ('\U0001ee4f', &['\u0639']), ('\U0001ee51', &['\u0635']), - ('\U0001ee52', &['\u0642']), ('\U0001ee54', &['\u0634']), ('\U0001ee57', &['\u062e']), - ('\U0001ee59', &['\u0636']), ('\U0001ee5b', &['\u063a']), ('\U0001ee5d', &['\u06ba']), - ('\U0001ee5f', &['\u066f']), ('\U0001ee61', &['\u0628']), ('\U0001ee62', &['\u062c']), - ('\U0001ee64', &['\u0647']), ('\U0001ee67', &['\u062d']), ('\U0001ee68', &['\u0637']), - ('\U0001ee69', &['\u064a']), ('\U0001ee6a', &['\u0643']), ('\U0001ee6c', &['\u0645']), - ('\U0001ee6d', &['\u0646']), ('\U0001ee6e', &['\u0633']), ('\U0001ee6f', &['\u0639']), - ('\U0001ee70', &['\u0641']), ('\U0001ee71', &['\u0635']), ('\U0001ee72', &['\u0642']), - ('\U0001ee74', &['\u0634']), ('\U0001ee75', &['\u062a']), ('\U0001ee76', &['\u062b']), - ('\U0001ee77', &['\u062e']), ('\U0001ee79', &['\u0636']), ('\U0001ee7a', &['\u0638']), - ('\U0001ee7b', &['\u063a']), ('\U0001ee7c', &['\u066e']), ('\U0001ee7e', &['\u06a1']), - ('\U0001ee80', &['\u0627']), ('\U0001ee81', &['\u0628']), ('\U0001ee82', &['\u062c']), - ('\U0001ee83', &['\u062f']), ('\U0001ee84', &['\u0647']), ('\U0001ee85', &['\u0648']), - ('\U0001ee86', &['\u0632']), ('\U0001ee87', &['\u062d']), ('\U0001ee88', &['\u0637']), - ('\U0001ee89', &['\u064a']), ('\U0001ee8b', &['\u0644']), ('\U0001ee8c', &['\u0645']), - ('\U0001ee8d', &['\u0646']), ('\U0001ee8e', &['\u0633']), ('\U0001ee8f', &['\u0639']), - ('\U0001ee90', &['\u0641']), ('\U0001ee91', &['\u0635']), ('\U0001ee92', &['\u0642']), - ('\U0001ee93', &['\u0631']), ('\U0001ee94', &['\u0634']), ('\U0001ee95', &['\u062a']), - ('\U0001ee96', &['\u062b']), ('\U0001ee97', &['\u062e']), ('\U0001ee98', &['\u0630']), - ('\U0001ee99', &['\u0636']), ('\U0001ee9a', &['\u0638']), ('\U0001ee9b', &['\u063a']), - ('\U0001eea1', &['\u0628']), ('\U0001eea2', &['\u062c']), ('\U0001eea3', &['\u062f']), - ('\U0001eea5', &['\u0648']), ('\U0001eea6', &['\u0632']), ('\U0001eea7', &['\u062d']), - ('\U0001eea8', &['\u0637']), ('\U0001eea9', &['\u064a']), ('\U0001eeab', &['\u0644']), - ('\U0001eeac', &['\u0645']), ('\U0001eead', &['\u0646']), ('\U0001eeae', &['\u0633']), - ('\U0001eeaf', &['\u0639']), ('\U0001eeb0', &['\u0641']), ('\U0001eeb1', &['\u0635']), - ('\U0001eeb2', &['\u0642']), ('\U0001eeb3', &['\u0631']), ('\U0001eeb4', &['\u0634']), - ('\U0001eeb5', &['\u062a']), ('\U0001eeb6', &['\u062b']), ('\U0001eeb7', &['\u062e']), - ('\U0001eeb8', &['\u0630']), ('\U0001eeb9', &['\u0636']), ('\U0001eeba', &['\u0638']), - ('\U0001eebb', &['\u063a']), ('\U0001f100', &['\x30', '\x2e']), ('\U0001f101', &['\x30', - '\x2c']), ('\U0001f102', &['\x31', '\x2c']), ('\U0001f103', &['\x32', '\x2c']), - ('\U0001f104', &['\x33', '\x2c']), ('\U0001f105', &['\x34', '\x2c']), ('\U0001f106', - &['\x35', '\x2c']), ('\U0001f107', &['\x36', '\x2c']), ('\U0001f108', &['\x37', '\x2c']), - ('\U0001f109', &['\x38', '\x2c']), ('\U0001f10a', &['\x39', '\x2c']), ('\U0001f110', - &['\x28', '\x41', '\x29']), ('\U0001f111', &['\x28', '\x42', '\x29']), ('\U0001f112', - &['\x28', '\x43', '\x29']), ('\U0001f113', &['\x28', '\x44', '\x29']), ('\U0001f114', - &['\x28', '\x45', '\x29']), ('\U0001f115', &['\x28', '\x46', '\x29']), ('\U0001f116', - &['\x28', '\x47', '\x29']), ('\U0001f117', &['\x28', '\x48', '\x29']), ('\U0001f118', - &['\x28', '\x49', '\x29']), ('\U0001f119', &['\x28', '\x4a', '\x29']), ('\U0001f11a', - &['\x28', '\x4b', '\x29']), ('\U0001f11b', &['\x28', '\x4c', '\x29']), ('\U0001f11c', - &['\x28', '\x4d', '\x29']), ('\U0001f11d', &['\x28', '\x4e', '\x29']), ('\U0001f11e', - &['\x28', '\x4f', '\x29']), ('\U0001f11f', &['\x28', '\x50', '\x29']), ('\U0001f120', - &['\x28', '\x51', '\x29']), ('\U0001f121', &['\x28', '\x52', '\x29']), ('\U0001f122', - &['\x28', '\x53', '\x29']), ('\U0001f123', &['\x28', '\x54', '\x29']), ('\U0001f124', - &['\x28', '\x55', '\x29']), ('\U0001f125', &['\x28', '\x56', '\x29']), ('\U0001f126', - &['\x28', '\x57', '\x29']), ('\U0001f127', &['\x28', '\x58', '\x29']), ('\U0001f128', - &['\x28', '\x59', '\x29']), ('\U0001f129', &['\x28', '\x5a', '\x29']), ('\U0001f12a', - &['\u3014', '\x53', '\u3015']), ('\U0001f12b', &['\x43']), ('\U0001f12c', &['\x52']), - ('\U0001f12d', &['\x43', '\x44']), ('\U0001f12e', &['\x57', '\x5a']), ('\U0001f130', - &['\x41']), ('\U0001f131', &['\x42']), ('\U0001f132', &['\x43']), ('\U0001f133', &['\x44']), - ('\U0001f134', &['\x45']), ('\U0001f135', &['\x46']), ('\U0001f136', &['\x47']), - ('\U0001f137', &['\x48']), ('\U0001f138', &['\x49']), ('\U0001f139', &['\x4a']), - ('\U0001f13a', &['\x4b']), ('\U0001f13b', &['\x4c']), ('\U0001f13c', &['\x4d']), - ('\U0001f13d', &['\x4e']), ('\U0001f13e', &['\x4f']), ('\U0001f13f', &['\x50']), - ('\U0001f140', &['\x51']), ('\U0001f141', &['\x52']), ('\U0001f142', &['\x53']), - ('\U0001f143', &['\x54']), ('\U0001f144', &['\x55']), ('\U0001f145', &['\x56']), - ('\U0001f146', &['\x57']), ('\U0001f147', &['\x58']), ('\U0001f148', &['\x59']), - ('\U0001f149', &['\x5a']), ('\U0001f14a', &['\x48', '\x56']), ('\U0001f14b', &['\x4d', - '\x56']), ('\U0001f14c', &['\x53', '\x44']), ('\U0001f14d', &['\x53', '\x53']), - ('\U0001f14e', &['\x50', '\x50', '\x56']), ('\U0001f14f', &['\x57', '\x43']), ('\U0001f16a', - &['\x4d', '\x43']), ('\U0001f16b', &['\x4d', '\x44']), ('\U0001f190', &['\x44', '\x4a']), - ('\U0001f200', &['\u307b', '\u304b']), ('\U0001f201', &['\u30b3', '\u30b3']), ('\U0001f202', - &['\u30b5']), ('\U0001f210', &['\u624b']), ('\U0001f211', &['\u5b57']), ('\U0001f212', - &['\u53cc']), ('\U0001f213', &['\u30c7']), ('\U0001f214', &['\u4e8c']), ('\U0001f215', - &['\u591a']), ('\U0001f216', &['\u89e3']), ('\U0001f217', &['\u5929']), ('\U0001f218', - &['\u4ea4']), ('\U0001f219', &['\u6620']), ('\U0001f21a', &['\u7121']), ('\U0001f21b', - &['\u6599']), ('\U0001f21c', &['\u524d']), ('\U0001f21d', &['\u5f8c']), ('\U0001f21e', - &['\u518d']), ('\U0001f21f', &['\u65b0']), ('\U0001f220', &['\u521d']), ('\U0001f221', - &['\u7d42']), ('\U0001f222', &['\u751f']), ('\U0001f223', &['\u8ca9']), ('\U0001f224', - &['\u58f0']), ('\U0001f225', &['\u5439']), ('\U0001f226', &['\u6f14']), ('\U0001f227', - &['\u6295']), ('\U0001f228', &['\u6355']), ('\U0001f229', &['\u4e00']), ('\U0001f22a', - &['\u4e09']), ('\U0001f22b', &['\u904a']), ('\U0001f22c', &['\u5de6']), ('\U0001f22d', - &['\u4e2d']), ('\U0001f22e', &['\u53f3']), ('\U0001f22f', &['\u6307']), ('\U0001f230', - &['\u8d70']), ('\U0001f231', &['\u6253']), ('\U0001f232', &['\u7981']), ('\U0001f233', - &['\u7a7a']), ('\U0001f234', &['\u5408']), ('\U0001f235', &['\u6e80']), ('\U0001f236', - &['\u6709']), ('\U0001f237', &['\u6708']), ('\U0001f238', &['\u7533']), ('\U0001f239', - &['\u5272']), ('\U0001f23a', &['\u55b6']), ('\U0001f240', &['\u3014', '\u672c', '\u3015']), - ('\U0001f241', &['\u3014', '\u4e09', '\u3015']), ('\U0001f242', &['\u3014', '\u4e8c', - '\u3015']), ('\U0001f243', &['\u3014', '\u5b89', '\u3015']), ('\U0001f244', &['\u3014', - '\u70b9', '\u3015']), ('\U0001f245', &['\u3014', '\u6253', '\u3015']), ('\U0001f246', - &['\u3014', '\u76d7', '\u3015']), ('\U0001f247', &['\u3014', '\u52dd', '\u3015']), - ('\U0001f248', &['\u3014', '\u6557', '\u3015']), ('\U0001f250', &['\u5f97']), ('\U0001f251', - &['\u53ef']) - ]; - static combining_class_table : &'static [(char, char, u8)] = &[ ('\u0300', '\u0314', 230), ('\u0315', '\u0315', 232), ('\u0316', '\u0319', 220), ('\u031a', '\u031a', 232), @@ -2282,2894 +178,8 @@ pub mod decompose { ('\U0001d185', '\U0001d189', 230), ('\U0001d18a', '\U0001d18b', 220), ('\U0001d1aa', '\U0001d1ad', 230), ('\U0001d242', '\U0001d244', 230) ]; - pub fn canonical(c: char, i: |char|) { d(c, i, false); } - - pub fn compatibility(c: char, i: |char|) { d(c, i, true); } pub fn canonical_combining_class(c: char) -> u8 { bsearch_range_value_table(c, combining_class_table) } - - fn d(c: char, i: |char|, k: bool) { - use iter::Iterator; - if c <= '\x7f' { i(c); return; } - - match bsearch_table(c, canonical_table) { - Some(canon) => { - for x in canon.iter() { - d(*x, |b| i(b), k); - } - return; - } - None => () - } - - if !k { i(c); return; } - - match bsearch_table(c, compatibility_table) { - Some(compat) => { - for x in compat.iter() { - d(*x, |b| i(b), k); - } - return; - } - None => () - } - - i(c); - } -} - -pub mod derived_property { - static Alphabetic_table : &'static [(char,char)] = &[ - ('\x41', '\x5a'), ('\x61', '\x7a'), - ('\xaa', '\xaa'), ('\xb5', '\xb5'), - ('\xba', '\xba'), ('\xc0', '\xd6'), - ('\xd8', '\xf6'), ('\xf8', '\u01ba'), - ('\u01bb', '\u01bb'), ('\u01bc', '\u01bf'), - ('\u01c0', '\u01c3'), ('\u01c4', '\u0293'), - ('\u0294', '\u0294'), ('\u0295', '\u02af'), - ('\u02b0', '\u02c1'), ('\u02c6', '\u02d1'), - ('\u02e0', '\u02e4'), ('\u02ec', '\u02ec'), - ('\u02ee', '\u02ee'), ('\u0345', '\u0345'), - ('\u0370', '\u0373'), ('\u0374', '\u0374'), - ('\u0376', '\u0377'), ('\u037a', '\u037a'), - ('\u037b', '\u037d'), ('\u0386', '\u0386'), - ('\u0388', '\u038a'), ('\u038c', '\u038c'), - ('\u038e', '\u03a1'), ('\u03a3', '\u03f5'), - ('\u03f7', '\u0481'), ('\u048a', '\u0527'), - ('\u0531', '\u0556'), ('\u0559', '\u0559'), - ('\u0561', '\u0587'), ('\u05b0', '\u05bd'), - ('\u05bf', '\u05bf'), ('\u05c1', '\u05c2'), - ('\u05c4', '\u05c5'), ('\u05c7', '\u05c7'), - ('\u05d0', '\u05ea'), ('\u05f0', '\u05f2'), - ('\u0610', '\u061a'), ('\u0620', '\u063f'), - ('\u0640', '\u0640'), ('\u0641', '\u064a'), - ('\u064b', '\u0657'), ('\u0659', '\u065f'), - ('\u066e', '\u066f'), ('\u0670', '\u0670'), - ('\u0671', '\u06d3'), ('\u06d5', '\u06d5'), - ('\u06d6', '\u06dc'), ('\u06e1', '\u06e4'), - ('\u06e5', '\u06e6'), ('\u06e7', '\u06e8'), - ('\u06ed', '\u06ed'), ('\u06ee', '\u06ef'), - ('\u06fa', '\u06fc'), ('\u06ff', '\u06ff'), - ('\u0710', '\u0710'), ('\u0711', '\u0711'), - ('\u0712', '\u072f'), ('\u0730', '\u073f'), - ('\u074d', '\u07a5'), ('\u07a6', '\u07b0'), - ('\u07b1', '\u07b1'), ('\u07ca', '\u07ea'), - ('\u07f4', '\u07f5'), ('\u07fa', '\u07fa'), - ('\u0800', '\u0815'), ('\u0816', '\u0817'), - ('\u081a', '\u081a'), ('\u081b', '\u0823'), - ('\u0824', '\u0824'), ('\u0825', '\u0827'), - ('\u0828', '\u0828'), ('\u0829', '\u082c'), - ('\u0840', '\u0858'), ('\u08a0', '\u08a0'), - ('\u08a2', '\u08ac'), ('\u08e4', '\u08e9'), - ('\u08f0', '\u08fe'), ('\u0900', '\u0902'), - ('\u0903', '\u0903'), ('\u0904', '\u0939'), - ('\u093a', '\u093a'), ('\u093b', '\u093b'), - ('\u093d', '\u093d'), ('\u093e', '\u0940'), - ('\u0941', '\u0948'), ('\u0949', '\u094c'), - ('\u094e', '\u094f'), ('\u0950', '\u0950'), - ('\u0955', '\u0957'), ('\u0958', '\u0961'), - ('\u0962', '\u0963'), ('\u0971', '\u0971'), - ('\u0972', '\u0977'), ('\u0979', '\u097f'), - ('\u0981', '\u0981'), ('\u0982', '\u0983'), - ('\u0985', '\u098c'), ('\u098f', '\u0990'), - ('\u0993', '\u09a8'), ('\u09aa', '\u09b0'), - ('\u09b2', '\u09b2'), ('\u09b6', '\u09b9'), - ('\u09bd', '\u09bd'), ('\u09be', '\u09c0'), - ('\u09c1', '\u09c4'), ('\u09c7', '\u09c8'), - ('\u09cb', '\u09cc'), ('\u09ce', '\u09ce'), - ('\u09d7', '\u09d7'), ('\u09dc', '\u09dd'), - ('\u09df', '\u09e1'), ('\u09e2', '\u09e3'), - ('\u09f0', '\u09f1'), ('\u0a01', '\u0a02'), - ('\u0a03', '\u0a03'), ('\u0a05', '\u0a0a'), - ('\u0a0f', '\u0a10'), ('\u0a13', '\u0a28'), - ('\u0a2a', '\u0a30'), ('\u0a32', '\u0a33'), - ('\u0a35', '\u0a36'), ('\u0a38', '\u0a39'), - ('\u0a3e', '\u0a40'), ('\u0a41', '\u0a42'), - ('\u0a47', '\u0a48'), ('\u0a4b', '\u0a4c'), - ('\u0a51', '\u0a51'), ('\u0a59', '\u0a5c'), - ('\u0a5e', '\u0a5e'), ('\u0a70', '\u0a71'), - ('\u0a72', '\u0a74'), ('\u0a75', '\u0a75'), - ('\u0a81', '\u0a82'), ('\u0a83', '\u0a83'), - ('\u0a85', '\u0a8d'), ('\u0a8f', '\u0a91'), - ('\u0a93', '\u0aa8'), ('\u0aaa', '\u0ab0'), - ('\u0ab2', '\u0ab3'), ('\u0ab5', '\u0ab9'), - ('\u0abd', '\u0abd'), ('\u0abe', '\u0ac0'), - ('\u0ac1', '\u0ac5'), ('\u0ac7', '\u0ac8'), - ('\u0ac9', '\u0ac9'), ('\u0acb', '\u0acc'), - ('\u0ad0', '\u0ad0'), ('\u0ae0', '\u0ae1'), - ('\u0ae2', '\u0ae3'), ('\u0b01', '\u0b01'), - ('\u0b02', '\u0b03'), ('\u0b05', '\u0b0c'), - ('\u0b0f', '\u0b10'), ('\u0b13', '\u0b28'), - ('\u0b2a', '\u0b30'), ('\u0b32', '\u0b33'), - ('\u0b35', '\u0b39'), ('\u0b3d', '\u0b3d'), - ('\u0b3e', '\u0b3e'), ('\u0b3f', '\u0b3f'), - ('\u0b40', '\u0b40'), ('\u0b41', '\u0b44'), - ('\u0b47', '\u0b48'), ('\u0b4b', '\u0b4c'), - ('\u0b56', '\u0b56'), ('\u0b57', '\u0b57'), - ('\u0b5c', '\u0b5d'), ('\u0b5f', '\u0b61'), - ('\u0b62', '\u0b63'), ('\u0b71', '\u0b71'), - ('\u0b82', '\u0b82'), ('\u0b83', '\u0b83'), - ('\u0b85', '\u0b8a'), ('\u0b8e', '\u0b90'), - ('\u0b92', '\u0b95'), ('\u0b99', '\u0b9a'), - ('\u0b9c', '\u0b9c'), ('\u0b9e', '\u0b9f'), - ('\u0ba3', '\u0ba4'), ('\u0ba8', '\u0baa'), - ('\u0bae', '\u0bb9'), ('\u0bbe', '\u0bbf'), - ('\u0bc0', '\u0bc0'), ('\u0bc1', '\u0bc2'), - ('\u0bc6', '\u0bc8'), ('\u0bca', '\u0bcc'), - ('\u0bd0', '\u0bd0'), ('\u0bd7', '\u0bd7'), - ('\u0c01', '\u0c03'), ('\u0c05', '\u0c0c'), - ('\u0c0e', '\u0c10'), ('\u0c12', '\u0c28'), - ('\u0c2a', '\u0c33'), ('\u0c35', '\u0c39'), - ('\u0c3d', '\u0c3d'), ('\u0c3e', '\u0c40'), - ('\u0c41', '\u0c44'), ('\u0c46', '\u0c48'), - ('\u0c4a', '\u0c4c'), ('\u0c55', '\u0c56'), - ('\u0c58', '\u0c59'), ('\u0c60', '\u0c61'), - ('\u0c62', '\u0c63'), ('\u0c82', '\u0c83'), - ('\u0c85', '\u0c8c'), ('\u0c8e', '\u0c90'), - ('\u0c92', '\u0ca8'), ('\u0caa', '\u0cb3'), - ('\u0cb5', '\u0cb9'), ('\u0cbd', '\u0cbd'), - ('\u0cbe', '\u0cbe'), ('\u0cbf', '\u0cbf'), - ('\u0cc0', '\u0cc4'), ('\u0cc6', '\u0cc6'), - ('\u0cc7', '\u0cc8'), ('\u0cca', '\u0ccb'), - ('\u0ccc', '\u0ccc'), ('\u0cd5', '\u0cd6'), - ('\u0cde', '\u0cde'), ('\u0ce0', '\u0ce1'), - ('\u0ce2', '\u0ce3'), ('\u0cf1', '\u0cf2'), - ('\u0d02', '\u0d03'), ('\u0d05', '\u0d0c'), - ('\u0d0e', '\u0d10'), ('\u0d12', '\u0d3a'), - ('\u0d3d', '\u0d3d'), ('\u0d3e', '\u0d40'), - ('\u0d41', '\u0d44'), ('\u0d46', '\u0d48'), - ('\u0d4a', '\u0d4c'), ('\u0d4e', '\u0d4e'), - ('\u0d57', '\u0d57'), ('\u0d60', '\u0d61'), - ('\u0d62', '\u0d63'), ('\u0d7a', '\u0d7f'), - ('\u0d82', '\u0d83'), ('\u0d85', '\u0d96'), - ('\u0d9a', '\u0db1'), ('\u0db3', '\u0dbb'), - ('\u0dbd', '\u0dbd'), ('\u0dc0', '\u0dc6'), - ('\u0dcf', '\u0dd1'), ('\u0dd2', '\u0dd4'), - ('\u0dd6', '\u0dd6'), ('\u0dd8', '\u0ddf'), - ('\u0df2', '\u0df3'), ('\u0e01', '\u0e30'), - ('\u0e31', '\u0e31'), ('\u0e32', '\u0e33'), - ('\u0e34', '\u0e3a'), ('\u0e40', '\u0e45'), - ('\u0e46', '\u0e46'), ('\u0e4d', '\u0e4d'), - ('\u0e81', '\u0e82'), ('\u0e84', '\u0e84'), - ('\u0e87', '\u0e88'), ('\u0e8a', '\u0e8a'), - ('\u0e8d', '\u0e8d'), ('\u0e94', '\u0e97'), - ('\u0e99', '\u0e9f'), ('\u0ea1', '\u0ea3'), - ('\u0ea5', '\u0ea5'), ('\u0ea7', '\u0ea7'), - ('\u0eaa', '\u0eab'), ('\u0ead', '\u0eb0'), - ('\u0eb1', '\u0eb1'), ('\u0eb2', '\u0eb3'), - ('\u0eb4', '\u0eb9'), ('\u0ebb', '\u0ebc'), - ('\u0ebd', '\u0ebd'), ('\u0ec0', '\u0ec4'), - ('\u0ec6', '\u0ec6'), ('\u0ecd', '\u0ecd'), - ('\u0edc', '\u0edf'), ('\u0f00', '\u0f00'), - ('\u0f40', '\u0f47'), ('\u0f49', '\u0f6c'), - ('\u0f71', '\u0f7e'), ('\u0f7f', '\u0f7f'), - ('\u0f80', '\u0f81'), ('\u0f88', '\u0f8c'), - ('\u0f8d', '\u0f97'), ('\u0f99', '\u0fbc'), - ('\u1000', '\u102a'), ('\u102b', '\u102c'), - ('\u102d', '\u1030'), ('\u1031', '\u1031'), - ('\u1032', '\u1036'), ('\u1038', '\u1038'), - ('\u103b', '\u103c'), ('\u103d', '\u103e'), - ('\u103f', '\u103f'), ('\u1050', '\u1055'), - ('\u1056', '\u1057'), ('\u1058', '\u1059'), - ('\u105a', '\u105d'), ('\u105e', '\u1060'), - ('\u1061', '\u1061'), ('\u1062', '\u1062'), - ('\u1065', '\u1066'), ('\u1067', '\u1068'), - ('\u106e', '\u1070'), ('\u1071', '\u1074'), - ('\u1075', '\u1081'), ('\u1082', '\u1082'), - ('\u1083', '\u1084'), ('\u1085', '\u1086'), - ('\u108e', '\u108e'), ('\u109c', '\u109c'), - ('\u109d', '\u109d'), ('\u10a0', '\u10c5'), - ('\u10c7', '\u10c7'), ('\u10cd', '\u10cd'), - ('\u10d0', '\u10fa'), ('\u10fc', '\u10fc'), - ('\u10fd', '\u1248'), ('\u124a', '\u124d'), - ('\u1250', '\u1256'), ('\u1258', '\u1258'), - ('\u125a', '\u125d'), ('\u1260', '\u1288'), - ('\u128a', '\u128d'), ('\u1290', '\u12b0'), - ('\u12b2', '\u12b5'), ('\u12b8', '\u12be'), - ('\u12c0', '\u12c0'), ('\u12c2', '\u12c5'), - ('\u12c8', '\u12d6'), ('\u12d8', '\u1310'), - ('\u1312', '\u1315'), ('\u1318', '\u135a'), - ('\u135f', '\u135f'), ('\u1380', '\u138f'), - ('\u13a0', '\u13f4'), ('\u1401', '\u166c'), - ('\u166f', '\u167f'), ('\u1681', '\u169a'), - ('\u16a0', '\u16ea'), ('\u16ee', '\u16f0'), - ('\u1700', '\u170c'), ('\u170e', '\u1711'), - ('\u1712', '\u1713'), ('\u1720', '\u1731'), - ('\u1732', '\u1733'), ('\u1740', '\u1751'), - ('\u1752', '\u1753'), ('\u1760', '\u176c'), - ('\u176e', '\u1770'), ('\u1772', '\u1773'), - ('\u1780', '\u17b3'), ('\u17b6', '\u17b6'), - ('\u17b7', '\u17bd'), ('\u17be', '\u17c5'), - ('\u17c6', '\u17c6'), ('\u17c7', '\u17c8'), - ('\u17d7', '\u17d7'), ('\u17dc', '\u17dc'), - ('\u1820', '\u1842'), ('\u1843', '\u1843'), - ('\u1844', '\u1877'), ('\u1880', '\u18a8'), - ('\u18a9', '\u18a9'), ('\u18aa', '\u18aa'), - ('\u18b0', '\u18f5'), ('\u1900', '\u191c'), - ('\u1920', '\u1922'), ('\u1923', '\u1926'), - ('\u1927', '\u1928'), ('\u1929', '\u192b'), - ('\u1930', '\u1931'), ('\u1932', '\u1932'), - ('\u1933', '\u1938'), ('\u1950', '\u196d'), - ('\u1970', '\u1974'), ('\u1980', '\u19ab'), - ('\u19b0', '\u19c0'), ('\u19c1', '\u19c7'), - ('\u19c8', '\u19c9'), ('\u1a00', '\u1a16'), - ('\u1a17', '\u1a18'), ('\u1a19', '\u1a1a'), - ('\u1a1b', '\u1a1b'), ('\u1a20', '\u1a54'), - ('\u1a55', '\u1a55'), ('\u1a56', '\u1a56'), - ('\u1a57', '\u1a57'), ('\u1a58', '\u1a5e'), - ('\u1a61', '\u1a61'), ('\u1a62', '\u1a62'), - ('\u1a63', '\u1a64'), ('\u1a65', '\u1a6c'), - ('\u1a6d', '\u1a72'), ('\u1a73', '\u1a74'), - ('\u1aa7', '\u1aa7'), ('\u1b00', '\u1b03'), - ('\u1b04', '\u1b04'), ('\u1b05', '\u1b33'), - ('\u1b35', '\u1b35'), ('\u1b36', '\u1b3a'), - ('\u1b3b', '\u1b3b'), ('\u1b3c', '\u1b3c'), - ('\u1b3d', '\u1b41'), ('\u1b42', '\u1b42'), - ('\u1b43', '\u1b43'), ('\u1b45', '\u1b4b'), - ('\u1b80', '\u1b81'), ('\u1b82', '\u1b82'), - ('\u1b83', '\u1ba0'), ('\u1ba1', '\u1ba1'), - ('\u1ba2', '\u1ba5'), ('\u1ba6', '\u1ba7'), - ('\u1ba8', '\u1ba9'), ('\u1bac', '\u1bad'), - ('\u1bae', '\u1baf'), ('\u1bba', '\u1be5'), - ('\u1be7', '\u1be7'), ('\u1be8', '\u1be9'), - ('\u1bea', '\u1bec'), ('\u1bed', '\u1bed'), - ('\u1bee', '\u1bee'), ('\u1bef', '\u1bf1'), - ('\u1c00', '\u1c23'), ('\u1c24', '\u1c2b'), - ('\u1c2c', '\u1c33'), ('\u1c34', '\u1c35'), - ('\u1c4d', '\u1c4f'), ('\u1c5a', '\u1c77'), - ('\u1c78', '\u1c7d'), ('\u1ce9', '\u1cec'), - ('\u1cee', '\u1cf1'), ('\u1cf2', '\u1cf3'), - ('\u1cf5', '\u1cf6'), ('\u1d00', '\u1d2b'), - ('\u1d2c', '\u1d6a'), ('\u1d6b', '\u1d77'), - ('\u1d78', '\u1d78'), ('\u1d79', '\u1d9a'), - ('\u1d9b', '\u1dbf'), ('\u1e00', '\u1f15'), - ('\u1f18', '\u1f1d'), ('\u1f20', '\u1f45'), - ('\u1f48', '\u1f4d'), ('\u1f50', '\u1f57'), - ('\u1f59', '\u1f59'), ('\u1f5b', '\u1f5b'), - ('\u1f5d', '\u1f5d'), ('\u1f5f', '\u1f7d'), - ('\u1f80', '\u1fb4'), ('\u1fb6', '\u1fbc'), - ('\u1fbe', '\u1fbe'), ('\u1fc2', '\u1fc4'), - ('\u1fc6', '\u1fcc'), ('\u1fd0', '\u1fd3'), - ('\u1fd6', '\u1fdb'), ('\u1fe0', '\u1fec'), - ('\u1ff2', '\u1ff4'), ('\u1ff6', '\u1ffc'), - ('\u2071', '\u2071'), ('\u207f', '\u207f'), - ('\u2090', '\u209c'), ('\u2102', '\u2102'), - ('\u2107', '\u2107'), ('\u210a', '\u2113'), - ('\u2115', '\u2115'), ('\u2119', '\u211d'), - ('\u2124', '\u2124'), ('\u2126', '\u2126'), - ('\u2128', '\u2128'), ('\u212a', '\u212d'), - ('\u212f', '\u2134'), ('\u2135', '\u2138'), - ('\u2139', '\u2139'), ('\u213c', '\u213f'), - ('\u2145', '\u2149'), ('\u214e', '\u214e'), - ('\u2160', '\u2182'), ('\u2183', '\u2184'), - ('\u2185', '\u2188'), ('\u24b6', '\u24e9'), - ('\u2c00', '\u2c2e'), ('\u2c30', '\u2c5e'), - ('\u2c60', '\u2c7b'), ('\u2c7c', '\u2c7d'), - ('\u2c7e', '\u2ce4'), ('\u2ceb', '\u2cee'), - ('\u2cf2', '\u2cf3'), ('\u2d00', '\u2d25'), - ('\u2d27', '\u2d27'), ('\u2d2d', '\u2d2d'), - ('\u2d30', '\u2d67'), ('\u2d6f', '\u2d6f'), - ('\u2d80', '\u2d96'), ('\u2da0', '\u2da6'), - ('\u2da8', '\u2dae'), ('\u2db0', '\u2db6'), - ('\u2db8', '\u2dbe'), ('\u2dc0', '\u2dc6'), - ('\u2dc8', '\u2dce'), ('\u2dd0', '\u2dd6'), - ('\u2dd8', '\u2dde'), ('\u2de0', '\u2dff'), - ('\u2e2f', '\u2e2f'), ('\u3005', '\u3005'), - ('\u3006', '\u3006'), ('\u3007', '\u3007'), - ('\u3021', '\u3029'), ('\u3031', '\u3035'), - ('\u3038', '\u303a'), ('\u303b', '\u303b'), - ('\u303c', '\u303c'), ('\u3041', '\u3096'), - ('\u309d', '\u309e'), ('\u309f', '\u309f'), - ('\u30a1', '\u30fa'), ('\u30fc', '\u30fe'), - ('\u30ff', '\u30ff'), ('\u3105', '\u312d'), - ('\u3131', '\u318e'), ('\u31a0', '\u31ba'), - ('\u31f0', '\u31ff'), ('\u3400', '\u4db5'), - ('\u4e00', '\u9fcc'), ('\ua000', '\ua014'), - ('\ua015', '\ua015'), ('\ua016', '\ua48c'), - ('\ua4d0', '\ua4f7'), ('\ua4f8', '\ua4fd'), - ('\ua500', '\ua60b'), ('\ua60c', '\ua60c'), - ('\ua610', '\ua61f'), ('\ua62a', '\ua62b'), - ('\ua640', '\ua66d'), ('\ua66e', '\ua66e'), - ('\ua674', '\ua67b'), ('\ua67f', '\ua67f'), - ('\ua680', '\ua697'), ('\ua69f', '\ua69f'), - ('\ua6a0', '\ua6e5'), ('\ua6e6', '\ua6ef'), - ('\ua717', '\ua71f'), ('\ua722', '\ua76f'), - ('\ua770', '\ua770'), ('\ua771', '\ua787'), - ('\ua788', '\ua788'), ('\ua78b', '\ua78e'), - ('\ua790', '\ua793'), ('\ua7a0', '\ua7aa'), - ('\ua7f8', '\ua7f9'), ('\ua7fa', '\ua7fa'), - ('\ua7fb', '\ua801'), ('\ua803', '\ua805'), - ('\ua807', '\ua80a'), ('\ua80c', '\ua822'), - ('\ua823', '\ua824'), ('\ua825', '\ua826'), - ('\ua827', '\ua827'), ('\ua840', '\ua873'), - ('\ua880', '\ua881'), ('\ua882', '\ua8b3'), - ('\ua8b4', '\ua8c3'), ('\ua8f2', '\ua8f7'), - ('\ua8fb', '\ua8fb'), ('\ua90a', '\ua925'), - ('\ua926', '\ua92a'), ('\ua930', '\ua946'), - ('\ua947', '\ua951'), ('\ua952', '\ua952'), - ('\ua960', '\ua97c'), ('\ua980', '\ua982'), - ('\ua983', '\ua983'), ('\ua984', '\ua9b2'), - ('\ua9b4', '\ua9b5'), ('\ua9b6', '\ua9b9'), - ('\ua9ba', '\ua9bb'), ('\ua9bc', '\ua9bc'), - ('\ua9bd', '\ua9bf'), ('\ua9cf', '\ua9cf'), - ('\uaa00', '\uaa28'), ('\uaa29', '\uaa2e'), - ('\uaa2f', '\uaa30'), ('\uaa31', '\uaa32'), - ('\uaa33', '\uaa34'), ('\uaa35', '\uaa36'), - ('\uaa40', '\uaa42'), ('\uaa43', '\uaa43'), - ('\uaa44', '\uaa4b'), ('\uaa4c', '\uaa4c'), - ('\uaa4d', '\uaa4d'), ('\uaa60', '\uaa6f'), - ('\uaa70', '\uaa70'), ('\uaa71', '\uaa76'), - ('\uaa7a', '\uaa7a'), ('\uaa80', '\uaaaf'), - ('\uaab0', '\uaab0'), ('\uaab1', '\uaab1'), - ('\uaab2', '\uaab4'), ('\uaab5', '\uaab6'), - ('\uaab7', '\uaab8'), ('\uaab9', '\uaabd'), - ('\uaabe', '\uaabe'), ('\uaac0', '\uaac0'), - ('\uaac2', '\uaac2'), ('\uaadb', '\uaadc'), - ('\uaadd', '\uaadd'), ('\uaae0', '\uaaea'), - ('\uaaeb', '\uaaeb'), ('\uaaec', '\uaaed'), - ('\uaaee', '\uaaef'), ('\uaaf2', '\uaaf2'), - ('\uaaf3', '\uaaf4'), ('\uaaf5', '\uaaf5'), - ('\uab01', '\uab06'), ('\uab09', '\uab0e'), - ('\uab11', '\uab16'), ('\uab20', '\uab26'), - ('\uab28', '\uab2e'), ('\uabc0', '\uabe2'), - ('\uabe3', '\uabe4'), ('\uabe5', '\uabe5'), - ('\uabe6', '\uabe7'), ('\uabe8', '\uabe8'), - ('\uabe9', '\uabea'), ('\uac00', '\ud7a3'), - ('\ud7b0', '\ud7c6'), ('\ud7cb', '\ud7fb'), - ('\uf900', '\ufa6d'), ('\ufa70', '\ufad9'), - ('\ufb00', '\ufb06'), ('\ufb13', '\ufb17'), - ('\ufb1d', '\ufb1d'), ('\ufb1e', '\ufb1e'), - ('\ufb1f', '\ufb28'), ('\ufb2a', '\ufb36'), - ('\ufb38', '\ufb3c'), ('\ufb3e', '\ufb3e'), - ('\ufb40', '\ufb41'), ('\ufb43', '\ufb44'), - ('\ufb46', '\ufbb1'), ('\ufbd3', '\ufd3d'), - ('\ufd50', '\ufd8f'), ('\ufd92', '\ufdc7'), - ('\ufdf0', '\ufdfb'), ('\ufe70', '\ufe74'), - ('\ufe76', '\ufefc'), ('\uff21', '\uff3a'), - ('\uff41', '\uff5a'), ('\uff66', '\uff6f'), - ('\uff70', '\uff70'), ('\uff71', '\uff9d'), - ('\uff9e', '\uff9f'), ('\uffa0', '\uffbe'), - ('\uffc2', '\uffc7'), ('\uffca', '\uffcf'), - ('\uffd2', '\uffd7'), ('\uffda', '\uffdc'), - ('\U00010000', '\U0001000b'), ('\U0001000d', '\U00010026'), - ('\U00010028', '\U0001003a'), ('\U0001003c', '\U0001003d'), - ('\U0001003f', '\U0001004d'), ('\U00010050', '\U0001005d'), - ('\U00010080', '\U000100fa'), ('\U00010140', '\U00010174'), - ('\U00010280', '\U0001029c'), ('\U000102a0', '\U000102d0'), - ('\U00010300', '\U0001031e'), ('\U00010330', '\U00010340'), - ('\U00010341', '\U00010341'), ('\U00010342', '\U00010349'), - ('\U0001034a', '\U0001034a'), ('\U00010380', '\U0001039d'), - ('\U000103a0', '\U000103c3'), ('\U000103c8', '\U000103cf'), - ('\U000103d1', '\U000103d5'), ('\U00010400', '\U0001044f'), - ('\U00010450', '\U0001049d'), ('\U00010800', '\U00010805'), - ('\U00010808', '\U00010808'), ('\U0001080a', '\U00010835'), - ('\U00010837', '\U00010838'), ('\U0001083c', '\U0001083c'), - ('\U0001083f', '\U00010855'), ('\U00010900', '\U00010915'), - ('\U00010920', '\U00010939'), ('\U00010980', '\U000109b7'), - ('\U000109be', '\U000109bf'), ('\U00010a00', '\U00010a00'), - ('\U00010a01', '\U00010a03'), ('\U00010a05', '\U00010a06'), - ('\U00010a0c', '\U00010a0f'), ('\U00010a10', '\U00010a13'), - ('\U00010a15', '\U00010a17'), ('\U00010a19', '\U00010a33'), - ('\U00010a60', '\U00010a7c'), ('\U00010b00', '\U00010b35'), - ('\U00010b40', '\U00010b55'), ('\U00010b60', '\U00010b72'), - ('\U00010c00', '\U00010c48'), ('\U00011000', '\U00011000'), - ('\U00011001', '\U00011001'), ('\U00011002', '\U00011002'), - ('\U00011003', '\U00011037'), ('\U00011038', '\U00011045'), - ('\U00011082', '\U00011082'), ('\U00011083', '\U000110af'), - ('\U000110b0', '\U000110b2'), ('\U000110b3', '\U000110b6'), - ('\U000110b7', '\U000110b8'), ('\U000110d0', '\U000110e8'), - ('\U00011100', '\U00011102'), ('\U00011103', '\U00011126'), - ('\U00011127', '\U0001112b'), ('\U0001112c', '\U0001112c'), - ('\U0001112d', '\U00011132'), ('\U00011180', '\U00011181'), - ('\U00011182', '\U00011182'), ('\U00011183', '\U000111b2'), - ('\U000111b3', '\U000111b5'), ('\U000111b6', '\U000111be'), - ('\U000111bf', '\U000111bf'), ('\U000111c1', '\U000111c4'), - ('\U00011680', '\U000116aa'), ('\U000116ab', '\U000116ab'), - ('\U000116ac', '\U000116ac'), ('\U000116ad', '\U000116ad'), - ('\U000116ae', '\U000116af'), ('\U000116b0', '\U000116b5'), - ('\U00012000', '\U0001236e'), ('\U00012400', '\U00012462'), - ('\U00013000', '\U0001342e'), ('\U00016800', '\U00016a38'), - ('\U00016f00', '\U00016f44'), ('\U00016f50', '\U00016f50'), - ('\U00016f51', '\U00016f7e'), ('\U00016f93', '\U00016f9f'), - ('\U0001b000', '\U0001b001'), ('\U0001d400', '\U0001d454'), - ('\U0001d456', '\U0001d49c'), ('\U0001d49e', '\U0001d49f'), - ('\U0001d4a2', '\U0001d4a2'), ('\U0001d4a5', '\U0001d4a6'), - ('\U0001d4a9', '\U0001d4ac'), ('\U0001d4ae', '\U0001d4b9'), - ('\U0001d4bb', '\U0001d4bb'), ('\U0001d4bd', '\U0001d4c3'), - ('\U0001d4c5', '\U0001d505'), ('\U0001d507', '\U0001d50a'), - ('\U0001d50d', '\U0001d514'), ('\U0001d516', '\U0001d51c'), - ('\U0001d51e', '\U0001d539'), ('\U0001d53b', '\U0001d53e'), - ('\U0001d540', '\U0001d544'), ('\U0001d546', '\U0001d546'), - ('\U0001d54a', '\U0001d550'), ('\U0001d552', '\U0001d6a5'), - ('\U0001d6a8', '\U0001d6c0'), ('\U0001d6c2', '\U0001d6da'), - ('\U0001d6dc', '\U0001d6fa'), ('\U0001d6fc', '\U0001d714'), - ('\U0001d716', '\U0001d734'), ('\U0001d736', '\U0001d74e'), - ('\U0001d750', '\U0001d76e'), ('\U0001d770', '\U0001d788'), - ('\U0001d78a', '\U0001d7a8'), ('\U0001d7aa', '\U0001d7c2'), - ('\U0001d7c4', '\U0001d7cb'), ('\U0001ee00', '\U0001ee03'), - ('\U0001ee05', '\U0001ee1f'), ('\U0001ee21', '\U0001ee22'), - ('\U0001ee24', '\U0001ee24'), ('\U0001ee27', '\U0001ee27'), - ('\U0001ee29', '\U0001ee32'), ('\U0001ee34', '\U0001ee37'), - ('\U0001ee39', '\U0001ee39'), ('\U0001ee3b', '\U0001ee3b'), - ('\U0001ee42', '\U0001ee42'), ('\U0001ee47', '\U0001ee47'), - ('\U0001ee49', '\U0001ee49'), ('\U0001ee4b', '\U0001ee4b'), - ('\U0001ee4d', '\U0001ee4f'), ('\U0001ee51', '\U0001ee52'), - ('\U0001ee54', '\U0001ee54'), ('\U0001ee57', '\U0001ee57'), - ('\U0001ee59', '\U0001ee59'), ('\U0001ee5b', '\U0001ee5b'), - ('\U0001ee5d', '\U0001ee5d'), ('\U0001ee5f', '\U0001ee5f'), - ('\U0001ee61', '\U0001ee62'), ('\U0001ee64', '\U0001ee64'), - ('\U0001ee67', '\U0001ee6a'), ('\U0001ee6c', '\U0001ee72'), - ('\U0001ee74', '\U0001ee77'), ('\U0001ee79', '\U0001ee7c'), - ('\U0001ee7e', '\U0001ee7e'), ('\U0001ee80', '\U0001ee89'), - ('\U0001ee8b', '\U0001ee9b'), ('\U0001eea1', '\U0001eea3'), - ('\U0001eea5', '\U0001eea9'), ('\U0001eeab', '\U0001eebb'), - ('\U00020000', '\U0002a6d6'), ('\U0002a700', '\U0002b734'), - ('\U0002b740', '\U0002b81d'), ('\U0002f800', '\U0002fa1d') - ]; - - pub fn Alphabetic(c: char) -> bool { - super::bsearch_range_table(c, Alphabetic_table) - } - - static Lowercase_table : &'static [(char,char)] = &[ - ('\x61', '\x7a'), ('\xaa', '\xaa'), - ('\xb5', '\xb5'), ('\xba', '\xba'), - ('\xdf', '\xf6'), ('\xf8', '\xff'), - ('\u0101', '\u0101'), ('\u0103', '\u0103'), - ('\u0105', '\u0105'), ('\u0107', '\u0107'), - ('\u0109', '\u0109'), ('\u010b', '\u010b'), - ('\u010d', '\u010d'), ('\u010f', '\u010f'), - ('\u0111', '\u0111'), ('\u0113', '\u0113'), - ('\u0115', '\u0115'), ('\u0117', '\u0117'), - ('\u0119', '\u0119'), ('\u011b', '\u011b'), - ('\u011d', '\u011d'), ('\u011f', '\u011f'), - ('\u0121', '\u0121'), ('\u0123', '\u0123'), - ('\u0125', '\u0125'), ('\u0127', '\u0127'), - ('\u0129', '\u0129'), ('\u012b', '\u012b'), - ('\u012d', '\u012d'), ('\u012f', '\u012f'), - ('\u0131', '\u0131'), ('\u0133', '\u0133'), - ('\u0135', '\u0135'), ('\u0137', '\u0138'), - ('\u013a', '\u013a'), ('\u013c', '\u013c'), - ('\u013e', '\u013e'), ('\u0140', '\u0140'), - ('\u0142', '\u0142'), ('\u0144', '\u0144'), - ('\u0146', '\u0146'), ('\u0148', '\u0149'), - ('\u014b', '\u014b'), ('\u014d', '\u014d'), - ('\u014f', '\u014f'), ('\u0151', '\u0151'), - ('\u0153', '\u0153'), ('\u0155', '\u0155'), - ('\u0157', '\u0157'), ('\u0159', '\u0159'), - ('\u015b', '\u015b'), ('\u015d', '\u015d'), - ('\u015f', '\u015f'), ('\u0161', '\u0161'), - ('\u0163', '\u0163'), ('\u0165', '\u0165'), - ('\u0167', '\u0167'), ('\u0169', '\u0169'), - ('\u016b', '\u016b'), ('\u016d', '\u016d'), - ('\u016f', '\u016f'), ('\u0171', '\u0171'), - ('\u0173', '\u0173'), ('\u0175', '\u0175'), - ('\u0177', '\u0177'), ('\u017a', '\u017a'), - ('\u017c', '\u017c'), ('\u017e', '\u0180'), - ('\u0183', '\u0183'), ('\u0185', '\u0185'), - ('\u0188', '\u0188'), ('\u018c', '\u018d'), - ('\u0192', '\u0192'), ('\u0195', '\u0195'), - ('\u0199', '\u019b'), ('\u019e', '\u019e'), - ('\u01a1', '\u01a1'), ('\u01a3', '\u01a3'), - ('\u01a5', '\u01a5'), ('\u01a8', '\u01a8'), - ('\u01aa', '\u01ab'), ('\u01ad', '\u01ad'), - ('\u01b0', '\u01b0'), ('\u01b4', '\u01b4'), - ('\u01b6', '\u01b6'), ('\u01b9', '\u01ba'), - ('\u01bd', '\u01bf'), ('\u01c6', '\u01c6'), - ('\u01c9', '\u01c9'), ('\u01cc', '\u01cc'), - ('\u01ce', '\u01ce'), ('\u01d0', '\u01d0'), - ('\u01d2', '\u01d2'), ('\u01d4', '\u01d4'), - ('\u01d6', '\u01d6'), ('\u01d8', '\u01d8'), - ('\u01da', '\u01da'), ('\u01dc', '\u01dd'), - ('\u01df', '\u01df'), ('\u01e1', '\u01e1'), - ('\u01e3', '\u01e3'), ('\u01e5', '\u01e5'), - ('\u01e7', '\u01e7'), ('\u01e9', '\u01e9'), - ('\u01eb', '\u01eb'), ('\u01ed', '\u01ed'), - ('\u01ef', '\u01f0'), ('\u01f3', '\u01f3'), - ('\u01f5', '\u01f5'), ('\u01f9', '\u01f9'), - ('\u01fb', '\u01fb'), ('\u01fd', '\u01fd'), - ('\u01ff', '\u01ff'), ('\u0201', '\u0201'), - ('\u0203', '\u0203'), ('\u0205', '\u0205'), - ('\u0207', '\u0207'), ('\u0209', '\u0209'), - ('\u020b', '\u020b'), ('\u020d', '\u020d'), - ('\u020f', '\u020f'), ('\u0211', '\u0211'), - ('\u0213', '\u0213'), ('\u0215', '\u0215'), - ('\u0217', '\u0217'), ('\u0219', '\u0219'), - ('\u021b', '\u021b'), ('\u021d', '\u021d'), - ('\u021f', '\u021f'), ('\u0221', '\u0221'), - ('\u0223', '\u0223'), ('\u0225', '\u0225'), - ('\u0227', '\u0227'), ('\u0229', '\u0229'), - ('\u022b', '\u022b'), ('\u022d', '\u022d'), - ('\u022f', '\u022f'), ('\u0231', '\u0231'), - ('\u0233', '\u0239'), ('\u023c', '\u023c'), - ('\u023f', '\u0240'), ('\u0242', '\u0242'), - ('\u0247', '\u0247'), ('\u0249', '\u0249'), - ('\u024b', '\u024b'), ('\u024d', '\u024d'), - ('\u024f', '\u0293'), ('\u0295', '\u02af'), - ('\u02b0', '\u02b8'), ('\u02c0', '\u02c1'), - ('\u02e0', '\u02e4'), ('\u0345', '\u0345'), - ('\u0371', '\u0371'), ('\u0373', '\u0373'), - ('\u0377', '\u0377'), ('\u037a', '\u037a'), - ('\u037b', '\u037d'), ('\u0390', '\u0390'), - ('\u03ac', '\u03ce'), ('\u03d0', '\u03d1'), - ('\u03d5', '\u03d7'), ('\u03d9', '\u03d9'), - ('\u03db', '\u03db'), ('\u03dd', '\u03dd'), - ('\u03df', '\u03df'), ('\u03e1', '\u03e1'), - ('\u03e3', '\u03e3'), ('\u03e5', '\u03e5'), - ('\u03e7', '\u03e7'), ('\u03e9', '\u03e9'), - ('\u03eb', '\u03eb'), ('\u03ed', '\u03ed'), - ('\u03ef', '\u03f3'), ('\u03f5', '\u03f5'), - ('\u03f8', '\u03f8'), ('\u03fb', '\u03fc'), - ('\u0430', '\u045f'), ('\u0461', '\u0461'), - ('\u0463', '\u0463'), ('\u0465', '\u0465'), - ('\u0467', '\u0467'), ('\u0469', '\u0469'), - ('\u046b', '\u046b'), ('\u046d', '\u046d'), - ('\u046f', '\u046f'), ('\u0471', '\u0471'), - ('\u0473', '\u0473'), ('\u0475', '\u0475'), - ('\u0477', '\u0477'), ('\u0479', '\u0479'), - ('\u047b', '\u047b'), ('\u047d', '\u047d'), - ('\u047f', '\u047f'), ('\u0481', '\u0481'), - ('\u048b', '\u048b'), ('\u048d', '\u048d'), - ('\u048f', '\u048f'), ('\u0491', '\u0491'), - ('\u0493', '\u0493'), ('\u0495', '\u0495'), - ('\u0497', '\u0497'), ('\u0499', '\u0499'), - ('\u049b', '\u049b'), ('\u049d', '\u049d'), - ('\u049f', '\u049f'), ('\u04a1', '\u04a1'), - ('\u04a3', '\u04a3'), ('\u04a5', '\u04a5'), - ('\u04a7', '\u04a7'), ('\u04a9', '\u04a9'), - ('\u04ab', '\u04ab'), ('\u04ad', '\u04ad'), - ('\u04af', '\u04af'), ('\u04b1', '\u04b1'), - ('\u04b3', '\u04b3'), ('\u04b5', '\u04b5'), - ('\u04b7', '\u04b7'), ('\u04b9', '\u04b9'), - ('\u04bb', '\u04bb'), ('\u04bd', '\u04bd'), - ('\u04bf', '\u04bf'), ('\u04c2', '\u04c2'), - ('\u04c4', '\u04c4'), ('\u04c6', '\u04c6'), - ('\u04c8', '\u04c8'), ('\u04ca', '\u04ca'), - ('\u04cc', '\u04cc'), ('\u04ce', '\u04cf'), - ('\u04d1', '\u04d1'), ('\u04d3', '\u04d3'), - ('\u04d5', '\u04d5'), ('\u04d7', '\u04d7'), - ('\u04d9', '\u04d9'), ('\u04db', '\u04db'), - ('\u04dd', '\u04dd'), ('\u04df', '\u04df'), - ('\u04e1', '\u04e1'), ('\u04e3', '\u04e3'), - ('\u04e5', '\u04e5'), ('\u04e7', '\u04e7'), - ('\u04e9', '\u04e9'), ('\u04eb', '\u04eb'), - ('\u04ed', '\u04ed'), ('\u04ef', '\u04ef'), - ('\u04f1', '\u04f1'), ('\u04f3', '\u04f3'), - ('\u04f5', '\u04f5'), ('\u04f7', '\u04f7'), - ('\u04f9', '\u04f9'), ('\u04fb', '\u04fb'), - ('\u04fd', '\u04fd'), ('\u04ff', '\u04ff'), - ('\u0501', '\u0501'), ('\u0503', '\u0503'), - ('\u0505', '\u0505'), ('\u0507', '\u0507'), - ('\u0509', '\u0509'), ('\u050b', '\u050b'), - ('\u050d', '\u050d'), ('\u050f', '\u050f'), - ('\u0511', '\u0511'), ('\u0513', '\u0513'), - ('\u0515', '\u0515'), ('\u0517', '\u0517'), - ('\u0519', '\u0519'), ('\u051b', '\u051b'), - ('\u051d', '\u051d'), ('\u051f', '\u051f'), - ('\u0521', '\u0521'), ('\u0523', '\u0523'), - ('\u0525', '\u0525'), ('\u0527', '\u0527'), - ('\u0561', '\u0587'), ('\u1d00', '\u1d2b'), - ('\u1d2c', '\u1d6a'), ('\u1d6b', '\u1d77'), - ('\u1d78', '\u1d78'), ('\u1d79', '\u1d9a'), - ('\u1d9b', '\u1dbf'), ('\u1e01', '\u1e01'), - ('\u1e03', '\u1e03'), ('\u1e05', '\u1e05'), - ('\u1e07', '\u1e07'), ('\u1e09', '\u1e09'), - ('\u1e0b', '\u1e0b'), ('\u1e0d', '\u1e0d'), - ('\u1e0f', '\u1e0f'), ('\u1e11', '\u1e11'), - ('\u1e13', '\u1e13'), ('\u1e15', '\u1e15'), - ('\u1e17', '\u1e17'), ('\u1e19', '\u1e19'), - ('\u1e1b', '\u1e1b'), ('\u1e1d', '\u1e1d'), - ('\u1e1f', '\u1e1f'), ('\u1e21', '\u1e21'), - ('\u1e23', '\u1e23'), ('\u1e25', '\u1e25'), - ('\u1e27', '\u1e27'), ('\u1e29', '\u1e29'), - ('\u1e2b', '\u1e2b'), ('\u1e2d', '\u1e2d'), - ('\u1e2f', '\u1e2f'), ('\u1e31', '\u1e31'), - ('\u1e33', '\u1e33'), ('\u1e35', '\u1e35'), - ('\u1e37', '\u1e37'), ('\u1e39', '\u1e39'), - ('\u1e3b', '\u1e3b'), ('\u1e3d', '\u1e3d'), - ('\u1e3f', '\u1e3f'), ('\u1e41', '\u1e41'), - ('\u1e43', '\u1e43'), ('\u1e45', '\u1e45'), - ('\u1e47', '\u1e47'), ('\u1e49', '\u1e49'), - ('\u1e4b', '\u1e4b'), ('\u1e4d', '\u1e4d'), - ('\u1e4f', '\u1e4f'), ('\u1e51', '\u1e51'), - ('\u1e53', '\u1e53'), ('\u1e55', '\u1e55'), - ('\u1e57', '\u1e57'), ('\u1e59', '\u1e59'), - ('\u1e5b', '\u1e5b'), ('\u1e5d', '\u1e5d'), - ('\u1e5f', '\u1e5f'), ('\u1e61', '\u1e61'), - ('\u1e63', '\u1e63'), ('\u1e65', '\u1e65'), - ('\u1e67', '\u1e67'), ('\u1e69', '\u1e69'), - ('\u1e6b', '\u1e6b'), ('\u1e6d', '\u1e6d'), - ('\u1e6f', '\u1e6f'), ('\u1e71', '\u1e71'), - ('\u1e73', '\u1e73'), ('\u1e75', '\u1e75'), - ('\u1e77', '\u1e77'), ('\u1e79', '\u1e79'), - ('\u1e7b', '\u1e7b'), ('\u1e7d', '\u1e7d'), - ('\u1e7f', '\u1e7f'), ('\u1e81', '\u1e81'), - ('\u1e83', '\u1e83'), ('\u1e85', '\u1e85'), - ('\u1e87', '\u1e87'), ('\u1e89', '\u1e89'), - ('\u1e8b', '\u1e8b'), ('\u1e8d', '\u1e8d'), - ('\u1e8f', '\u1e8f'), ('\u1e91', '\u1e91'), - ('\u1e93', '\u1e93'), ('\u1e95', '\u1e9d'), - ('\u1e9f', '\u1e9f'), ('\u1ea1', '\u1ea1'), - ('\u1ea3', '\u1ea3'), ('\u1ea5', '\u1ea5'), - ('\u1ea7', '\u1ea7'), ('\u1ea9', '\u1ea9'), - ('\u1eab', '\u1eab'), ('\u1ead', '\u1ead'), - ('\u1eaf', '\u1eaf'), ('\u1eb1', '\u1eb1'), - ('\u1eb3', '\u1eb3'), ('\u1eb5', '\u1eb5'), - ('\u1eb7', '\u1eb7'), ('\u1eb9', '\u1eb9'), - ('\u1ebb', '\u1ebb'), ('\u1ebd', '\u1ebd'), - ('\u1ebf', '\u1ebf'), ('\u1ec1', '\u1ec1'), - ('\u1ec3', '\u1ec3'), ('\u1ec5', '\u1ec5'), - ('\u1ec7', '\u1ec7'), ('\u1ec9', '\u1ec9'), - ('\u1ecb', '\u1ecb'), ('\u1ecd', '\u1ecd'), - ('\u1ecf', '\u1ecf'), ('\u1ed1', '\u1ed1'), - ('\u1ed3', '\u1ed3'), ('\u1ed5', '\u1ed5'), - ('\u1ed7', '\u1ed7'), ('\u1ed9', '\u1ed9'), - ('\u1edb', '\u1edb'), ('\u1edd', '\u1edd'), - ('\u1edf', '\u1edf'), ('\u1ee1', '\u1ee1'), - ('\u1ee3', '\u1ee3'), ('\u1ee5', '\u1ee5'), - ('\u1ee7', '\u1ee7'), ('\u1ee9', '\u1ee9'), - ('\u1eeb', '\u1eeb'), ('\u1eed', '\u1eed'), - ('\u1eef', '\u1eef'), ('\u1ef1', '\u1ef1'), - ('\u1ef3', '\u1ef3'), ('\u1ef5', '\u1ef5'), - ('\u1ef7', '\u1ef7'), ('\u1ef9', '\u1ef9'), - ('\u1efb', '\u1efb'), ('\u1efd', '\u1efd'), - ('\u1eff', '\u1f07'), ('\u1f10', '\u1f15'), - ('\u1f20', '\u1f27'), ('\u1f30', '\u1f37'), - ('\u1f40', '\u1f45'), ('\u1f50', '\u1f57'), - ('\u1f60', '\u1f67'), ('\u1f70', '\u1f7d'), - ('\u1f80', '\u1f87'), ('\u1f90', '\u1f97'), - ('\u1fa0', '\u1fa7'), ('\u1fb0', '\u1fb4'), - ('\u1fb6', '\u1fb7'), ('\u1fbe', '\u1fbe'), - ('\u1fc2', '\u1fc4'), ('\u1fc6', '\u1fc7'), - ('\u1fd0', '\u1fd3'), ('\u1fd6', '\u1fd7'), - ('\u1fe0', '\u1fe7'), ('\u1ff2', '\u1ff4'), - ('\u1ff6', '\u1ff7'), ('\u2071', '\u2071'), - ('\u207f', '\u207f'), ('\u2090', '\u209c'), - ('\u210a', '\u210a'), ('\u210e', '\u210f'), - ('\u2113', '\u2113'), ('\u212f', '\u212f'), - ('\u2134', '\u2134'), ('\u2139', '\u2139'), - ('\u213c', '\u213d'), ('\u2146', '\u2149'), - ('\u214e', '\u214e'), ('\u2170', '\u217f'), - ('\u2184', '\u2184'), ('\u24d0', '\u24e9'), - ('\u2c30', '\u2c5e'), ('\u2c61', '\u2c61'), - ('\u2c65', '\u2c66'), ('\u2c68', '\u2c68'), - ('\u2c6a', '\u2c6a'), ('\u2c6c', '\u2c6c'), - ('\u2c71', '\u2c71'), ('\u2c73', '\u2c74'), - ('\u2c76', '\u2c7b'), ('\u2c7c', '\u2c7d'), - ('\u2c81', '\u2c81'), ('\u2c83', '\u2c83'), - ('\u2c85', '\u2c85'), ('\u2c87', '\u2c87'), - ('\u2c89', '\u2c89'), ('\u2c8b', '\u2c8b'), - ('\u2c8d', '\u2c8d'), ('\u2c8f', '\u2c8f'), - ('\u2c91', '\u2c91'), ('\u2c93', '\u2c93'), - ('\u2c95', '\u2c95'), ('\u2c97', '\u2c97'), - ('\u2c99', '\u2c99'), ('\u2c9b', '\u2c9b'), - ('\u2c9d', '\u2c9d'), ('\u2c9f', '\u2c9f'), - ('\u2ca1', '\u2ca1'), ('\u2ca3', '\u2ca3'), - ('\u2ca5', '\u2ca5'), ('\u2ca7', '\u2ca7'), - ('\u2ca9', '\u2ca9'), ('\u2cab', '\u2cab'), - ('\u2cad', '\u2cad'), ('\u2caf', '\u2caf'), - ('\u2cb1', '\u2cb1'), ('\u2cb3', '\u2cb3'), - ('\u2cb5', '\u2cb5'), ('\u2cb7', '\u2cb7'), - ('\u2cb9', '\u2cb9'), ('\u2cbb', '\u2cbb'), - ('\u2cbd', '\u2cbd'), ('\u2cbf', '\u2cbf'), - ('\u2cc1', '\u2cc1'), ('\u2cc3', '\u2cc3'), - ('\u2cc5', '\u2cc5'), ('\u2cc7', '\u2cc7'), - ('\u2cc9', '\u2cc9'), ('\u2ccb', '\u2ccb'), - ('\u2ccd', '\u2ccd'), ('\u2ccf', '\u2ccf'), - ('\u2cd1', '\u2cd1'), ('\u2cd3', '\u2cd3'), - ('\u2cd5', '\u2cd5'), ('\u2cd7', '\u2cd7'), - ('\u2cd9', '\u2cd9'), ('\u2cdb', '\u2cdb'), - ('\u2cdd', '\u2cdd'), ('\u2cdf', '\u2cdf'), - ('\u2ce1', '\u2ce1'), ('\u2ce3', '\u2ce4'), - ('\u2cec', '\u2cec'), ('\u2cee', '\u2cee'), - ('\u2cf3', '\u2cf3'), ('\u2d00', '\u2d25'), - ('\u2d27', '\u2d27'), ('\u2d2d', '\u2d2d'), - ('\ua641', '\ua641'), ('\ua643', '\ua643'), - ('\ua645', '\ua645'), ('\ua647', '\ua647'), - ('\ua649', '\ua649'), ('\ua64b', '\ua64b'), - ('\ua64d', '\ua64d'), ('\ua64f', '\ua64f'), - ('\ua651', '\ua651'), ('\ua653', '\ua653'), - ('\ua655', '\ua655'), ('\ua657', '\ua657'), - ('\ua659', '\ua659'), ('\ua65b', '\ua65b'), - ('\ua65d', '\ua65d'), ('\ua65f', '\ua65f'), - ('\ua661', '\ua661'), ('\ua663', '\ua663'), - ('\ua665', '\ua665'), ('\ua667', '\ua667'), - ('\ua669', '\ua669'), ('\ua66b', '\ua66b'), - ('\ua66d', '\ua66d'), ('\ua681', '\ua681'), - ('\ua683', '\ua683'), ('\ua685', '\ua685'), - ('\ua687', '\ua687'), ('\ua689', '\ua689'), - ('\ua68b', '\ua68b'), ('\ua68d', '\ua68d'), - ('\ua68f', '\ua68f'), ('\ua691', '\ua691'), - ('\ua693', '\ua693'), ('\ua695', '\ua695'), - ('\ua697', '\ua697'), ('\ua723', '\ua723'), - ('\ua725', '\ua725'), ('\ua727', '\ua727'), - ('\ua729', '\ua729'), ('\ua72b', '\ua72b'), - ('\ua72d', '\ua72d'), ('\ua72f', '\ua731'), - ('\ua733', '\ua733'), ('\ua735', '\ua735'), - ('\ua737', '\ua737'), ('\ua739', '\ua739'), - ('\ua73b', '\ua73b'), ('\ua73d', '\ua73d'), - ('\ua73f', '\ua73f'), ('\ua741', '\ua741'), - ('\ua743', '\ua743'), ('\ua745', '\ua745'), - ('\ua747', '\ua747'), ('\ua749', '\ua749'), - ('\ua74b', '\ua74b'), ('\ua74d', '\ua74d'), - ('\ua74f', '\ua74f'), ('\ua751', '\ua751'), - ('\ua753', '\ua753'), ('\ua755', '\ua755'), - ('\ua757', '\ua757'), ('\ua759', '\ua759'), - ('\ua75b', '\ua75b'), ('\ua75d', '\ua75d'), - ('\ua75f', '\ua75f'), ('\ua761', '\ua761'), - ('\ua763', '\ua763'), ('\ua765', '\ua765'), - ('\ua767', '\ua767'), ('\ua769', '\ua769'), - ('\ua76b', '\ua76b'), ('\ua76d', '\ua76d'), - ('\ua76f', '\ua76f'), ('\ua770', '\ua770'), - ('\ua771', '\ua778'), ('\ua77a', '\ua77a'), - ('\ua77c', '\ua77c'), ('\ua77f', '\ua77f'), - ('\ua781', '\ua781'), ('\ua783', '\ua783'), - ('\ua785', '\ua785'), ('\ua787', '\ua787'), - ('\ua78c', '\ua78c'), ('\ua78e', '\ua78e'), - ('\ua791', '\ua791'), ('\ua793', '\ua793'), - ('\ua7a1', '\ua7a1'), ('\ua7a3', '\ua7a3'), - ('\ua7a5', '\ua7a5'), ('\ua7a7', '\ua7a7'), - ('\ua7a9', '\ua7a9'), ('\ua7f8', '\ua7f9'), - ('\ua7fa', '\ua7fa'), ('\ufb00', '\ufb06'), - ('\ufb13', '\ufb17'), ('\uff41', '\uff5a'), - ('\U00010428', '\U0001044f'), ('\U0001d41a', '\U0001d433'), - ('\U0001d44e', '\U0001d454'), ('\U0001d456', '\U0001d467'), - ('\U0001d482', '\U0001d49b'), ('\U0001d4b6', '\U0001d4b9'), - ('\U0001d4bb', '\U0001d4bb'), ('\U0001d4bd', '\U0001d4c3'), - ('\U0001d4c5', '\U0001d4cf'), ('\U0001d4ea', '\U0001d503'), - ('\U0001d51e', '\U0001d537'), ('\U0001d552', '\U0001d56b'), - ('\U0001d586', '\U0001d59f'), ('\U0001d5ba', '\U0001d5d3'), - ('\U0001d5ee', '\U0001d607'), ('\U0001d622', '\U0001d63b'), - ('\U0001d656', '\U0001d66f'), ('\U0001d68a', '\U0001d6a5'), - ('\U0001d6c2', '\U0001d6da'), ('\U0001d6dc', '\U0001d6e1'), - ('\U0001d6fc', '\U0001d714'), ('\U0001d716', '\U0001d71b'), - ('\U0001d736', '\U0001d74e'), ('\U0001d750', '\U0001d755'), - ('\U0001d770', '\U0001d788'), ('\U0001d78a', '\U0001d78f'), - ('\U0001d7aa', '\U0001d7c2'), ('\U0001d7c4', '\U0001d7c9'), - ('\U0001d7cb', '\U0001d7cb') - ]; - - pub fn Lowercase(c: char) -> bool { - super::bsearch_range_table(c, Lowercase_table) - } - - static Uppercase_table : &'static [(char,char)] = &[ - ('\x41', '\x5a'), ('\xc0', '\xd6'), - ('\xd8', '\xde'), ('\u0100', '\u0100'), - ('\u0102', '\u0102'), ('\u0104', '\u0104'), - ('\u0106', '\u0106'), ('\u0108', '\u0108'), - ('\u010a', '\u010a'), ('\u010c', '\u010c'), - ('\u010e', '\u010e'), ('\u0110', '\u0110'), - ('\u0112', '\u0112'), ('\u0114', '\u0114'), - ('\u0116', '\u0116'), ('\u0118', '\u0118'), - ('\u011a', '\u011a'), ('\u011c', '\u011c'), - ('\u011e', '\u011e'), ('\u0120', '\u0120'), - ('\u0122', '\u0122'), ('\u0124', '\u0124'), - ('\u0126', '\u0126'), ('\u0128', '\u0128'), - ('\u012a', '\u012a'), ('\u012c', '\u012c'), - ('\u012e', '\u012e'), ('\u0130', '\u0130'), - ('\u0132', '\u0132'), ('\u0134', '\u0134'), - ('\u0136', '\u0136'), ('\u0139', '\u0139'), - ('\u013b', '\u013b'), ('\u013d', '\u013d'), - ('\u013f', '\u013f'), ('\u0141', '\u0141'), - ('\u0143', '\u0143'), ('\u0145', '\u0145'), - ('\u0147', '\u0147'), ('\u014a', '\u014a'), - ('\u014c', '\u014c'), ('\u014e', '\u014e'), - ('\u0150', '\u0150'), ('\u0152', '\u0152'), - ('\u0154', '\u0154'), ('\u0156', '\u0156'), - ('\u0158', '\u0158'), ('\u015a', '\u015a'), - ('\u015c', '\u015c'), ('\u015e', '\u015e'), - ('\u0160', '\u0160'), ('\u0162', '\u0162'), - ('\u0164', '\u0164'), ('\u0166', '\u0166'), - ('\u0168', '\u0168'), ('\u016a', '\u016a'), - ('\u016c', '\u016c'), ('\u016e', '\u016e'), - ('\u0170', '\u0170'), ('\u0172', '\u0172'), - ('\u0174', '\u0174'), ('\u0176', '\u0176'), - ('\u0178', '\u0179'), ('\u017b', '\u017b'), - ('\u017d', '\u017d'), ('\u0181', '\u0182'), - ('\u0184', '\u0184'), ('\u0186', '\u0187'), - ('\u0189', '\u018b'), ('\u018e', '\u0191'), - ('\u0193', '\u0194'), ('\u0196', '\u0198'), - ('\u019c', '\u019d'), ('\u019f', '\u01a0'), - ('\u01a2', '\u01a2'), ('\u01a4', '\u01a4'), - ('\u01a6', '\u01a7'), ('\u01a9', '\u01a9'), - ('\u01ac', '\u01ac'), ('\u01ae', '\u01af'), - ('\u01b1', '\u01b3'), ('\u01b5', '\u01b5'), - ('\u01b7', '\u01b8'), ('\u01bc', '\u01bc'), - ('\u01c4', '\u01c4'), ('\u01c7', '\u01c7'), - ('\u01ca', '\u01ca'), ('\u01cd', '\u01cd'), - ('\u01cf', '\u01cf'), ('\u01d1', '\u01d1'), - ('\u01d3', '\u01d3'), ('\u01d5', '\u01d5'), - ('\u01d7', '\u01d7'), ('\u01d9', '\u01d9'), - ('\u01db', '\u01db'), ('\u01de', '\u01de'), - ('\u01e0', '\u01e0'), ('\u01e2', '\u01e2'), - ('\u01e4', '\u01e4'), ('\u01e6', '\u01e6'), - ('\u01e8', '\u01e8'), ('\u01ea', '\u01ea'), - ('\u01ec', '\u01ec'), ('\u01ee', '\u01ee'), - ('\u01f1', '\u01f1'), ('\u01f4', '\u01f4'), - ('\u01f6', '\u01f8'), ('\u01fa', '\u01fa'), - ('\u01fc', '\u01fc'), ('\u01fe', '\u01fe'), - ('\u0200', '\u0200'), ('\u0202', '\u0202'), - ('\u0204', '\u0204'), ('\u0206', '\u0206'), - ('\u0208', '\u0208'), ('\u020a', '\u020a'), - ('\u020c', '\u020c'), ('\u020e', '\u020e'), - ('\u0210', '\u0210'), ('\u0212', '\u0212'), - ('\u0214', '\u0214'), ('\u0216', '\u0216'), - ('\u0218', '\u0218'), ('\u021a', '\u021a'), - ('\u021c', '\u021c'), ('\u021e', '\u021e'), - ('\u0220', '\u0220'), ('\u0222', '\u0222'), - ('\u0224', '\u0224'), ('\u0226', '\u0226'), - ('\u0228', '\u0228'), ('\u022a', '\u022a'), - ('\u022c', '\u022c'), ('\u022e', '\u022e'), - ('\u0230', '\u0230'), ('\u0232', '\u0232'), - ('\u023a', '\u023b'), ('\u023d', '\u023e'), - ('\u0241', '\u0241'), ('\u0243', '\u0246'), - ('\u0248', '\u0248'), ('\u024a', '\u024a'), - ('\u024c', '\u024c'), ('\u024e', '\u024e'), - ('\u0370', '\u0370'), ('\u0372', '\u0372'), - ('\u0376', '\u0376'), ('\u0386', '\u0386'), - ('\u0388', '\u038a'), ('\u038c', '\u038c'), - ('\u038e', '\u038f'), ('\u0391', '\u03a1'), - ('\u03a3', '\u03ab'), ('\u03cf', '\u03cf'), - ('\u03d2', '\u03d4'), ('\u03d8', '\u03d8'), - ('\u03da', '\u03da'), ('\u03dc', '\u03dc'), - ('\u03de', '\u03de'), ('\u03e0', '\u03e0'), - ('\u03e2', '\u03e2'), ('\u03e4', '\u03e4'), - ('\u03e6', '\u03e6'), ('\u03e8', '\u03e8'), - ('\u03ea', '\u03ea'), ('\u03ec', '\u03ec'), - ('\u03ee', '\u03ee'), ('\u03f4', '\u03f4'), - ('\u03f7', '\u03f7'), ('\u03f9', '\u03fa'), - ('\u03fd', '\u042f'), ('\u0460', '\u0460'), - ('\u0462', '\u0462'), ('\u0464', '\u0464'), - ('\u0466', '\u0466'), ('\u0468', '\u0468'), - ('\u046a', '\u046a'), ('\u046c', '\u046c'), - ('\u046e', '\u046e'), ('\u0470', '\u0470'), - ('\u0472', '\u0472'), ('\u0474', '\u0474'), - ('\u0476', '\u0476'), ('\u0478', '\u0478'), - ('\u047a', '\u047a'), ('\u047c', '\u047c'), - ('\u047e', '\u047e'), ('\u0480', '\u0480'), - ('\u048a', '\u048a'), ('\u048c', '\u048c'), - ('\u048e', '\u048e'), ('\u0490', '\u0490'), - ('\u0492', '\u0492'), ('\u0494', '\u0494'), - ('\u0496', '\u0496'), ('\u0498', '\u0498'), - ('\u049a', '\u049a'), ('\u049c', '\u049c'), - ('\u049e', '\u049e'), ('\u04a0', '\u04a0'), - ('\u04a2', '\u04a2'), ('\u04a4', '\u04a4'), - ('\u04a6', '\u04a6'), ('\u04a8', '\u04a8'), - ('\u04aa', '\u04aa'), ('\u04ac', '\u04ac'), - ('\u04ae', '\u04ae'), ('\u04b0', '\u04b0'), - ('\u04b2', '\u04b2'), ('\u04b4', '\u04b4'), - ('\u04b6', '\u04b6'), ('\u04b8', '\u04b8'), - ('\u04ba', '\u04ba'), ('\u04bc', '\u04bc'), - ('\u04be', '\u04be'), ('\u04c0', '\u04c1'), - ('\u04c3', '\u04c3'), ('\u04c5', '\u04c5'), - ('\u04c7', '\u04c7'), ('\u04c9', '\u04c9'), - ('\u04cb', '\u04cb'), ('\u04cd', '\u04cd'), - ('\u04d0', '\u04d0'), ('\u04d2', '\u04d2'), - ('\u04d4', '\u04d4'), ('\u04d6', '\u04d6'), - ('\u04d8', '\u04d8'), ('\u04da', '\u04da'), - ('\u04dc', '\u04dc'), ('\u04de', '\u04de'), - ('\u04e0', '\u04e0'), ('\u04e2', '\u04e2'), - ('\u04e4', '\u04e4'), ('\u04e6', '\u04e6'), - ('\u04e8', '\u04e8'), ('\u04ea', '\u04ea'), - ('\u04ec', '\u04ec'), ('\u04ee', '\u04ee'), - ('\u04f0', '\u04f0'), ('\u04f2', '\u04f2'), - ('\u04f4', '\u04f4'), ('\u04f6', '\u04f6'), - ('\u04f8', '\u04f8'), ('\u04fa', '\u04fa'), - ('\u04fc', '\u04fc'), ('\u04fe', '\u04fe'), - ('\u0500', '\u0500'), ('\u0502', '\u0502'), - ('\u0504', '\u0504'), ('\u0506', '\u0506'), - ('\u0508', '\u0508'), ('\u050a', '\u050a'), - ('\u050c', '\u050c'), ('\u050e', '\u050e'), - ('\u0510', '\u0510'), ('\u0512', '\u0512'), - ('\u0514', '\u0514'), ('\u0516', '\u0516'), - ('\u0518', '\u0518'), ('\u051a', '\u051a'), - ('\u051c', '\u051c'), ('\u051e', '\u051e'), - ('\u0520', '\u0520'), ('\u0522', '\u0522'), - ('\u0524', '\u0524'), ('\u0526', '\u0526'), - ('\u0531', '\u0556'), ('\u10a0', '\u10c5'), - ('\u10c7', '\u10c7'), ('\u10cd', '\u10cd'), - ('\u1e00', '\u1e00'), ('\u1e02', '\u1e02'), - ('\u1e04', '\u1e04'), ('\u1e06', '\u1e06'), - ('\u1e08', '\u1e08'), ('\u1e0a', '\u1e0a'), - ('\u1e0c', '\u1e0c'), ('\u1e0e', '\u1e0e'), - ('\u1e10', '\u1e10'), ('\u1e12', '\u1e12'), - ('\u1e14', '\u1e14'), ('\u1e16', '\u1e16'), - ('\u1e18', '\u1e18'), ('\u1e1a', '\u1e1a'), - ('\u1e1c', '\u1e1c'), ('\u1e1e', '\u1e1e'), - ('\u1e20', '\u1e20'), ('\u1e22', '\u1e22'), - ('\u1e24', '\u1e24'), ('\u1e26', '\u1e26'), - ('\u1e28', '\u1e28'), ('\u1e2a', '\u1e2a'), - ('\u1e2c', '\u1e2c'), ('\u1e2e', '\u1e2e'), - ('\u1e30', '\u1e30'), ('\u1e32', '\u1e32'), - ('\u1e34', '\u1e34'), ('\u1e36', '\u1e36'), - ('\u1e38', '\u1e38'), ('\u1e3a', '\u1e3a'), - ('\u1e3c', '\u1e3c'), ('\u1e3e', '\u1e3e'), - ('\u1e40', '\u1e40'), ('\u1e42', '\u1e42'), - ('\u1e44', '\u1e44'), ('\u1e46', '\u1e46'), - ('\u1e48', '\u1e48'), ('\u1e4a', '\u1e4a'), - ('\u1e4c', '\u1e4c'), ('\u1e4e', '\u1e4e'), - ('\u1e50', '\u1e50'), ('\u1e52', '\u1e52'), - ('\u1e54', '\u1e54'), ('\u1e56', '\u1e56'), - ('\u1e58', '\u1e58'), ('\u1e5a', '\u1e5a'), - ('\u1e5c', '\u1e5c'), ('\u1e5e', '\u1e5e'), - ('\u1e60', '\u1e60'), ('\u1e62', '\u1e62'), - ('\u1e64', '\u1e64'), ('\u1e66', '\u1e66'), - ('\u1e68', '\u1e68'), ('\u1e6a', '\u1e6a'), - ('\u1e6c', '\u1e6c'), ('\u1e6e', '\u1e6e'), - ('\u1e70', '\u1e70'), ('\u1e72', '\u1e72'), - ('\u1e74', '\u1e74'), ('\u1e76', '\u1e76'), - ('\u1e78', '\u1e78'), ('\u1e7a', '\u1e7a'), - ('\u1e7c', '\u1e7c'), ('\u1e7e', '\u1e7e'), - ('\u1e80', '\u1e80'), ('\u1e82', '\u1e82'), - ('\u1e84', '\u1e84'), ('\u1e86', '\u1e86'), - ('\u1e88', '\u1e88'), ('\u1e8a', '\u1e8a'), - ('\u1e8c', '\u1e8c'), ('\u1e8e', '\u1e8e'), - ('\u1e90', '\u1e90'), ('\u1e92', '\u1e92'), - ('\u1e94', '\u1e94'), ('\u1e9e', '\u1e9e'), - ('\u1ea0', '\u1ea0'), ('\u1ea2', '\u1ea2'), - ('\u1ea4', '\u1ea4'), ('\u1ea6', '\u1ea6'), - ('\u1ea8', '\u1ea8'), ('\u1eaa', '\u1eaa'), - ('\u1eac', '\u1eac'), ('\u1eae', '\u1eae'), - ('\u1eb0', '\u1eb0'), ('\u1eb2', '\u1eb2'), - ('\u1eb4', '\u1eb4'), ('\u1eb6', '\u1eb6'), - ('\u1eb8', '\u1eb8'), ('\u1eba', '\u1eba'), - ('\u1ebc', '\u1ebc'), ('\u1ebe', '\u1ebe'), - ('\u1ec0', '\u1ec0'), ('\u1ec2', '\u1ec2'), - ('\u1ec4', '\u1ec4'), ('\u1ec6', '\u1ec6'), - ('\u1ec8', '\u1ec8'), ('\u1eca', '\u1eca'), - ('\u1ecc', '\u1ecc'), ('\u1ece', '\u1ece'), - ('\u1ed0', '\u1ed0'), ('\u1ed2', '\u1ed2'), - ('\u1ed4', '\u1ed4'), ('\u1ed6', '\u1ed6'), - ('\u1ed8', '\u1ed8'), ('\u1eda', '\u1eda'), - ('\u1edc', '\u1edc'), ('\u1ede', '\u1ede'), - ('\u1ee0', '\u1ee0'), ('\u1ee2', '\u1ee2'), - ('\u1ee4', '\u1ee4'), ('\u1ee6', '\u1ee6'), - ('\u1ee8', '\u1ee8'), ('\u1eea', '\u1eea'), - ('\u1eec', '\u1eec'), ('\u1eee', '\u1eee'), - ('\u1ef0', '\u1ef0'), ('\u1ef2', '\u1ef2'), - ('\u1ef4', '\u1ef4'), ('\u1ef6', '\u1ef6'), - ('\u1ef8', '\u1ef8'), ('\u1efa', '\u1efa'), - ('\u1efc', '\u1efc'), ('\u1efe', '\u1efe'), - ('\u1f08', '\u1f0f'), ('\u1f18', '\u1f1d'), - ('\u1f28', '\u1f2f'), ('\u1f38', '\u1f3f'), - ('\u1f48', '\u1f4d'), ('\u1f59', '\u1f59'), - ('\u1f5b', '\u1f5b'), ('\u1f5d', '\u1f5d'), - ('\u1f5f', '\u1f5f'), ('\u1f68', '\u1f6f'), - ('\u1fb8', '\u1fbb'), ('\u1fc8', '\u1fcb'), - ('\u1fd8', '\u1fdb'), ('\u1fe8', '\u1fec'), - ('\u1ff8', '\u1ffb'), ('\u2102', '\u2102'), - ('\u2107', '\u2107'), ('\u210b', '\u210d'), - ('\u2110', '\u2112'), ('\u2115', '\u2115'), - ('\u2119', '\u211d'), ('\u2124', '\u2124'), - ('\u2126', '\u2126'), ('\u2128', '\u2128'), - ('\u212a', '\u212d'), ('\u2130', '\u2133'), - ('\u213e', '\u213f'), ('\u2145', '\u2145'), - ('\u2160', '\u216f'), ('\u2183', '\u2183'), - ('\u24b6', '\u24cf'), ('\u2c00', '\u2c2e'), - ('\u2c60', '\u2c60'), ('\u2c62', '\u2c64'), - ('\u2c67', '\u2c67'), ('\u2c69', '\u2c69'), - ('\u2c6b', '\u2c6b'), ('\u2c6d', '\u2c70'), - ('\u2c72', '\u2c72'), ('\u2c75', '\u2c75'), - ('\u2c7e', '\u2c80'), ('\u2c82', '\u2c82'), - ('\u2c84', '\u2c84'), ('\u2c86', '\u2c86'), - ('\u2c88', '\u2c88'), ('\u2c8a', '\u2c8a'), - ('\u2c8c', '\u2c8c'), ('\u2c8e', '\u2c8e'), - ('\u2c90', '\u2c90'), ('\u2c92', '\u2c92'), - ('\u2c94', '\u2c94'), ('\u2c96', '\u2c96'), - ('\u2c98', '\u2c98'), ('\u2c9a', '\u2c9a'), - ('\u2c9c', '\u2c9c'), ('\u2c9e', '\u2c9e'), - ('\u2ca0', '\u2ca0'), ('\u2ca2', '\u2ca2'), - ('\u2ca4', '\u2ca4'), ('\u2ca6', '\u2ca6'), - ('\u2ca8', '\u2ca8'), ('\u2caa', '\u2caa'), - ('\u2cac', '\u2cac'), ('\u2cae', '\u2cae'), - ('\u2cb0', '\u2cb0'), ('\u2cb2', '\u2cb2'), - ('\u2cb4', '\u2cb4'), ('\u2cb6', '\u2cb6'), - ('\u2cb8', '\u2cb8'), ('\u2cba', '\u2cba'), - ('\u2cbc', '\u2cbc'), ('\u2cbe', '\u2cbe'), - ('\u2cc0', '\u2cc0'), ('\u2cc2', '\u2cc2'), - ('\u2cc4', '\u2cc4'), ('\u2cc6', '\u2cc6'), - ('\u2cc8', '\u2cc8'), ('\u2cca', '\u2cca'), - ('\u2ccc', '\u2ccc'), ('\u2cce', '\u2cce'), - ('\u2cd0', '\u2cd0'), ('\u2cd2', '\u2cd2'), - ('\u2cd4', '\u2cd4'), ('\u2cd6', '\u2cd6'), - ('\u2cd8', '\u2cd8'), ('\u2cda', '\u2cda'), - ('\u2cdc', '\u2cdc'), ('\u2cde', '\u2cde'), - ('\u2ce0', '\u2ce0'), ('\u2ce2', '\u2ce2'), - ('\u2ceb', '\u2ceb'), ('\u2ced', '\u2ced'), - ('\u2cf2', '\u2cf2'), ('\ua640', '\ua640'), - ('\ua642', '\ua642'), ('\ua644', '\ua644'), - ('\ua646', '\ua646'), ('\ua648', '\ua648'), - ('\ua64a', '\ua64a'), ('\ua64c', '\ua64c'), - ('\ua64e', '\ua64e'), ('\ua650', '\ua650'), - ('\ua652', '\ua652'), ('\ua654', '\ua654'), - ('\ua656', '\ua656'), ('\ua658', '\ua658'), - ('\ua65a', '\ua65a'), ('\ua65c', '\ua65c'), - ('\ua65e', '\ua65e'), ('\ua660', '\ua660'), - ('\ua662', '\ua662'), ('\ua664', '\ua664'), - ('\ua666', '\ua666'), ('\ua668', '\ua668'), - ('\ua66a', '\ua66a'), ('\ua66c', '\ua66c'), - ('\ua680', '\ua680'), ('\ua682', '\ua682'), - ('\ua684', '\ua684'), ('\ua686', '\ua686'), - ('\ua688', '\ua688'), ('\ua68a', '\ua68a'), - ('\ua68c', '\ua68c'), ('\ua68e', '\ua68e'), - ('\ua690', '\ua690'), ('\ua692', '\ua692'), - ('\ua694', '\ua694'), ('\ua696', '\ua696'), - ('\ua722', '\ua722'), ('\ua724', '\ua724'), - ('\ua726', '\ua726'), ('\ua728', '\ua728'), - ('\ua72a', '\ua72a'), ('\ua72c', '\ua72c'), - ('\ua72e', '\ua72e'), ('\ua732', '\ua732'), - ('\ua734', '\ua734'), ('\ua736', '\ua736'), - ('\ua738', '\ua738'), ('\ua73a', '\ua73a'), - ('\ua73c', '\ua73c'), ('\ua73e', '\ua73e'), - ('\ua740', '\ua740'), ('\ua742', '\ua742'), - ('\ua744', '\ua744'), ('\ua746', '\ua746'), - ('\ua748', '\ua748'), ('\ua74a', '\ua74a'), - ('\ua74c', '\ua74c'), ('\ua74e', '\ua74e'), - ('\ua750', '\ua750'), ('\ua752', '\ua752'), - ('\ua754', '\ua754'), ('\ua756', '\ua756'), - ('\ua758', '\ua758'), ('\ua75a', '\ua75a'), - ('\ua75c', '\ua75c'), ('\ua75e', '\ua75e'), - ('\ua760', '\ua760'), ('\ua762', '\ua762'), - ('\ua764', '\ua764'), ('\ua766', '\ua766'), - ('\ua768', '\ua768'), ('\ua76a', '\ua76a'), - ('\ua76c', '\ua76c'), ('\ua76e', '\ua76e'), - ('\ua779', '\ua779'), ('\ua77b', '\ua77b'), - ('\ua77d', '\ua77e'), ('\ua780', '\ua780'), - ('\ua782', '\ua782'), ('\ua784', '\ua784'), - ('\ua786', '\ua786'), ('\ua78b', '\ua78b'), - ('\ua78d', '\ua78d'), ('\ua790', '\ua790'), - ('\ua792', '\ua792'), ('\ua7a0', '\ua7a0'), - ('\ua7a2', '\ua7a2'), ('\ua7a4', '\ua7a4'), - ('\ua7a6', '\ua7a6'), ('\ua7a8', '\ua7a8'), - ('\ua7aa', '\ua7aa'), ('\uff21', '\uff3a'), - ('\U00010400', '\U00010427'), ('\U0001d400', '\U0001d419'), - ('\U0001d434', '\U0001d44d'), ('\U0001d468', '\U0001d481'), - ('\U0001d49c', '\U0001d49c'), ('\U0001d49e', '\U0001d49f'), - ('\U0001d4a2', '\U0001d4a2'), ('\U0001d4a5', '\U0001d4a6'), - ('\U0001d4a9', '\U0001d4ac'), ('\U0001d4ae', '\U0001d4b5'), - ('\U0001d4d0', '\U0001d4e9'), ('\U0001d504', '\U0001d505'), - ('\U0001d507', '\U0001d50a'), ('\U0001d50d', '\U0001d514'), - ('\U0001d516', '\U0001d51c'), ('\U0001d538', '\U0001d539'), - ('\U0001d53b', '\U0001d53e'), ('\U0001d540', '\U0001d544'), - ('\U0001d546', '\U0001d546'), ('\U0001d54a', '\U0001d550'), - ('\U0001d56c', '\U0001d585'), ('\U0001d5a0', '\U0001d5b9'), - ('\U0001d5d4', '\U0001d5ed'), ('\U0001d608', '\U0001d621'), - ('\U0001d63c', '\U0001d655'), ('\U0001d670', '\U0001d689'), - ('\U0001d6a8', '\U0001d6c0'), ('\U0001d6e2', '\U0001d6fa'), - ('\U0001d71c', '\U0001d734'), ('\U0001d756', '\U0001d76e'), - ('\U0001d790', '\U0001d7a8'), ('\U0001d7ca', '\U0001d7ca') - ]; - - pub fn Uppercase(c: char) -> bool { - super::bsearch_range_table(c, Uppercase_table) - } - - static XID_Continue_table : &'static [(char,char)] = &[ - ('\x30', '\x39'), ('\x41', '\x5a'), - ('\x5f', '\x5f'), ('\x61', '\x7a'), - ('\xaa', '\xaa'), ('\xb5', '\xb5'), - ('\xb7', '\xb7'), ('\xba', '\xba'), - ('\xc0', '\xd6'), ('\xd8', '\xf6'), - ('\xf8', '\u01ba'), ('\u01bb', '\u01bb'), - ('\u01bc', '\u01bf'), ('\u01c0', '\u01c3'), - ('\u01c4', '\u0293'), ('\u0294', '\u0294'), - ('\u0295', '\u02af'), ('\u02b0', '\u02c1'), - ('\u02c6', '\u02d1'), ('\u02e0', '\u02e4'), - ('\u02ec', '\u02ec'), ('\u02ee', '\u02ee'), - ('\u0300', '\u036f'), ('\u0370', '\u0373'), - ('\u0374', '\u0374'), ('\u0376', '\u0377'), - ('\u037b', '\u037d'), ('\u0386', '\u0386'), - ('\u0387', '\u0387'), ('\u0388', '\u038a'), - ('\u038c', '\u038c'), ('\u038e', '\u03a1'), - ('\u03a3', '\u03f5'), ('\u03f7', '\u0481'), - ('\u0483', '\u0487'), ('\u048a', '\u0527'), - ('\u0531', '\u0556'), ('\u0559', '\u0559'), - ('\u0561', '\u0587'), ('\u0591', '\u05bd'), - ('\u05bf', '\u05bf'), ('\u05c1', '\u05c2'), - ('\u05c4', '\u05c5'), ('\u05c7', '\u05c7'), - ('\u05d0', '\u05ea'), ('\u05f0', '\u05f2'), - ('\u0610', '\u061a'), ('\u0620', '\u063f'), - ('\u0640', '\u0640'), ('\u0641', '\u064a'), - ('\u064b', '\u065f'), ('\u0660', '\u0669'), - ('\u066e', '\u066f'), ('\u0670', '\u0670'), - ('\u0671', '\u06d3'), ('\u06d5', '\u06d5'), - ('\u06d6', '\u06dc'), ('\u06df', '\u06e4'), - ('\u06e5', '\u06e6'), ('\u06e7', '\u06e8'), - ('\u06ea', '\u06ed'), ('\u06ee', '\u06ef'), - ('\u06f0', '\u06f9'), ('\u06fa', '\u06fc'), - ('\u06ff', '\u06ff'), ('\u0710', '\u0710'), - ('\u0711', '\u0711'), ('\u0712', '\u072f'), - ('\u0730', '\u074a'), ('\u074d', '\u07a5'), - ('\u07a6', '\u07b0'), ('\u07b1', '\u07b1'), - ('\u07c0', '\u07c9'), ('\u07ca', '\u07ea'), - ('\u07eb', '\u07f3'), ('\u07f4', '\u07f5'), - ('\u07fa', '\u07fa'), ('\u0800', '\u0815'), - ('\u0816', '\u0819'), ('\u081a', '\u081a'), - ('\u081b', '\u0823'), ('\u0824', '\u0824'), - ('\u0825', '\u0827'), ('\u0828', '\u0828'), - ('\u0829', '\u082d'), ('\u0840', '\u0858'), - ('\u0859', '\u085b'), ('\u08a0', '\u08a0'), - ('\u08a2', '\u08ac'), ('\u08e4', '\u08fe'), - ('\u0900', '\u0902'), ('\u0903', '\u0903'), - ('\u0904', '\u0939'), ('\u093a', '\u093a'), - ('\u093b', '\u093b'), ('\u093c', '\u093c'), - ('\u093d', '\u093d'), ('\u093e', '\u0940'), - ('\u0941', '\u0948'), ('\u0949', '\u094c'), - ('\u094d', '\u094d'), ('\u094e', '\u094f'), - ('\u0950', '\u0950'), ('\u0951', '\u0957'), - ('\u0958', '\u0961'), ('\u0962', '\u0963'), - ('\u0966', '\u096f'), ('\u0971', '\u0971'), - ('\u0972', '\u0977'), ('\u0979', '\u097f'), - ('\u0981', '\u0981'), ('\u0982', '\u0983'), - ('\u0985', '\u098c'), ('\u098f', '\u0990'), - ('\u0993', '\u09a8'), ('\u09aa', '\u09b0'), - ('\u09b2', '\u09b2'), ('\u09b6', '\u09b9'), - ('\u09bc', '\u09bc'), ('\u09bd', '\u09bd'), - ('\u09be', '\u09c0'), ('\u09c1', '\u09c4'), - ('\u09c7', '\u09c8'), ('\u09cb', '\u09cc'), - ('\u09cd', '\u09cd'), ('\u09ce', '\u09ce'), - ('\u09d7', '\u09d7'), ('\u09dc', '\u09dd'), - ('\u09df', '\u09e1'), ('\u09e2', '\u09e3'), - ('\u09e6', '\u09ef'), ('\u09f0', '\u09f1'), - ('\u0a01', '\u0a02'), ('\u0a03', '\u0a03'), - ('\u0a05', '\u0a0a'), ('\u0a0f', '\u0a10'), - ('\u0a13', '\u0a28'), ('\u0a2a', '\u0a30'), - ('\u0a32', '\u0a33'), ('\u0a35', '\u0a36'), - ('\u0a38', '\u0a39'), ('\u0a3c', '\u0a3c'), - ('\u0a3e', '\u0a40'), ('\u0a41', '\u0a42'), - ('\u0a47', '\u0a48'), ('\u0a4b', '\u0a4d'), - ('\u0a51', '\u0a51'), ('\u0a59', '\u0a5c'), - ('\u0a5e', '\u0a5e'), ('\u0a66', '\u0a6f'), - ('\u0a70', '\u0a71'), ('\u0a72', '\u0a74'), - ('\u0a75', '\u0a75'), ('\u0a81', '\u0a82'), - ('\u0a83', '\u0a83'), ('\u0a85', '\u0a8d'), - ('\u0a8f', '\u0a91'), ('\u0a93', '\u0aa8'), - ('\u0aaa', '\u0ab0'), ('\u0ab2', '\u0ab3'), - ('\u0ab5', '\u0ab9'), ('\u0abc', '\u0abc'), - ('\u0abd', '\u0abd'), ('\u0abe', '\u0ac0'), - ('\u0ac1', '\u0ac5'), ('\u0ac7', '\u0ac8'), - ('\u0ac9', '\u0ac9'), ('\u0acb', '\u0acc'), - ('\u0acd', '\u0acd'), ('\u0ad0', '\u0ad0'), - ('\u0ae0', '\u0ae1'), ('\u0ae2', '\u0ae3'), - ('\u0ae6', '\u0aef'), ('\u0b01', '\u0b01'), - ('\u0b02', '\u0b03'), ('\u0b05', '\u0b0c'), - ('\u0b0f', '\u0b10'), ('\u0b13', '\u0b28'), - ('\u0b2a', '\u0b30'), ('\u0b32', '\u0b33'), - ('\u0b35', '\u0b39'), ('\u0b3c', '\u0b3c'), - ('\u0b3d', '\u0b3d'), ('\u0b3e', '\u0b3e'), - ('\u0b3f', '\u0b3f'), ('\u0b40', '\u0b40'), - ('\u0b41', '\u0b44'), ('\u0b47', '\u0b48'), - ('\u0b4b', '\u0b4c'), ('\u0b4d', '\u0b4d'), - ('\u0b56', '\u0b56'), ('\u0b57', '\u0b57'), - ('\u0b5c', '\u0b5d'), ('\u0b5f', '\u0b61'), - ('\u0b62', '\u0b63'), ('\u0b66', '\u0b6f'), - ('\u0b71', '\u0b71'), ('\u0b82', '\u0b82'), - ('\u0b83', '\u0b83'), ('\u0b85', '\u0b8a'), - ('\u0b8e', '\u0b90'), ('\u0b92', '\u0b95'), - ('\u0b99', '\u0b9a'), ('\u0b9c', '\u0b9c'), - ('\u0b9e', '\u0b9f'), ('\u0ba3', '\u0ba4'), - ('\u0ba8', '\u0baa'), ('\u0bae', '\u0bb9'), - ('\u0bbe', '\u0bbf'), ('\u0bc0', '\u0bc0'), - ('\u0bc1', '\u0bc2'), ('\u0bc6', '\u0bc8'), - ('\u0bca', '\u0bcc'), ('\u0bcd', '\u0bcd'), - ('\u0bd0', '\u0bd0'), ('\u0bd7', '\u0bd7'), - ('\u0be6', '\u0bef'), ('\u0c01', '\u0c03'), - ('\u0c05', '\u0c0c'), ('\u0c0e', '\u0c10'), - ('\u0c12', '\u0c28'), ('\u0c2a', '\u0c33'), - ('\u0c35', '\u0c39'), ('\u0c3d', '\u0c3d'), - ('\u0c3e', '\u0c40'), ('\u0c41', '\u0c44'), - ('\u0c46', '\u0c48'), ('\u0c4a', '\u0c4d'), - ('\u0c55', '\u0c56'), ('\u0c58', '\u0c59'), - ('\u0c60', '\u0c61'), ('\u0c62', '\u0c63'), - ('\u0c66', '\u0c6f'), ('\u0c82', '\u0c83'), - ('\u0c85', '\u0c8c'), ('\u0c8e', '\u0c90'), - ('\u0c92', '\u0ca8'), ('\u0caa', '\u0cb3'), - ('\u0cb5', '\u0cb9'), ('\u0cbc', '\u0cbc'), - ('\u0cbd', '\u0cbd'), ('\u0cbe', '\u0cbe'), - ('\u0cbf', '\u0cbf'), ('\u0cc0', '\u0cc4'), - ('\u0cc6', '\u0cc6'), ('\u0cc7', '\u0cc8'), - ('\u0cca', '\u0ccb'), ('\u0ccc', '\u0ccd'), - ('\u0cd5', '\u0cd6'), ('\u0cde', '\u0cde'), - ('\u0ce0', '\u0ce1'), ('\u0ce2', '\u0ce3'), - ('\u0ce6', '\u0cef'), ('\u0cf1', '\u0cf2'), - ('\u0d02', '\u0d03'), ('\u0d05', '\u0d0c'), - ('\u0d0e', '\u0d10'), ('\u0d12', '\u0d3a'), - ('\u0d3d', '\u0d3d'), ('\u0d3e', '\u0d40'), - ('\u0d41', '\u0d44'), ('\u0d46', '\u0d48'), - ('\u0d4a', '\u0d4c'), ('\u0d4d', '\u0d4d'), - ('\u0d4e', '\u0d4e'), ('\u0d57', '\u0d57'), - ('\u0d60', '\u0d61'), ('\u0d62', '\u0d63'), - ('\u0d66', '\u0d6f'), ('\u0d7a', '\u0d7f'), - ('\u0d82', '\u0d83'), ('\u0d85', '\u0d96'), - ('\u0d9a', '\u0db1'), ('\u0db3', '\u0dbb'), - ('\u0dbd', '\u0dbd'), ('\u0dc0', '\u0dc6'), - ('\u0dca', '\u0dca'), ('\u0dcf', '\u0dd1'), - ('\u0dd2', '\u0dd4'), ('\u0dd6', '\u0dd6'), - ('\u0dd8', '\u0ddf'), ('\u0df2', '\u0df3'), - ('\u0e01', '\u0e30'), ('\u0e31', '\u0e31'), - ('\u0e32', '\u0e33'), ('\u0e34', '\u0e3a'), - ('\u0e40', '\u0e45'), ('\u0e46', '\u0e46'), - ('\u0e47', '\u0e4e'), ('\u0e50', '\u0e59'), - ('\u0e81', '\u0e82'), ('\u0e84', '\u0e84'), - ('\u0e87', '\u0e88'), ('\u0e8a', '\u0e8a'), - ('\u0e8d', '\u0e8d'), ('\u0e94', '\u0e97'), - ('\u0e99', '\u0e9f'), ('\u0ea1', '\u0ea3'), - ('\u0ea5', '\u0ea5'), ('\u0ea7', '\u0ea7'), - ('\u0eaa', '\u0eab'), ('\u0ead', '\u0eb0'), - ('\u0eb1', '\u0eb1'), ('\u0eb2', '\u0eb3'), - ('\u0eb4', '\u0eb9'), ('\u0ebb', '\u0ebc'), - ('\u0ebd', '\u0ebd'), ('\u0ec0', '\u0ec4'), - ('\u0ec6', '\u0ec6'), ('\u0ec8', '\u0ecd'), - ('\u0ed0', '\u0ed9'), ('\u0edc', '\u0edf'), - ('\u0f00', '\u0f00'), ('\u0f18', '\u0f19'), - ('\u0f20', '\u0f29'), ('\u0f35', '\u0f35'), - ('\u0f37', '\u0f37'), ('\u0f39', '\u0f39'), - ('\u0f3e', '\u0f3f'), ('\u0f40', '\u0f47'), - ('\u0f49', '\u0f6c'), ('\u0f71', '\u0f7e'), - ('\u0f7f', '\u0f7f'), ('\u0f80', '\u0f84'), - ('\u0f86', '\u0f87'), ('\u0f88', '\u0f8c'), - ('\u0f8d', '\u0f97'), ('\u0f99', '\u0fbc'), - ('\u0fc6', '\u0fc6'), ('\u1000', '\u102a'), - ('\u102b', '\u102c'), ('\u102d', '\u1030'), - ('\u1031', '\u1031'), ('\u1032', '\u1037'), - ('\u1038', '\u1038'), ('\u1039', '\u103a'), - ('\u103b', '\u103c'), ('\u103d', '\u103e'), - ('\u103f', '\u103f'), ('\u1040', '\u1049'), - ('\u1050', '\u1055'), ('\u1056', '\u1057'), - ('\u1058', '\u1059'), ('\u105a', '\u105d'), - ('\u105e', '\u1060'), ('\u1061', '\u1061'), - ('\u1062', '\u1064'), ('\u1065', '\u1066'), - ('\u1067', '\u106d'), ('\u106e', '\u1070'), - ('\u1071', '\u1074'), ('\u1075', '\u1081'), - ('\u1082', '\u1082'), ('\u1083', '\u1084'), - ('\u1085', '\u1086'), ('\u1087', '\u108c'), - ('\u108d', '\u108d'), ('\u108e', '\u108e'), - ('\u108f', '\u108f'), ('\u1090', '\u1099'), - ('\u109a', '\u109c'), ('\u109d', '\u109d'), - ('\u10a0', '\u10c5'), ('\u10c7', '\u10c7'), - ('\u10cd', '\u10cd'), ('\u10d0', '\u10fa'), - ('\u10fc', '\u10fc'), ('\u10fd', '\u1248'), - ('\u124a', '\u124d'), ('\u1250', '\u1256'), - ('\u1258', '\u1258'), ('\u125a', '\u125d'), - ('\u1260', '\u1288'), ('\u128a', '\u128d'), - ('\u1290', '\u12b0'), ('\u12b2', '\u12b5'), - ('\u12b8', '\u12be'), ('\u12c0', '\u12c0'), - ('\u12c2', '\u12c5'), ('\u12c8', '\u12d6'), - ('\u12d8', '\u1310'), ('\u1312', '\u1315'), - ('\u1318', '\u135a'), ('\u135d', '\u135f'), - ('\u1369', '\u1371'), ('\u1380', '\u138f'), - ('\u13a0', '\u13f4'), ('\u1401', '\u166c'), - ('\u166f', '\u167f'), ('\u1681', '\u169a'), - ('\u16a0', '\u16ea'), ('\u16ee', '\u16f0'), - ('\u1700', '\u170c'), ('\u170e', '\u1711'), - ('\u1712', '\u1714'), ('\u1720', '\u1731'), - ('\u1732', '\u1734'), ('\u1740', '\u1751'), - ('\u1752', '\u1753'), ('\u1760', '\u176c'), - ('\u176e', '\u1770'), ('\u1772', '\u1773'), - ('\u1780', '\u17b3'), ('\u17b4', '\u17b5'), - ('\u17b6', '\u17b6'), ('\u17b7', '\u17bd'), - ('\u17be', '\u17c5'), ('\u17c6', '\u17c6'), - ('\u17c7', '\u17c8'), ('\u17c9', '\u17d3'), - ('\u17d7', '\u17d7'), ('\u17dc', '\u17dc'), - ('\u17dd', '\u17dd'), ('\u17e0', '\u17e9'), - ('\u180b', '\u180d'), ('\u1810', '\u1819'), - ('\u1820', '\u1842'), ('\u1843', '\u1843'), - ('\u1844', '\u1877'), ('\u1880', '\u18a8'), - ('\u18a9', '\u18a9'), ('\u18aa', '\u18aa'), - ('\u18b0', '\u18f5'), ('\u1900', '\u191c'), - ('\u1920', '\u1922'), ('\u1923', '\u1926'), - ('\u1927', '\u1928'), ('\u1929', '\u192b'), - ('\u1930', '\u1931'), ('\u1932', '\u1932'), - ('\u1933', '\u1938'), ('\u1939', '\u193b'), - ('\u1946', '\u194f'), ('\u1950', '\u196d'), - ('\u1970', '\u1974'), ('\u1980', '\u19ab'), - ('\u19b0', '\u19c0'), ('\u19c1', '\u19c7'), - ('\u19c8', '\u19c9'), ('\u19d0', '\u19d9'), - ('\u19da', '\u19da'), ('\u1a00', '\u1a16'), - ('\u1a17', '\u1a18'), ('\u1a19', '\u1a1a'), - ('\u1a1b', '\u1a1b'), ('\u1a20', '\u1a54'), - ('\u1a55', '\u1a55'), ('\u1a56', '\u1a56'), - ('\u1a57', '\u1a57'), ('\u1a58', '\u1a5e'), - ('\u1a60', '\u1a60'), ('\u1a61', '\u1a61'), - ('\u1a62', '\u1a62'), ('\u1a63', '\u1a64'), - ('\u1a65', '\u1a6c'), ('\u1a6d', '\u1a72'), - ('\u1a73', '\u1a7c'), ('\u1a7f', '\u1a7f'), - ('\u1a80', '\u1a89'), ('\u1a90', '\u1a99'), - ('\u1aa7', '\u1aa7'), ('\u1b00', '\u1b03'), - ('\u1b04', '\u1b04'), ('\u1b05', '\u1b33'), - ('\u1b34', '\u1b34'), ('\u1b35', '\u1b35'), - ('\u1b36', '\u1b3a'), ('\u1b3b', '\u1b3b'), - ('\u1b3c', '\u1b3c'), ('\u1b3d', '\u1b41'), - ('\u1b42', '\u1b42'), ('\u1b43', '\u1b44'), - ('\u1b45', '\u1b4b'), ('\u1b50', '\u1b59'), - ('\u1b6b', '\u1b73'), ('\u1b80', '\u1b81'), - ('\u1b82', '\u1b82'), ('\u1b83', '\u1ba0'), - ('\u1ba1', '\u1ba1'), ('\u1ba2', '\u1ba5'), - ('\u1ba6', '\u1ba7'), ('\u1ba8', '\u1ba9'), - ('\u1baa', '\u1baa'), ('\u1bab', '\u1bab'), - ('\u1bac', '\u1bad'), ('\u1bae', '\u1baf'), - ('\u1bb0', '\u1bb9'), ('\u1bba', '\u1be5'), - ('\u1be6', '\u1be6'), ('\u1be7', '\u1be7'), - ('\u1be8', '\u1be9'), ('\u1bea', '\u1bec'), - ('\u1bed', '\u1bed'), ('\u1bee', '\u1bee'), - ('\u1bef', '\u1bf1'), ('\u1bf2', '\u1bf3'), - ('\u1c00', '\u1c23'), ('\u1c24', '\u1c2b'), - ('\u1c2c', '\u1c33'), ('\u1c34', '\u1c35'), - ('\u1c36', '\u1c37'), ('\u1c40', '\u1c49'), - ('\u1c4d', '\u1c4f'), ('\u1c50', '\u1c59'), - ('\u1c5a', '\u1c77'), ('\u1c78', '\u1c7d'), - ('\u1cd0', '\u1cd2'), ('\u1cd4', '\u1ce0'), - ('\u1ce1', '\u1ce1'), ('\u1ce2', '\u1ce8'), - ('\u1ce9', '\u1cec'), ('\u1ced', '\u1ced'), - ('\u1cee', '\u1cf1'), ('\u1cf2', '\u1cf3'), - ('\u1cf4', '\u1cf4'), ('\u1cf5', '\u1cf6'), - ('\u1d00', '\u1d2b'), ('\u1d2c', '\u1d6a'), - ('\u1d6b', '\u1d77'), ('\u1d78', '\u1d78'), - ('\u1d79', '\u1d9a'), ('\u1d9b', '\u1dbf'), - ('\u1dc0', '\u1de6'), ('\u1dfc', '\u1dff'), - ('\u1e00', '\u1f15'), ('\u1f18', '\u1f1d'), - ('\u1f20', '\u1f45'), ('\u1f48', '\u1f4d'), - ('\u1f50', '\u1f57'), ('\u1f59', '\u1f59'), - ('\u1f5b', '\u1f5b'), ('\u1f5d', '\u1f5d'), - ('\u1f5f', '\u1f7d'), ('\u1f80', '\u1fb4'), - ('\u1fb6', '\u1fbc'), ('\u1fbe', '\u1fbe'), - ('\u1fc2', '\u1fc4'), ('\u1fc6', '\u1fcc'), - ('\u1fd0', '\u1fd3'), ('\u1fd6', '\u1fdb'), - ('\u1fe0', '\u1fec'), ('\u1ff2', '\u1ff4'), - ('\u1ff6', '\u1ffc'), ('\u203f', '\u2040'), - ('\u2054', '\u2054'), ('\u2071', '\u2071'), - ('\u207f', '\u207f'), ('\u2090', '\u209c'), - ('\u20d0', '\u20dc'), ('\u20e1', '\u20e1'), - ('\u20e5', '\u20f0'), ('\u2102', '\u2102'), - ('\u2107', '\u2107'), ('\u210a', '\u2113'), - ('\u2115', '\u2115'), ('\u2118', '\u2118'), - ('\u2119', '\u211d'), ('\u2124', '\u2124'), - ('\u2126', '\u2126'), ('\u2128', '\u2128'), - ('\u212a', '\u212d'), ('\u212e', '\u212e'), - ('\u212f', '\u2134'), ('\u2135', '\u2138'), - ('\u2139', '\u2139'), ('\u213c', '\u213f'), - ('\u2145', '\u2149'), ('\u214e', '\u214e'), - ('\u2160', '\u2182'), ('\u2183', '\u2184'), - ('\u2185', '\u2188'), ('\u2c00', '\u2c2e'), - ('\u2c30', '\u2c5e'), ('\u2c60', '\u2c7b'), - ('\u2c7c', '\u2c7d'), ('\u2c7e', '\u2ce4'), - ('\u2ceb', '\u2cee'), ('\u2cef', '\u2cf1'), - ('\u2cf2', '\u2cf3'), ('\u2d00', '\u2d25'), - ('\u2d27', '\u2d27'), ('\u2d2d', '\u2d2d'), - ('\u2d30', '\u2d67'), ('\u2d6f', '\u2d6f'), - ('\u2d7f', '\u2d7f'), ('\u2d80', '\u2d96'), - ('\u2da0', '\u2da6'), ('\u2da8', '\u2dae'), - ('\u2db0', '\u2db6'), ('\u2db8', '\u2dbe'), - ('\u2dc0', '\u2dc6'), ('\u2dc8', '\u2dce'), - ('\u2dd0', '\u2dd6'), ('\u2dd8', '\u2dde'), - ('\u2de0', '\u2dff'), ('\u3005', '\u3005'), - ('\u3006', '\u3006'), ('\u3007', '\u3007'), - ('\u3021', '\u3029'), ('\u302a', '\u302d'), - ('\u302e', '\u302f'), ('\u3031', '\u3035'), - ('\u3038', '\u303a'), ('\u303b', '\u303b'), - ('\u303c', '\u303c'), ('\u3041', '\u3096'), - ('\u3099', '\u309a'), ('\u309d', '\u309e'), - ('\u309f', '\u309f'), ('\u30a1', '\u30fa'), - ('\u30fc', '\u30fe'), ('\u30ff', '\u30ff'), - ('\u3105', '\u312d'), ('\u3131', '\u318e'), - ('\u31a0', '\u31ba'), ('\u31f0', '\u31ff'), - ('\u3400', '\u4db5'), ('\u4e00', '\u9fcc'), - ('\ua000', '\ua014'), ('\ua015', '\ua015'), - ('\ua016', '\ua48c'), ('\ua4d0', '\ua4f7'), - ('\ua4f8', '\ua4fd'), ('\ua500', '\ua60b'), - ('\ua60c', '\ua60c'), ('\ua610', '\ua61f'), - ('\ua620', '\ua629'), ('\ua62a', '\ua62b'), - ('\ua640', '\ua66d'), ('\ua66e', '\ua66e'), - ('\ua66f', '\ua66f'), ('\ua674', '\ua67d'), - ('\ua67f', '\ua67f'), ('\ua680', '\ua697'), - ('\ua69f', '\ua69f'), ('\ua6a0', '\ua6e5'), - ('\ua6e6', '\ua6ef'), ('\ua6f0', '\ua6f1'), - ('\ua717', '\ua71f'), ('\ua722', '\ua76f'), - ('\ua770', '\ua770'), ('\ua771', '\ua787'), - ('\ua788', '\ua788'), ('\ua78b', '\ua78e'), - ('\ua790', '\ua793'), ('\ua7a0', '\ua7aa'), - ('\ua7f8', '\ua7f9'), ('\ua7fa', '\ua7fa'), - ('\ua7fb', '\ua801'), ('\ua802', '\ua802'), - ('\ua803', '\ua805'), ('\ua806', '\ua806'), - ('\ua807', '\ua80a'), ('\ua80b', '\ua80b'), - ('\ua80c', '\ua822'), ('\ua823', '\ua824'), - ('\ua825', '\ua826'), ('\ua827', '\ua827'), - ('\ua840', '\ua873'), ('\ua880', '\ua881'), - ('\ua882', '\ua8b3'), ('\ua8b4', '\ua8c3'), - ('\ua8c4', '\ua8c4'), ('\ua8d0', '\ua8d9'), - ('\ua8e0', '\ua8f1'), ('\ua8f2', '\ua8f7'), - ('\ua8fb', '\ua8fb'), ('\ua900', '\ua909'), - ('\ua90a', '\ua925'), ('\ua926', '\ua92d'), - ('\ua930', '\ua946'), ('\ua947', '\ua951'), - ('\ua952', '\ua953'), ('\ua960', '\ua97c'), - ('\ua980', '\ua982'), ('\ua983', '\ua983'), - ('\ua984', '\ua9b2'), ('\ua9b3', '\ua9b3'), - ('\ua9b4', '\ua9b5'), ('\ua9b6', '\ua9b9'), - ('\ua9ba', '\ua9bb'), ('\ua9bc', '\ua9bc'), - ('\ua9bd', '\ua9c0'), ('\ua9cf', '\ua9cf'), - ('\ua9d0', '\ua9d9'), ('\uaa00', '\uaa28'), - ('\uaa29', '\uaa2e'), ('\uaa2f', '\uaa30'), - ('\uaa31', '\uaa32'), ('\uaa33', '\uaa34'), - ('\uaa35', '\uaa36'), ('\uaa40', '\uaa42'), - ('\uaa43', '\uaa43'), ('\uaa44', '\uaa4b'), - ('\uaa4c', '\uaa4c'), ('\uaa4d', '\uaa4d'), - ('\uaa50', '\uaa59'), ('\uaa60', '\uaa6f'), - ('\uaa70', '\uaa70'), ('\uaa71', '\uaa76'), - ('\uaa7a', '\uaa7a'), ('\uaa7b', '\uaa7b'), - ('\uaa80', '\uaaaf'), ('\uaab0', '\uaab0'), - ('\uaab1', '\uaab1'), ('\uaab2', '\uaab4'), - ('\uaab5', '\uaab6'), ('\uaab7', '\uaab8'), - ('\uaab9', '\uaabd'), ('\uaabe', '\uaabf'), - ('\uaac0', '\uaac0'), ('\uaac1', '\uaac1'), - ('\uaac2', '\uaac2'), ('\uaadb', '\uaadc'), - ('\uaadd', '\uaadd'), ('\uaae0', '\uaaea'), - ('\uaaeb', '\uaaeb'), ('\uaaec', '\uaaed'), - ('\uaaee', '\uaaef'), ('\uaaf2', '\uaaf2'), - ('\uaaf3', '\uaaf4'), ('\uaaf5', '\uaaf5'), - ('\uaaf6', '\uaaf6'), ('\uab01', '\uab06'), - ('\uab09', '\uab0e'), ('\uab11', '\uab16'), - ('\uab20', '\uab26'), ('\uab28', '\uab2e'), - ('\uabc0', '\uabe2'), ('\uabe3', '\uabe4'), - ('\uabe5', '\uabe5'), ('\uabe6', '\uabe7'), - ('\uabe8', '\uabe8'), ('\uabe9', '\uabea'), - ('\uabec', '\uabec'), ('\uabed', '\uabed'), - ('\uabf0', '\uabf9'), ('\uac00', '\ud7a3'), - ('\ud7b0', '\ud7c6'), ('\ud7cb', '\ud7fb'), - ('\uf900', '\ufa6d'), ('\ufa70', '\ufad9'), - ('\ufb00', '\ufb06'), ('\ufb13', '\ufb17'), - ('\ufb1d', '\ufb1d'), ('\ufb1e', '\ufb1e'), - ('\ufb1f', '\ufb28'), ('\ufb2a', '\ufb36'), - ('\ufb38', '\ufb3c'), ('\ufb3e', '\ufb3e'), - ('\ufb40', '\ufb41'), ('\ufb43', '\ufb44'), - ('\ufb46', '\ufbb1'), ('\ufbd3', '\ufc5d'), - ('\ufc64', '\ufd3d'), ('\ufd50', '\ufd8f'), - ('\ufd92', '\ufdc7'), ('\ufdf0', '\ufdf9'), - ('\ufe00', '\ufe0f'), ('\ufe20', '\ufe26'), - ('\ufe33', '\ufe34'), ('\ufe4d', '\ufe4f'), - ('\ufe71', '\ufe71'), ('\ufe73', '\ufe73'), - ('\ufe77', '\ufe77'), ('\ufe79', '\ufe79'), - ('\ufe7b', '\ufe7b'), ('\ufe7d', '\ufe7d'), - ('\ufe7f', '\ufefc'), ('\uff10', '\uff19'), - ('\uff21', '\uff3a'), ('\uff3f', '\uff3f'), - ('\uff41', '\uff5a'), ('\uff66', '\uff6f'), - ('\uff70', '\uff70'), ('\uff71', '\uff9d'), - ('\uff9e', '\uff9f'), ('\uffa0', '\uffbe'), - ('\uffc2', '\uffc7'), ('\uffca', '\uffcf'), - ('\uffd2', '\uffd7'), ('\uffda', '\uffdc'), - ('\U00010000', '\U0001000b'), ('\U0001000d', '\U00010026'), - ('\U00010028', '\U0001003a'), ('\U0001003c', '\U0001003d'), - ('\U0001003f', '\U0001004d'), ('\U00010050', '\U0001005d'), - ('\U00010080', '\U000100fa'), ('\U00010140', '\U00010174'), - ('\U000101fd', '\U000101fd'), ('\U00010280', '\U0001029c'), - ('\U000102a0', '\U000102d0'), ('\U00010300', '\U0001031e'), - ('\U00010330', '\U00010340'), ('\U00010341', '\U00010341'), - ('\U00010342', '\U00010349'), ('\U0001034a', '\U0001034a'), - ('\U00010380', '\U0001039d'), ('\U000103a0', '\U000103c3'), - ('\U000103c8', '\U000103cf'), ('\U000103d1', '\U000103d5'), - ('\U00010400', '\U0001044f'), ('\U00010450', '\U0001049d'), - ('\U000104a0', '\U000104a9'), ('\U00010800', '\U00010805'), - ('\U00010808', '\U00010808'), ('\U0001080a', '\U00010835'), - ('\U00010837', '\U00010838'), ('\U0001083c', '\U0001083c'), - ('\U0001083f', '\U00010855'), ('\U00010900', '\U00010915'), - ('\U00010920', '\U00010939'), ('\U00010980', '\U000109b7'), - ('\U000109be', '\U000109bf'), ('\U00010a00', '\U00010a00'), - ('\U00010a01', '\U00010a03'), ('\U00010a05', '\U00010a06'), - ('\U00010a0c', '\U00010a0f'), ('\U00010a10', '\U00010a13'), - ('\U00010a15', '\U00010a17'), ('\U00010a19', '\U00010a33'), - ('\U00010a38', '\U00010a3a'), ('\U00010a3f', '\U00010a3f'), - ('\U00010a60', '\U00010a7c'), ('\U00010b00', '\U00010b35'), - ('\U00010b40', '\U00010b55'), ('\U00010b60', '\U00010b72'), - ('\U00010c00', '\U00010c48'), ('\U00011000', '\U00011000'), - ('\U00011001', '\U00011001'), ('\U00011002', '\U00011002'), - ('\U00011003', '\U00011037'), ('\U00011038', '\U00011046'), - ('\U00011066', '\U0001106f'), ('\U00011080', '\U00011081'), - ('\U00011082', '\U00011082'), ('\U00011083', '\U000110af'), - ('\U000110b0', '\U000110b2'), ('\U000110b3', '\U000110b6'), - ('\U000110b7', '\U000110b8'), ('\U000110b9', '\U000110ba'), - ('\U000110d0', '\U000110e8'), ('\U000110f0', '\U000110f9'), - ('\U00011100', '\U00011102'), ('\U00011103', '\U00011126'), - ('\U00011127', '\U0001112b'), ('\U0001112c', '\U0001112c'), - ('\U0001112d', '\U00011134'), ('\U00011136', '\U0001113f'), - ('\U00011180', '\U00011181'), ('\U00011182', '\U00011182'), - ('\U00011183', '\U000111b2'), ('\U000111b3', '\U000111b5'), - ('\U000111b6', '\U000111be'), ('\U000111bf', '\U000111c0'), - ('\U000111c1', '\U000111c4'), ('\U000111d0', '\U000111d9'), - ('\U00011680', '\U000116aa'), ('\U000116ab', '\U000116ab'), - ('\U000116ac', '\U000116ac'), ('\U000116ad', '\U000116ad'), - ('\U000116ae', '\U000116af'), ('\U000116b0', '\U000116b5'), - ('\U000116b6', '\U000116b6'), ('\U000116b7', '\U000116b7'), - ('\U000116c0', '\U000116c9'), ('\U00012000', '\U0001236e'), - ('\U00012400', '\U00012462'), ('\U00013000', '\U0001342e'), - ('\U00016800', '\U00016a38'), ('\U00016f00', '\U00016f44'), - ('\U00016f50', '\U00016f50'), ('\U00016f51', '\U00016f7e'), - ('\U00016f8f', '\U00016f92'), ('\U00016f93', '\U00016f9f'), - ('\U0001b000', '\U0001b001'), ('\U0001d165', '\U0001d166'), - ('\U0001d167', '\U0001d169'), ('\U0001d16d', '\U0001d172'), - ('\U0001d17b', '\U0001d182'), ('\U0001d185', '\U0001d18b'), - ('\U0001d1aa', '\U0001d1ad'), ('\U0001d242', '\U0001d244'), - ('\U0001d400', '\U0001d454'), ('\U0001d456', '\U0001d49c'), - ('\U0001d49e', '\U0001d49f'), ('\U0001d4a2', '\U0001d4a2'), - ('\U0001d4a5', '\U0001d4a6'), ('\U0001d4a9', '\U0001d4ac'), - ('\U0001d4ae', '\U0001d4b9'), ('\U0001d4bb', '\U0001d4bb'), - ('\U0001d4bd', '\U0001d4c3'), ('\U0001d4c5', '\U0001d505'), - ('\U0001d507', '\U0001d50a'), ('\U0001d50d', '\U0001d514'), - ('\U0001d516', '\U0001d51c'), ('\U0001d51e', '\U0001d539'), - ('\U0001d53b', '\U0001d53e'), ('\U0001d540', '\U0001d544'), - ('\U0001d546', '\U0001d546'), ('\U0001d54a', '\U0001d550'), - ('\U0001d552', '\U0001d6a5'), ('\U0001d6a8', '\U0001d6c0'), - ('\U0001d6c2', '\U0001d6da'), ('\U0001d6dc', '\U0001d6fa'), - ('\U0001d6fc', '\U0001d714'), ('\U0001d716', '\U0001d734'), - ('\U0001d736', '\U0001d74e'), ('\U0001d750', '\U0001d76e'), - ('\U0001d770', '\U0001d788'), ('\U0001d78a', '\U0001d7a8'), - ('\U0001d7aa', '\U0001d7c2'), ('\U0001d7c4', '\U0001d7cb'), - ('\U0001d7ce', '\U0001d7ff'), ('\U0001ee00', '\U0001ee03'), - ('\U0001ee05', '\U0001ee1f'), ('\U0001ee21', '\U0001ee22'), - ('\U0001ee24', '\U0001ee24'), ('\U0001ee27', '\U0001ee27'), - ('\U0001ee29', '\U0001ee32'), ('\U0001ee34', '\U0001ee37'), - ('\U0001ee39', '\U0001ee39'), ('\U0001ee3b', '\U0001ee3b'), - ('\U0001ee42', '\U0001ee42'), ('\U0001ee47', '\U0001ee47'), - ('\U0001ee49', '\U0001ee49'), ('\U0001ee4b', '\U0001ee4b'), - ('\U0001ee4d', '\U0001ee4f'), ('\U0001ee51', '\U0001ee52'), - ('\U0001ee54', '\U0001ee54'), ('\U0001ee57', '\U0001ee57'), - ('\U0001ee59', '\U0001ee59'), ('\U0001ee5b', '\U0001ee5b'), - ('\U0001ee5d', '\U0001ee5d'), ('\U0001ee5f', '\U0001ee5f'), - ('\U0001ee61', '\U0001ee62'), ('\U0001ee64', '\U0001ee64'), - ('\U0001ee67', '\U0001ee6a'), ('\U0001ee6c', '\U0001ee72'), - ('\U0001ee74', '\U0001ee77'), ('\U0001ee79', '\U0001ee7c'), - ('\U0001ee7e', '\U0001ee7e'), ('\U0001ee80', '\U0001ee89'), - ('\U0001ee8b', '\U0001ee9b'), ('\U0001eea1', '\U0001eea3'), - ('\U0001eea5', '\U0001eea9'), ('\U0001eeab', '\U0001eebb'), - ('\U00020000', '\U0002a6d6'), ('\U0002a700', '\U0002b734'), - ('\U0002b740', '\U0002b81d'), ('\U0002f800', '\U0002fa1d'), - ('\U000e0100', '\U000e01ef') - ]; - - pub fn XID_Continue(c: char) -> bool { - super::bsearch_range_table(c, XID_Continue_table) - } - - static XID_Start_table : &'static [(char,char)] = &[ - ('\x41', '\x5a'), ('\x61', '\x7a'), - ('\xaa', '\xaa'), ('\xb5', '\xb5'), - ('\xba', '\xba'), ('\xc0', '\xd6'), - ('\xd8', '\xf6'), ('\xf8', '\u01ba'), - ('\u01bb', '\u01bb'), ('\u01bc', '\u01bf'), - ('\u01c0', '\u01c3'), ('\u01c4', '\u0293'), - ('\u0294', '\u0294'), ('\u0295', '\u02af'), - ('\u02b0', '\u02c1'), ('\u02c6', '\u02d1'), - ('\u02e0', '\u02e4'), ('\u02ec', '\u02ec'), - ('\u02ee', '\u02ee'), ('\u0370', '\u0373'), - ('\u0374', '\u0374'), ('\u0376', '\u0377'), - ('\u037b', '\u037d'), ('\u0386', '\u0386'), - ('\u0388', '\u038a'), ('\u038c', '\u038c'), - ('\u038e', '\u03a1'), ('\u03a3', '\u03f5'), - ('\u03f7', '\u0481'), ('\u048a', '\u0527'), - ('\u0531', '\u0556'), ('\u0559', '\u0559'), - ('\u0561', '\u0587'), ('\u05d0', '\u05ea'), - ('\u05f0', '\u05f2'), ('\u0620', '\u063f'), - ('\u0640', '\u0640'), ('\u0641', '\u064a'), - ('\u066e', '\u066f'), ('\u0671', '\u06d3'), - ('\u06d5', '\u06d5'), ('\u06e5', '\u06e6'), - ('\u06ee', '\u06ef'), ('\u06fa', '\u06fc'), - ('\u06ff', '\u06ff'), ('\u0710', '\u0710'), - ('\u0712', '\u072f'), ('\u074d', '\u07a5'), - ('\u07b1', '\u07b1'), ('\u07ca', '\u07ea'), - ('\u07f4', '\u07f5'), ('\u07fa', '\u07fa'), - ('\u0800', '\u0815'), ('\u081a', '\u081a'), - ('\u0824', '\u0824'), ('\u0828', '\u0828'), - ('\u0840', '\u0858'), ('\u08a0', '\u08a0'), - ('\u08a2', '\u08ac'), ('\u0904', '\u0939'), - ('\u093d', '\u093d'), ('\u0950', '\u0950'), - ('\u0958', '\u0961'), ('\u0971', '\u0971'), - ('\u0972', '\u0977'), ('\u0979', '\u097f'), - ('\u0985', '\u098c'), ('\u098f', '\u0990'), - ('\u0993', '\u09a8'), ('\u09aa', '\u09b0'), - ('\u09b2', '\u09b2'), ('\u09b6', '\u09b9'), - ('\u09bd', '\u09bd'), ('\u09ce', '\u09ce'), - ('\u09dc', '\u09dd'), ('\u09df', '\u09e1'), - ('\u09f0', '\u09f1'), ('\u0a05', '\u0a0a'), - ('\u0a0f', '\u0a10'), ('\u0a13', '\u0a28'), - ('\u0a2a', '\u0a30'), ('\u0a32', '\u0a33'), - ('\u0a35', '\u0a36'), ('\u0a38', '\u0a39'), - ('\u0a59', '\u0a5c'), ('\u0a5e', '\u0a5e'), - ('\u0a72', '\u0a74'), ('\u0a85', '\u0a8d'), - ('\u0a8f', '\u0a91'), ('\u0a93', '\u0aa8'), - ('\u0aaa', '\u0ab0'), ('\u0ab2', '\u0ab3'), - ('\u0ab5', '\u0ab9'), ('\u0abd', '\u0abd'), - ('\u0ad0', '\u0ad0'), ('\u0ae0', '\u0ae1'), - ('\u0b05', '\u0b0c'), ('\u0b0f', '\u0b10'), - ('\u0b13', '\u0b28'), ('\u0b2a', '\u0b30'), - ('\u0b32', '\u0b33'), ('\u0b35', '\u0b39'), - ('\u0b3d', '\u0b3d'), ('\u0b5c', '\u0b5d'), - ('\u0b5f', '\u0b61'), ('\u0b71', '\u0b71'), - ('\u0b83', '\u0b83'), ('\u0b85', '\u0b8a'), - ('\u0b8e', '\u0b90'), ('\u0b92', '\u0b95'), - ('\u0b99', '\u0b9a'), ('\u0b9c', '\u0b9c'), - ('\u0b9e', '\u0b9f'), ('\u0ba3', '\u0ba4'), - ('\u0ba8', '\u0baa'), ('\u0bae', '\u0bb9'), - ('\u0bd0', '\u0bd0'), ('\u0c05', '\u0c0c'), - ('\u0c0e', '\u0c10'), ('\u0c12', '\u0c28'), - ('\u0c2a', '\u0c33'), ('\u0c35', '\u0c39'), - ('\u0c3d', '\u0c3d'), ('\u0c58', '\u0c59'), - ('\u0c60', '\u0c61'), ('\u0c85', '\u0c8c'), - ('\u0c8e', '\u0c90'), ('\u0c92', '\u0ca8'), - ('\u0caa', '\u0cb3'), ('\u0cb5', '\u0cb9'), - ('\u0cbd', '\u0cbd'), ('\u0cde', '\u0cde'), - ('\u0ce0', '\u0ce1'), ('\u0cf1', '\u0cf2'), - ('\u0d05', '\u0d0c'), ('\u0d0e', '\u0d10'), - ('\u0d12', '\u0d3a'), ('\u0d3d', '\u0d3d'), - ('\u0d4e', '\u0d4e'), ('\u0d60', '\u0d61'), - ('\u0d7a', '\u0d7f'), ('\u0d85', '\u0d96'), - ('\u0d9a', '\u0db1'), ('\u0db3', '\u0dbb'), - ('\u0dbd', '\u0dbd'), ('\u0dc0', '\u0dc6'), - ('\u0e01', '\u0e30'), ('\u0e32', '\u0e32'), - ('\u0e40', '\u0e45'), ('\u0e46', '\u0e46'), - ('\u0e81', '\u0e82'), ('\u0e84', '\u0e84'), - ('\u0e87', '\u0e88'), ('\u0e8a', '\u0e8a'), - ('\u0e8d', '\u0e8d'), ('\u0e94', '\u0e97'), - ('\u0e99', '\u0e9f'), ('\u0ea1', '\u0ea3'), - ('\u0ea5', '\u0ea5'), ('\u0ea7', '\u0ea7'), - ('\u0eaa', '\u0eab'), ('\u0ead', '\u0eb0'), - ('\u0eb2', '\u0eb2'), ('\u0ebd', '\u0ebd'), - ('\u0ec0', '\u0ec4'), ('\u0ec6', '\u0ec6'), - ('\u0edc', '\u0edf'), ('\u0f00', '\u0f00'), - ('\u0f40', '\u0f47'), ('\u0f49', '\u0f6c'), - ('\u0f88', '\u0f8c'), ('\u1000', '\u102a'), - ('\u103f', '\u103f'), ('\u1050', '\u1055'), - ('\u105a', '\u105d'), ('\u1061', '\u1061'), - ('\u1065', '\u1066'), ('\u106e', '\u1070'), - ('\u1075', '\u1081'), ('\u108e', '\u108e'), - ('\u10a0', '\u10c5'), ('\u10c7', '\u10c7'), - ('\u10cd', '\u10cd'), ('\u10d0', '\u10fa'), - ('\u10fc', '\u10fc'), ('\u10fd', '\u1248'), - ('\u124a', '\u124d'), ('\u1250', '\u1256'), - ('\u1258', '\u1258'), ('\u125a', '\u125d'), - ('\u1260', '\u1288'), ('\u128a', '\u128d'), - ('\u1290', '\u12b0'), ('\u12b2', '\u12b5'), - ('\u12b8', '\u12be'), ('\u12c0', '\u12c0'), - ('\u12c2', '\u12c5'), ('\u12c8', '\u12d6'), - ('\u12d8', '\u1310'), ('\u1312', '\u1315'), - ('\u1318', '\u135a'), ('\u1380', '\u138f'), - ('\u13a0', '\u13f4'), ('\u1401', '\u166c'), - ('\u166f', '\u167f'), ('\u1681', '\u169a'), - ('\u16a0', '\u16ea'), ('\u16ee', '\u16f0'), - ('\u1700', '\u170c'), ('\u170e', '\u1711'), - ('\u1720', '\u1731'), ('\u1740', '\u1751'), - ('\u1760', '\u176c'), ('\u176e', '\u1770'), - ('\u1780', '\u17b3'), ('\u17d7', '\u17d7'), - ('\u17dc', '\u17dc'), ('\u1820', '\u1842'), - ('\u1843', '\u1843'), ('\u1844', '\u1877'), - ('\u1880', '\u18a8'), ('\u18aa', '\u18aa'), - ('\u18b0', '\u18f5'), ('\u1900', '\u191c'), - ('\u1950', '\u196d'), ('\u1970', '\u1974'), - ('\u1980', '\u19ab'), ('\u19c1', '\u19c7'), - ('\u1a00', '\u1a16'), ('\u1a20', '\u1a54'), - ('\u1aa7', '\u1aa7'), ('\u1b05', '\u1b33'), - ('\u1b45', '\u1b4b'), ('\u1b83', '\u1ba0'), - ('\u1bae', '\u1baf'), ('\u1bba', '\u1be5'), - ('\u1c00', '\u1c23'), ('\u1c4d', '\u1c4f'), - ('\u1c5a', '\u1c77'), ('\u1c78', '\u1c7d'), - ('\u1ce9', '\u1cec'), ('\u1cee', '\u1cf1'), - ('\u1cf5', '\u1cf6'), ('\u1d00', '\u1d2b'), - ('\u1d2c', '\u1d6a'), ('\u1d6b', '\u1d77'), - ('\u1d78', '\u1d78'), ('\u1d79', '\u1d9a'), - ('\u1d9b', '\u1dbf'), ('\u1e00', '\u1f15'), - ('\u1f18', '\u1f1d'), ('\u1f20', '\u1f45'), - ('\u1f48', '\u1f4d'), ('\u1f50', '\u1f57'), - ('\u1f59', '\u1f59'), ('\u1f5b', '\u1f5b'), - ('\u1f5d', '\u1f5d'), ('\u1f5f', '\u1f7d'), - ('\u1f80', '\u1fb4'), ('\u1fb6', '\u1fbc'), - ('\u1fbe', '\u1fbe'), ('\u1fc2', '\u1fc4'), - ('\u1fc6', '\u1fcc'), ('\u1fd0', '\u1fd3'), - ('\u1fd6', '\u1fdb'), ('\u1fe0', '\u1fec'), - ('\u1ff2', '\u1ff4'), ('\u1ff6', '\u1ffc'), - ('\u2071', '\u2071'), ('\u207f', '\u207f'), - ('\u2090', '\u209c'), ('\u2102', '\u2102'), - ('\u2107', '\u2107'), ('\u210a', '\u2113'), - ('\u2115', '\u2115'), ('\u2118', '\u2118'), - ('\u2119', '\u211d'), ('\u2124', '\u2124'), - ('\u2126', '\u2126'), ('\u2128', '\u2128'), - ('\u212a', '\u212d'), ('\u212e', '\u212e'), - ('\u212f', '\u2134'), ('\u2135', '\u2138'), - ('\u2139', '\u2139'), ('\u213c', '\u213f'), - ('\u2145', '\u2149'), ('\u214e', '\u214e'), - ('\u2160', '\u2182'), ('\u2183', '\u2184'), - ('\u2185', '\u2188'), ('\u2c00', '\u2c2e'), - ('\u2c30', '\u2c5e'), ('\u2c60', '\u2c7b'), - ('\u2c7c', '\u2c7d'), ('\u2c7e', '\u2ce4'), - ('\u2ceb', '\u2cee'), ('\u2cf2', '\u2cf3'), - ('\u2d00', '\u2d25'), ('\u2d27', '\u2d27'), - ('\u2d2d', '\u2d2d'), ('\u2d30', '\u2d67'), - ('\u2d6f', '\u2d6f'), ('\u2d80', '\u2d96'), - ('\u2da0', '\u2da6'), ('\u2da8', '\u2dae'), - ('\u2db0', '\u2db6'), ('\u2db8', '\u2dbe'), - ('\u2dc0', '\u2dc6'), ('\u2dc8', '\u2dce'), - ('\u2dd0', '\u2dd6'), ('\u2dd8', '\u2dde'), - ('\u3005', '\u3005'), ('\u3006', '\u3006'), - ('\u3007', '\u3007'), ('\u3021', '\u3029'), - ('\u3031', '\u3035'), ('\u3038', '\u303a'), - ('\u303b', '\u303b'), ('\u303c', '\u303c'), - ('\u3041', '\u3096'), ('\u309d', '\u309e'), - ('\u309f', '\u309f'), ('\u30a1', '\u30fa'), - ('\u30fc', '\u30fe'), ('\u30ff', '\u30ff'), - ('\u3105', '\u312d'), ('\u3131', '\u318e'), - ('\u31a0', '\u31ba'), ('\u31f0', '\u31ff'), - ('\u3400', '\u4db5'), ('\u4e00', '\u9fcc'), - ('\ua000', '\ua014'), ('\ua015', '\ua015'), - ('\ua016', '\ua48c'), ('\ua4d0', '\ua4f7'), - ('\ua4f8', '\ua4fd'), ('\ua500', '\ua60b'), - ('\ua60c', '\ua60c'), ('\ua610', '\ua61f'), - ('\ua62a', '\ua62b'), ('\ua640', '\ua66d'), - ('\ua66e', '\ua66e'), ('\ua67f', '\ua67f'), - ('\ua680', '\ua697'), ('\ua6a0', '\ua6e5'), - ('\ua6e6', '\ua6ef'), ('\ua717', '\ua71f'), - ('\ua722', '\ua76f'), ('\ua770', '\ua770'), - ('\ua771', '\ua787'), ('\ua788', '\ua788'), - ('\ua78b', '\ua78e'), ('\ua790', '\ua793'), - ('\ua7a0', '\ua7aa'), ('\ua7f8', '\ua7f9'), - ('\ua7fa', '\ua7fa'), ('\ua7fb', '\ua801'), - ('\ua803', '\ua805'), ('\ua807', '\ua80a'), - ('\ua80c', '\ua822'), ('\ua840', '\ua873'), - ('\ua882', '\ua8b3'), ('\ua8f2', '\ua8f7'), - ('\ua8fb', '\ua8fb'), ('\ua90a', '\ua925'), - ('\ua930', '\ua946'), ('\ua960', '\ua97c'), - ('\ua984', '\ua9b2'), ('\ua9cf', '\ua9cf'), - ('\uaa00', '\uaa28'), ('\uaa40', '\uaa42'), - ('\uaa44', '\uaa4b'), ('\uaa60', '\uaa6f'), - ('\uaa70', '\uaa70'), ('\uaa71', '\uaa76'), - ('\uaa7a', '\uaa7a'), ('\uaa80', '\uaaaf'), - ('\uaab1', '\uaab1'), ('\uaab5', '\uaab6'), - ('\uaab9', '\uaabd'), ('\uaac0', '\uaac0'), - ('\uaac2', '\uaac2'), ('\uaadb', '\uaadc'), - ('\uaadd', '\uaadd'), ('\uaae0', '\uaaea'), - ('\uaaf2', '\uaaf2'), ('\uaaf3', '\uaaf4'), - ('\uab01', '\uab06'), ('\uab09', '\uab0e'), - ('\uab11', '\uab16'), ('\uab20', '\uab26'), - ('\uab28', '\uab2e'), ('\uabc0', '\uabe2'), - ('\uac00', '\ud7a3'), ('\ud7b0', '\ud7c6'), - ('\ud7cb', '\ud7fb'), ('\uf900', '\ufa6d'), - ('\ufa70', '\ufad9'), ('\ufb00', '\ufb06'), - ('\ufb13', '\ufb17'), ('\ufb1d', '\ufb1d'), - ('\ufb1f', '\ufb28'), ('\ufb2a', '\ufb36'), - ('\ufb38', '\ufb3c'), ('\ufb3e', '\ufb3e'), - ('\ufb40', '\ufb41'), ('\ufb43', '\ufb44'), - ('\ufb46', '\ufbb1'), ('\ufbd3', '\ufc5d'), - ('\ufc64', '\ufd3d'), ('\ufd50', '\ufd8f'), - ('\ufd92', '\ufdc7'), ('\ufdf0', '\ufdf9'), - ('\ufe71', '\ufe71'), ('\ufe73', '\ufe73'), - ('\ufe77', '\ufe77'), ('\ufe79', '\ufe79'), - ('\ufe7b', '\ufe7b'), ('\ufe7d', '\ufe7d'), - ('\ufe7f', '\ufefc'), ('\uff21', '\uff3a'), - ('\uff41', '\uff5a'), ('\uff66', '\uff6f'), - ('\uff70', '\uff70'), ('\uff71', '\uff9d'), - ('\uffa0', '\uffbe'), ('\uffc2', '\uffc7'), - ('\uffca', '\uffcf'), ('\uffd2', '\uffd7'), - ('\uffda', '\uffdc'), ('\U00010000', '\U0001000b'), - ('\U0001000d', '\U00010026'), ('\U00010028', '\U0001003a'), - ('\U0001003c', '\U0001003d'), ('\U0001003f', '\U0001004d'), - ('\U00010050', '\U0001005d'), ('\U00010080', '\U000100fa'), - ('\U00010140', '\U00010174'), ('\U00010280', '\U0001029c'), - ('\U000102a0', '\U000102d0'), ('\U00010300', '\U0001031e'), - ('\U00010330', '\U00010340'), ('\U00010341', '\U00010341'), - ('\U00010342', '\U00010349'), ('\U0001034a', '\U0001034a'), - ('\U00010380', '\U0001039d'), ('\U000103a0', '\U000103c3'), - ('\U000103c8', '\U000103cf'), ('\U000103d1', '\U000103d5'), - ('\U00010400', '\U0001044f'), ('\U00010450', '\U0001049d'), - ('\U00010800', '\U00010805'), ('\U00010808', '\U00010808'), - ('\U0001080a', '\U00010835'), ('\U00010837', '\U00010838'), - ('\U0001083c', '\U0001083c'), ('\U0001083f', '\U00010855'), - ('\U00010900', '\U00010915'), ('\U00010920', '\U00010939'), - ('\U00010980', '\U000109b7'), ('\U000109be', '\U000109bf'), - ('\U00010a00', '\U00010a00'), ('\U00010a10', '\U00010a13'), - ('\U00010a15', '\U00010a17'), ('\U00010a19', '\U00010a33'), - ('\U00010a60', '\U00010a7c'), ('\U00010b00', '\U00010b35'), - ('\U00010b40', '\U00010b55'), ('\U00010b60', '\U00010b72'), - ('\U00010c00', '\U00010c48'), ('\U00011003', '\U00011037'), - ('\U00011083', '\U000110af'), ('\U000110d0', '\U000110e8'), - ('\U00011103', '\U00011126'), ('\U00011183', '\U000111b2'), - ('\U000111c1', '\U000111c4'), ('\U00011680', '\U000116aa'), - ('\U00012000', '\U0001236e'), ('\U00012400', '\U00012462'), - ('\U00013000', '\U0001342e'), ('\U00016800', '\U00016a38'), - ('\U00016f00', '\U00016f44'), ('\U00016f50', '\U00016f50'), - ('\U00016f93', '\U00016f9f'), ('\U0001b000', '\U0001b001'), - ('\U0001d400', '\U0001d454'), ('\U0001d456', '\U0001d49c'), - ('\U0001d49e', '\U0001d49f'), ('\U0001d4a2', '\U0001d4a2'), - ('\U0001d4a5', '\U0001d4a6'), ('\U0001d4a9', '\U0001d4ac'), - ('\U0001d4ae', '\U0001d4b9'), ('\U0001d4bb', '\U0001d4bb'), - ('\U0001d4bd', '\U0001d4c3'), ('\U0001d4c5', '\U0001d505'), - ('\U0001d507', '\U0001d50a'), ('\U0001d50d', '\U0001d514'), - ('\U0001d516', '\U0001d51c'), ('\U0001d51e', '\U0001d539'), - ('\U0001d53b', '\U0001d53e'), ('\U0001d540', '\U0001d544'), - ('\U0001d546', '\U0001d546'), ('\U0001d54a', '\U0001d550'), - ('\U0001d552', '\U0001d6a5'), ('\U0001d6a8', '\U0001d6c0'), - ('\U0001d6c2', '\U0001d6da'), ('\U0001d6dc', '\U0001d6fa'), - ('\U0001d6fc', '\U0001d714'), ('\U0001d716', '\U0001d734'), - ('\U0001d736', '\U0001d74e'), ('\U0001d750', '\U0001d76e'), - ('\U0001d770', '\U0001d788'), ('\U0001d78a', '\U0001d7a8'), - ('\U0001d7aa', '\U0001d7c2'), ('\U0001d7c4', '\U0001d7cb'), - ('\U0001ee00', '\U0001ee03'), ('\U0001ee05', '\U0001ee1f'), - ('\U0001ee21', '\U0001ee22'), ('\U0001ee24', '\U0001ee24'), - ('\U0001ee27', '\U0001ee27'), ('\U0001ee29', '\U0001ee32'), - ('\U0001ee34', '\U0001ee37'), ('\U0001ee39', '\U0001ee39'), - ('\U0001ee3b', '\U0001ee3b'), ('\U0001ee42', '\U0001ee42'), - ('\U0001ee47', '\U0001ee47'), ('\U0001ee49', '\U0001ee49'), - ('\U0001ee4b', '\U0001ee4b'), ('\U0001ee4d', '\U0001ee4f'), - ('\U0001ee51', '\U0001ee52'), ('\U0001ee54', '\U0001ee54'), - ('\U0001ee57', '\U0001ee57'), ('\U0001ee59', '\U0001ee59'), - ('\U0001ee5b', '\U0001ee5b'), ('\U0001ee5d', '\U0001ee5d'), - ('\U0001ee5f', '\U0001ee5f'), ('\U0001ee61', '\U0001ee62'), - ('\U0001ee64', '\U0001ee64'), ('\U0001ee67', '\U0001ee6a'), - ('\U0001ee6c', '\U0001ee72'), ('\U0001ee74', '\U0001ee77'), - ('\U0001ee79', '\U0001ee7c'), ('\U0001ee7e', '\U0001ee7e'), - ('\U0001ee80', '\U0001ee89'), ('\U0001ee8b', '\U0001ee9b'), - ('\U0001eea1', '\U0001eea3'), ('\U0001eea5', '\U0001eea9'), - ('\U0001eeab', '\U0001eebb'), ('\U00020000', '\U0002a6d6'), - ('\U0002a700', '\U0002b734'), ('\U0002b740', '\U0002b81d'), - ('\U0002f800', '\U0002fa1d') - ]; - - pub fn XID_Start(c: char) -> bool { - super::bsearch_range_table(c, XID_Start_table) - } -} - -pub mod property { - static White_Space_table : &'static [(char,char)] = &[ - ('\x09', '\x0d'), ('\x20', '\x20'), - ('\x85', '\x85'), ('\xa0', '\xa0'), - ('\u1680', '\u1680'), ('\u2000', '\u200a'), - ('\u2028', '\u2028'), ('\u2029', '\u2029'), - ('\u202f', '\u202f'), ('\u205f', '\u205f'), - ('\u3000', '\u3000') - ]; - - pub fn White_Space(c: char) -> bool { - super::bsearch_range_table(c, White_Space_table) - } -} - -pub mod conversions { - use cmp::{Equal, Less, Greater}; - use slice::ImmutableVector; - use tuple::Tuple2; - use option::{Option, Some, None}; - - pub fn to_lower(c: char) -> char { - match bsearch_case_table(c, LuLl_table) { - None => c, - Some(index) => LuLl_table[index].val1() - } - } - - pub fn to_upper(c: char) -> char { - match bsearch_case_table(c, LlLu_table) { - None => c, - Some(index) => LlLu_table[index].val1() - } - } - - fn bsearch_case_table(c: char, table: &'static [(char, char)]) -> Option { - table.bsearch(|&(key, _)| { - if c == key { Equal } - else if key < c { Less } - else { Greater } - }) - } - - static LuLl_table : &'static [(char, char)] = &[ - ('\x41', '\x61'), ('\x42', '\x62'), - ('\x43', '\x63'), ('\x44', '\x64'), - ('\x45', '\x65'), ('\x46', '\x66'), - ('\x47', '\x67'), ('\x48', '\x68'), - ('\x49', '\x69'), ('\x4a', '\x6a'), - ('\x4b', '\x6b'), ('\x4c', '\x6c'), - ('\x4d', '\x6d'), ('\x4e', '\x6e'), - ('\x4f', '\x6f'), ('\x50', '\x70'), - ('\x51', '\x71'), ('\x52', '\x72'), - ('\x53', '\x73'), ('\x54', '\x74'), - ('\x55', '\x75'), ('\x56', '\x76'), - ('\x57', '\x77'), ('\x58', '\x78'), - ('\x59', '\x79'), ('\x5a', '\x7a'), - ('\xc0', '\xe0'), ('\xc1', '\xe1'), - ('\xc2', '\xe2'), ('\xc3', '\xe3'), - ('\xc4', '\xe4'), ('\xc5', '\xe5'), - ('\xc6', '\xe6'), ('\xc7', '\xe7'), - ('\xc8', '\xe8'), ('\xc9', '\xe9'), - ('\xca', '\xea'), ('\xcb', '\xeb'), - ('\xcc', '\xec'), ('\xcd', '\xed'), - ('\xce', '\xee'), ('\xcf', '\xef'), - ('\xd0', '\xf0'), ('\xd1', '\xf1'), - ('\xd2', '\xf2'), ('\xd3', '\xf3'), - ('\xd4', '\xf4'), ('\xd5', '\xf5'), - ('\xd6', '\xf6'), ('\xd8', '\xf8'), - ('\xd9', '\xf9'), ('\xda', '\xfa'), - ('\xdb', '\xfb'), ('\xdc', '\xfc'), - ('\xdd', '\xfd'), ('\xde', '\xfe'), - ('\u0100', '\u0101'), ('\u0102', '\u0103'), - ('\u0104', '\u0105'), ('\u0106', '\u0107'), - ('\u0108', '\u0109'), ('\u010a', '\u010b'), - ('\u010c', '\u010d'), ('\u010e', '\u010f'), - ('\u0110', '\u0111'), ('\u0112', '\u0113'), - ('\u0114', '\u0115'), ('\u0116', '\u0117'), - ('\u0118', '\u0119'), ('\u011a', '\u011b'), - ('\u011c', '\u011d'), ('\u011e', '\u011f'), - ('\u0120', '\u0121'), ('\u0122', '\u0123'), - ('\u0124', '\u0125'), ('\u0126', '\u0127'), - ('\u0128', '\u0129'), ('\u012a', '\u012b'), - ('\u012c', '\u012d'), ('\u012e', '\u012f'), - ('\u0130', '\x69'), ('\u0132', '\u0133'), - ('\u0134', '\u0135'), ('\u0136', '\u0137'), - ('\u0139', '\u013a'), ('\u013b', '\u013c'), - ('\u013d', '\u013e'), ('\u013f', '\u0140'), - ('\u0141', '\u0142'), ('\u0143', '\u0144'), - ('\u0145', '\u0146'), ('\u0147', '\u0148'), - ('\u014a', '\u014b'), ('\u014c', '\u014d'), - ('\u014e', '\u014f'), ('\u0150', '\u0151'), - ('\u0152', '\u0153'), ('\u0154', '\u0155'), - ('\u0156', '\u0157'), ('\u0158', '\u0159'), - ('\u015a', '\u015b'), ('\u015c', '\u015d'), - ('\u015e', '\u015f'), ('\u0160', '\u0161'), - ('\u0162', '\u0163'), ('\u0164', '\u0165'), - ('\u0166', '\u0167'), ('\u0168', '\u0169'), - ('\u016a', '\u016b'), ('\u016c', '\u016d'), - ('\u016e', '\u016f'), ('\u0170', '\u0171'), - ('\u0172', '\u0173'), ('\u0174', '\u0175'), - ('\u0176', '\u0177'), ('\u0178', '\xff'), - ('\u0179', '\u017a'), ('\u017b', '\u017c'), - ('\u017d', '\u017e'), ('\u0181', '\u0253'), - ('\u0182', '\u0183'), ('\u0184', '\u0185'), - ('\u0186', '\u0254'), ('\u0187', '\u0188'), - ('\u0189', '\u0256'), ('\u018a', '\u0257'), - ('\u018b', '\u018c'), ('\u018e', '\u01dd'), - ('\u018f', '\u0259'), ('\u0190', '\u025b'), - ('\u0191', '\u0192'), ('\u0193', '\u0260'), - ('\u0194', '\u0263'), ('\u0196', '\u0269'), - ('\u0197', '\u0268'), ('\u0198', '\u0199'), - ('\u019c', '\u026f'), ('\u019d', '\u0272'), - ('\u019f', '\u0275'), ('\u01a0', '\u01a1'), - ('\u01a2', '\u01a3'), ('\u01a4', '\u01a5'), - ('\u01a6', '\u0280'), ('\u01a7', '\u01a8'), - ('\u01a9', '\u0283'), ('\u01ac', '\u01ad'), - ('\u01ae', '\u0288'), ('\u01af', '\u01b0'), - ('\u01b1', '\u028a'), ('\u01b2', '\u028b'), - ('\u01b3', '\u01b4'), ('\u01b5', '\u01b6'), - ('\u01b7', '\u0292'), ('\u01b8', '\u01b9'), - ('\u01bc', '\u01bd'), ('\u01c4', '\u01c6'), - ('\u01c7', '\u01c9'), ('\u01ca', '\u01cc'), - ('\u01cd', '\u01ce'), ('\u01cf', '\u01d0'), - ('\u01d1', '\u01d2'), ('\u01d3', '\u01d4'), - ('\u01d5', '\u01d6'), ('\u01d7', '\u01d8'), - ('\u01d9', '\u01da'), ('\u01db', '\u01dc'), - ('\u01de', '\u01df'), ('\u01e0', '\u01e1'), - ('\u01e2', '\u01e3'), ('\u01e4', '\u01e5'), - ('\u01e6', '\u01e7'), ('\u01e8', '\u01e9'), - ('\u01ea', '\u01eb'), ('\u01ec', '\u01ed'), - ('\u01ee', '\u01ef'), ('\u01f1', '\u01f3'), - ('\u01f4', '\u01f5'), ('\u01f6', '\u0195'), - ('\u01f7', '\u01bf'), ('\u01f8', '\u01f9'), - ('\u01fa', '\u01fb'), ('\u01fc', '\u01fd'), - ('\u01fe', '\u01ff'), ('\u0200', '\u0201'), - ('\u0202', '\u0203'), ('\u0204', '\u0205'), - ('\u0206', '\u0207'), ('\u0208', '\u0209'), - ('\u020a', '\u020b'), ('\u020c', '\u020d'), - ('\u020e', '\u020f'), ('\u0210', '\u0211'), - ('\u0212', '\u0213'), ('\u0214', '\u0215'), - ('\u0216', '\u0217'), ('\u0218', '\u0219'), - ('\u021a', '\u021b'), ('\u021c', '\u021d'), - ('\u021e', '\u021f'), ('\u0220', '\u019e'), - ('\u0222', '\u0223'), ('\u0224', '\u0225'), - ('\u0226', '\u0227'), ('\u0228', '\u0229'), - ('\u022a', '\u022b'), ('\u022c', '\u022d'), - ('\u022e', '\u022f'), ('\u0230', '\u0231'), - ('\u0232', '\u0233'), ('\u023a', '\u2c65'), - ('\u023b', '\u023c'), ('\u023d', '\u019a'), - ('\u023e', '\u2c66'), ('\u0241', '\u0242'), - ('\u0243', '\u0180'), ('\u0244', '\u0289'), - ('\u0245', '\u028c'), ('\u0246', '\u0247'), - ('\u0248', '\u0249'), ('\u024a', '\u024b'), - ('\u024c', '\u024d'), ('\u024e', '\u024f'), - ('\u0370', '\u0371'), ('\u0372', '\u0373'), - ('\u0376', '\u0377'), ('\u0386', '\u03ac'), - ('\u0388', '\u03ad'), ('\u0389', '\u03ae'), - ('\u038a', '\u03af'), ('\u038c', '\u03cc'), - ('\u038e', '\u03cd'), ('\u038f', '\u03ce'), - ('\u0391', '\u03b1'), ('\u0392', '\u03b2'), - ('\u0393', '\u03b3'), ('\u0394', '\u03b4'), - ('\u0395', '\u03b5'), ('\u0396', '\u03b6'), - ('\u0397', '\u03b7'), ('\u0398', '\u03b8'), - ('\u0399', '\u03b9'), ('\u039a', '\u03ba'), - ('\u039b', '\u03bb'), ('\u039c', '\u03bc'), - ('\u039d', '\u03bd'), ('\u039e', '\u03be'), - ('\u039f', '\u03bf'), ('\u03a0', '\u03c0'), - ('\u03a1', '\u03c1'), ('\u03a3', '\u03c3'), - ('\u03a4', '\u03c4'), ('\u03a5', '\u03c5'), - ('\u03a6', '\u03c6'), ('\u03a7', '\u03c7'), - ('\u03a8', '\u03c8'), ('\u03a9', '\u03c9'), - ('\u03aa', '\u03ca'), ('\u03ab', '\u03cb'), - ('\u03cf', '\u03d7'), ('\u03d8', '\u03d9'), - ('\u03da', '\u03db'), ('\u03dc', '\u03dd'), - ('\u03de', '\u03df'), ('\u03e0', '\u03e1'), - ('\u03e2', '\u03e3'), ('\u03e4', '\u03e5'), - ('\u03e6', '\u03e7'), ('\u03e8', '\u03e9'), - ('\u03ea', '\u03eb'), ('\u03ec', '\u03ed'), - ('\u03ee', '\u03ef'), ('\u03f4', '\u03b8'), - ('\u03f7', '\u03f8'), ('\u03f9', '\u03f2'), - ('\u03fa', '\u03fb'), ('\u03fd', '\u037b'), - ('\u03fe', '\u037c'), ('\u03ff', '\u037d'), - ('\u0400', '\u0450'), ('\u0401', '\u0451'), - ('\u0402', '\u0452'), ('\u0403', '\u0453'), - ('\u0404', '\u0454'), ('\u0405', '\u0455'), - ('\u0406', '\u0456'), ('\u0407', '\u0457'), - ('\u0408', '\u0458'), ('\u0409', '\u0459'), - ('\u040a', '\u045a'), ('\u040b', '\u045b'), - ('\u040c', '\u045c'), ('\u040d', '\u045d'), - ('\u040e', '\u045e'), ('\u040f', '\u045f'), - ('\u0410', '\u0430'), ('\u0411', '\u0431'), - ('\u0412', '\u0432'), ('\u0413', '\u0433'), - ('\u0414', '\u0434'), ('\u0415', '\u0435'), - ('\u0416', '\u0436'), ('\u0417', '\u0437'), - ('\u0418', '\u0438'), ('\u0419', '\u0439'), - ('\u041a', '\u043a'), ('\u041b', '\u043b'), - ('\u041c', '\u043c'), ('\u041d', '\u043d'), - ('\u041e', '\u043e'), ('\u041f', '\u043f'), - ('\u0420', '\u0440'), ('\u0421', '\u0441'), - ('\u0422', '\u0442'), ('\u0423', '\u0443'), - ('\u0424', '\u0444'), ('\u0425', '\u0445'), - ('\u0426', '\u0446'), ('\u0427', '\u0447'), - ('\u0428', '\u0448'), ('\u0429', '\u0449'), - ('\u042a', '\u044a'), ('\u042b', '\u044b'), - ('\u042c', '\u044c'), ('\u042d', '\u044d'), - ('\u042e', '\u044e'), ('\u042f', '\u044f'), - ('\u0460', '\u0461'), ('\u0462', '\u0463'), - ('\u0464', '\u0465'), ('\u0466', '\u0467'), - ('\u0468', '\u0469'), ('\u046a', '\u046b'), - ('\u046c', '\u046d'), ('\u046e', '\u046f'), - ('\u0470', '\u0471'), ('\u0472', '\u0473'), - ('\u0474', '\u0475'), ('\u0476', '\u0477'), - ('\u0478', '\u0479'), ('\u047a', '\u047b'), - ('\u047c', '\u047d'), ('\u047e', '\u047f'), - ('\u0480', '\u0481'), ('\u048a', '\u048b'), - ('\u048c', '\u048d'), ('\u048e', '\u048f'), - ('\u0490', '\u0491'), ('\u0492', '\u0493'), - ('\u0494', '\u0495'), ('\u0496', '\u0497'), - ('\u0498', '\u0499'), ('\u049a', '\u049b'), - ('\u049c', '\u049d'), ('\u049e', '\u049f'), - ('\u04a0', '\u04a1'), ('\u04a2', '\u04a3'), - ('\u04a4', '\u04a5'), ('\u04a6', '\u04a7'), - ('\u04a8', '\u04a9'), ('\u04aa', '\u04ab'), - ('\u04ac', '\u04ad'), ('\u04ae', '\u04af'), - ('\u04b0', '\u04b1'), ('\u04b2', '\u04b3'), - ('\u04b4', '\u04b5'), ('\u04b6', '\u04b7'), - ('\u04b8', '\u04b9'), ('\u04ba', '\u04bb'), - ('\u04bc', '\u04bd'), ('\u04be', '\u04bf'), - ('\u04c0', '\u04cf'), ('\u04c1', '\u04c2'), - ('\u04c3', '\u04c4'), ('\u04c5', '\u04c6'), - ('\u04c7', '\u04c8'), ('\u04c9', '\u04ca'), - ('\u04cb', '\u04cc'), ('\u04cd', '\u04ce'), - ('\u04d0', '\u04d1'), ('\u04d2', '\u04d3'), - ('\u04d4', '\u04d5'), ('\u04d6', '\u04d7'), - ('\u04d8', '\u04d9'), ('\u04da', '\u04db'), - ('\u04dc', '\u04dd'), ('\u04de', '\u04df'), - ('\u04e0', '\u04e1'), ('\u04e2', '\u04e3'), - ('\u04e4', '\u04e5'), ('\u04e6', '\u04e7'), - ('\u04e8', '\u04e9'), ('\u04ea', '\u04eb'), - ('\u04ec', '\u04ed'), ('\u04ee', '\u04ef'), - ('\u04f0', '\u04f1'), ('\u04f2', '\u04f3'), - ('\u04f4', '\u04f5'), ('\u04f6', '\u04f7'), - ('\u04f8', '\u04f9'), ('\u04fa', '\u04fb'), - ('\u04fc', '\u04fd'), ('\u04fe', '\u04ff'), - ('\u0500', '\u0501'), ('\u0502', '\u0503'), - ('\u0504', '\u0505'), ('\u0506', '\u0507'), - ('\u0508', '\u0509'), ('\u050a', '\u050b'), - ('\u050c', '\u050d'), ('\u050e', '\u050f'), - ('\u0510', '\u0511'), ('\u0512', '\u0513'), - ('\u0514', '\u0515'), ('\u0516', '\u0517'), - ('\u0518', '\u0519'), ('\u051a', '\u051b'), - ('\u051c', '\u051d'), ('\u051e', '\u051f'), - ('\u0520', '\u0521'), ('\u0522', '\u0523'), - ('\u0524', '\u0525'), ('\u0526', '\u0527'), - ('\u0531', '\u0561'), ('\u0532', '\u0562'), - ('\u0533', '\u0563'), ('\u0534', '\u0564'), - ('\u0535', '\u0565'), ('\u0536', '\u0566'), - ('\u0537', '\u0567'), ('\u0538', '\u0568'), - ('\u0539', '\u0569'), ('\u053a', '\u056a'), - ('\u053b', '\u056b'), ('\u053c', '\u056c'), - ('\u053d', '\u056d'), ('\u053e', '\u056e'), - ('\u053f', '\u056f'), ('\u0540', '\u0570'), - ('\u0541', '\u0571'), ('\u0542', '\u0572'), - ('\u0543', '\u0573'), ('\u0544', '\u0574'), - ('\u0545', '\u0575'), ('\u0546', '\u0576'), - ('\u0547', '\u0577'), ('\u0548', '\u0578'), - ('\u0549', '\u0579'), ('\u054a', '\u057a'), - ('\u054b', '\u057b'), ('\u054c', '\u057c'), - ('\u054d', '\u057d'), ('\u054e', '\u057e'), - ('\u054f', '\u057f'), ('\u0550', '\u0580'), - ('\u0551', '\u0581'), ('\u0552', '\u0582'), - ('\u0553', '\u0583'), ('\u0554', '\u0584'), - ('\u0555', '\u0585'), ('\u0556', '\u0586'), - ('\u10a0', '\u2d00'), ('\u10a1', '\u2d01'), - ('\u10a2', '\u2d02'), ('\u10a3', '\u2d03'), - ('\u10a4', '\u2d04'), ('\u10a5', '\u2d05'), - ('\u10a6', '\u2d06'), ('\u10a7', '\u2d07'), - ('\u10a8', '\u2d08'), ('\u10a9', '\u2d09'), - ('\u10aa', '\u2d0a'), ('\u10ab', '\u2d0b'), - ('\u10ac', '\u2d0c'), ('\u10ad', '\u2d0d'), - ('\u10ae', '\u2d0e'), ('\u10af', '\u2d0f'), - ('\u10b0', '\u2d10'), ('\u10b1', '\u2d11'), - ('\u10b2', '\u2d12'), ('\u10b3', '\u2d13'), - ('\u10b4', '\u2d14'), ('\u10b5', '\u2d15'), - ('\u10b6', '\u2d16'), ('\u10b7', '\u2d17'), - ('\u10b8', '\u2d18'), ('\u10b9', '\u2d19'), - ('\u10ba', '\u2d1a'), ('\u10bb', '\u2d1b'), - ('\u10bc', '\u2d1c'), ('\u10bd', '\u2d1d'), - ('\u10be', '\u2d1e'), ('\u10bf', '\u2d1f'), - ('\u10c0', '\u2d20'), ('\u10c1', '\u2d21'), - ('\u10c2', '\u2d22'), ('\u10c3', '\u2d23'), - ('\u10c4', '\u2d24'), ('\u10c5', '\u2d25'), - ('\u10c7', '\u2d27'), ('\u10cd', '\u2d2d'), - ('\u1e00', '\u1e01'), ('\u1e02', '\u1e03'), - ('\u1e04', '\u1e05'), ('\u1e06', '\u1e07'), - ('\u1e08', '\u1e09'), ('\u1e0a', '\u1e0b'), - ('\u1e0c', '\u1e0d'), ('\u1e0e', '\u1e0f'), - ('\u1e10', '\u1e11'), ('\u1e12', '\u1e13'), - ('\u1e14', '\u1e15'), ('\u1e16', '\u1e17'), - ('\u1e18', '\u1e19'), ('\u1e1a', '\u1e1b'), - ('\u1e1c', '\u1e1d'), ('\u1e1e', '\u1e1f'), - ('\u1e20', '\u1e21'), ('\u1e22', '\u1e23'), - ('\u1e24', '\u1e25'), ('\u1e26', '\u1e27'), - ('\u1e28', '\u1e29'), ('\u1e2a', '\u1e2b'), - ('\u1e2c', '\u1e2d'), ('\u1e2e', '\u1e2f'), - ('\u1e30', '\u1e31'), ('\u1e32', '\u1e33'), - ('\u1e34', '\u1e35'), ('\u1e36', '\u1e37'), - ('\u1e38', '\u1e39'), ('\u1e3a', '\u1e3b'), - ('\u1e3c', '\u1e3d'), ('\u1e3e', '\u1e3f'), - ('\u1e40', '\u1e41'), ('\u1e42', '\u1e43'), - ('\u1e44', '\u1e45'), ('\u1e46', '\u1e47'), - ('\u1e48', '\u1e49'), ('\u1e4a', '\u1e4b'), - ('\u1e4c', '\u1e4d'), ('\u1e4e', '\u1e4f'), - ('\u1e50', '\u1e51'), ('\u1e52', '\u1e53'), - ('\u1e54', '\u1e55'), ('\u1e56', '\u1e57'), - ('\u1e58', '\u1e59'), ('\u1e5a', '\u1e5b'), - ('\u1e5c', '\u1e5d'), ('\u1e5e', '\u1e5f'), - ('\u1e60', '\u1e61'), ('\u1e62', '\u1e63'), - ('\u1e64', '\u1e65'), ('\u1e66', '\u1e67'), - ('\u1e68', '\u1e69'), ('\u1e6a', '\u1e6b'), - ('\u1e6c', '\u1e6d'), ('\u1e6e', '\u1e6f'), - ('\u1e70', '\u1e71'), ('\u1e72', '\u1e73'), - ('\u1e74', '\u1e75'), ('\u1e76', '\u1e77'), - ('\u1e78', '\u1e79'), ('\u1e7a', '\u1e7b'), - ('\u1e7c', '\u1e7d'), ('\u1e7e', '\u1e7f'), - ('\u1e80', '\u1e81'), ('\u1e82', '\u1e83'), - ('\u1e84', '\u1e85'), ('\u1e86', '\u1e87'), - ('\u1e88', '\u1e89'), ('\u1e8a', '\u1e8b'), - ('\u1e8c', '\u1e8d'), ('\u1e8e', '\u1e8f'), - ('\u1e90', '\u1e91'), ('\u1e92', '\u1e93'), - ('\u1e94', '\u1e95'), ('\u1e9e', '\xdf'), - ('\u1ea0', '\u1ea1'), ('\u1ea2', '\u1ea3'), - ('\u1ea4', '\u1ea5'), ('\u1ea6', '\u1ea7'), - ('\u1ea8', '\u1ea9'), ('\u1eaa', '\u1eab'), - ('\u1eac', '\u1ead'), ('\u1eae', '\u1eaf'), - ('\u1eb0', '\u1eb1'), ('\u1eb2', '\u1eb3'), - ('\u1eb4', '\u1eb5'), ('\u1eb6', '\u1eb7'), - ('\u1eb8', '\u1eb9'), ('\u1eba', '\u1ebb'), - ('\u1ebc', '\u1ebd'), ('\u1ebe', '\u1ebf'), - ('\u1ec0', '\u1ec1'), ('\u1ec2', '\u1ec3'), - ('\u1ec4', '\u1ec5'), ('\u1ec6', '\u1ec7'), - ('\u1ec8', '\u1ec9'), ('\u1eca', '\u1ecb'), - ('\u1ecc', '\u1ecd'), ('\u1ece', '\u1ecf'), - ('\u1ed0', '\u1ed1'), ('\u1ed2', '\u1ed3'), - ('\u1ed4', '\u1ed5'), ('\u1ed6', '\u1ed7'), - ('\u1ed8', '\u1ed9'), ('\u1eda', '\u1edb'), - ('\u1edc', '\u1edd'), ('\u1ede', '\u1edf'), - ('\u1ee0', '\u1ee1'), ('\u1ee2', '\u1ee3'), - ('\u1ee4', '\u1ee5'), ('\u1ee6', '\u1ee7'), - ('\u1ee8', '\u1ee9'), ('\u1eea', '\u1eeb'), - ('\u1eec', '\u1eed'), ('\u1eee', '\u1eef'), - ('\u1ef0', '\u1ef1'), ('\u1ef2', '\u1ef3'), - ('\u1ef4', '\u1ef5'), ('\u1ef6', '\u1ef7'), - ('\u1ef8', '\u1ef9'), ('\u1efa', '\u1efb'), - ('\u1efc', '\u1efd'), ('\u1efe', '\u1eff'), - ('\u1f08', '\u1f00'), ('\u1f09', '\u1f01'), - ('\u1f0a', '\u1f02'), ('\u1f0b', '\u1f03'), - ('\u1f0c', '\u1f04'), ('\u1f0d', '\u1f05'), - ('\u1f0e', '\u1f06'), ('\u1f0f', '\u1f07'), - ('\u1f18', '\u1f10'), ('\u1f19', '\u1f11'), - ('\u1f1a', '\u1f12'), ('\u1f1b', '\u1f13'), - ('\u1f1c', '\u1f14'), ('\u1f1d', '\u1f15'), - ('\u1f28', '\u1f20'), ('\u1f29', '\u1f21'), - ('\u1f2a', '\u1f22'), ('\u1f2b', '\u1f23'), - ('\u1f2c', '\u1f24'), ('\u1f2d', '\u1f25'), - ('\u1f2e', '\u1f26'), ('\u1f2f', '\u1f27'), - ('\u1f38', '\u1f30'), ('\u1f39', '\u1f31'), - ('\u1f3a', '\u1f32'), ('\u1f3b', '\u1f33'), - ('\u1f3c', '\u1f34'), ('\u1f3d', '\u1f35'), - ('\u1f3e', '\u1f36'), ('\u1f3f', '\u1f37'), - ('\u1f48', '\u1f40'), ('\u1f49', '\u1f41'), - ('\u1f4a', '\u1f42'), ('\u1f4b', '\u1f43'), - ('\u1f4c', '\u1f44'), ('\u1f4d', '\u1f45'), - ('\u1f59', '\u1f51'), ('\u1f5b', '\u1f53'), - ('\u1f5d', '\u1f55'), ('\u1f5f', '\u1f57'), - ('\u1f68', '\u1f60'), ('\u1f69', '\u1f61'), - ('\u1f6a', '\u1f62'), ('\u1f6b', '\u1f63'), - ('\u1f6c', '\u1f64'), ('\u1f6d', '\u1f65'), - ('\u1f6e', '\u1f66'), ('\u1f6f', '\u1f67'), - ('\u1fb8', '\u1fb0'), ('\u1fb9', '\u1fb1'), - ('\u1fba', '\u1f70'), ('\u1fbb', '\u1f71'), - ('\u1fc8', '\u1f72'), ('\u1fc9', '\u1f73'), - ('\u1fca', '\u1f74'), ('\u1fcb', '\u1f75'), - ('\u1fd8', '\u1fd0'), ('\u1fd9', '\u1fd1'), - ('\u1fda', '\u1f76'), ('\u1fdb', '\u1f77'), - ('\u1fe8', '\u1fe0'), ('\u1fe9', '\u1fe1'), - ('\u1fea', '\u1f7a'), ('\u1feb', '\u1f7b'), - ('\u1fec', '\u1fe5'), ('\u1ff8', '\u1f78'), - ('\u1ff9', '\u1f79'), ('\u1ffa', '\u1f7c'), - ('\u1ffb', '\u1f7d'), ('\u2126', '\u03c9'), - ('\u212a', '\x6b'), ('\u212b', '\xe5'), - ('\u2132', '\u214e'), ('\u2183', '\u2184'), - ('\u2c00', '\u2c30'), ('\u2c01', '\u2c31'), - ('\u2c02', '\u2c32'), ('\u2c03', '\u2c33'), - ('\u2c04', '\u2c34'), ('\u2c05', '\u2c35'), - ('\u2c06', '\u2c36'), ('\u2c07', '\u2c37'), - ('\u2c08', '\u2c38'), ('\u2c09', '\u2c39'), - ('\u2c0a', '\u2c3a'), ('\u2c0b', '\u2c3b'), - ('\u2c0c', '\u2c3c'), ('\u2c0d', '\u2c3d'), - ('\u2c0e', '\u2c3e'), ('\u2c0f', '\u2c3f'), - ('\u2c10', '\u2c40'), ('\u2c11', '\u2c41'), - ('\u2c12', '\u2c42'), ('\u2c13', '\u2c43'), - ('\u2c14', '\u2c44'), ('\u2c15', '\u2c45'), - ('\u2c16', '\u2c46'), ('\u2c17', '\u2c47'), - ('\u2c18', '\u2c48'), ('\u2c19', '\u2c49'), - ('\u2c1a', '\u2c4a'), ('\u2c1b', '\u2c4b'), - ('\u2c1c', '\u2c4c'), ('\u2c1d', '\u2c4d'), - ('\u2c1e', '\u2c4e'), ('\u2c1f', '\u2c4f'), - ('\u2c20', '\u2c50'), ('\u2c21', '\u2c51'), - ('\u2c22', '\u2c52'), ('\u2c23', '\u2c53'), - ('\u2c24', '\u2c54'), ('\u2c25', '\u2c55'), - ('\u2c26', '\u2c56'), ('\u2c27', '\u2c57'), - ('\u2c28', '\u2c58'), ('\u2c29', '\u2c59'), - ('\u2c2a', '\u2c5a'), ('\u2c2b', '\u2c5b'), - ('\u2c2c', '\u2c5c'), ('\u2c2d', '\u2c5d'), - ('\u2c2e', '\u2c5e'), ('\u2c60', '\u2c61'), - ('\u2c62', '\u026b'), ('\u2c63', '\u1d7d'), - ('\u2c64', '\u027d'), ('\u2c67', '\u2c68'), - ('\u2c69', '\u2c6a'), ('\u2c6b', '\u2c6c'), - ('\u2c6d', '\u0251'), ('\u2c6e', '\u0271'), - ('\u2c6f', '\u0250'), ('\u2c70', '\u0252'), - ('\u2c72', '\u2c73'), ('\u2c75', '\u2c76'), - ('\u2c7e', '\u023f'), ('\u2c7f', '\u0240'), - ('\u2c80', '\u2c81'), ('\u2c82', '\u2c83'), - ('\u2c84', '\u2c85'), ('\u2c86', '\u2c87'), - ('\u2c88', '\u2c89'), ('\u2c8a', '\u2c8b'), - ('\u2c8c', '\u2c8d'), ('\u2c8e', '\u2c8f'), - ('\u2c90', '\u2c91'), ('\u2c92', '\u2c93'), - ('\u2c94', '\u2c95'), ('\u2c96', '\u2c97'), - ('\u2c98', '\u2c99'), ('\u2c9a', '\u2c9b'), - ('\u2c9c', '\u2c9d'), ('\u2c9e', '\u2c9f'), - ('\u2ca0', '\u2ca1'), ('\u2ca2', '\u2ca3'), - ('\u2ca4', '\u2ca5'), ('\u2ca6', '\u2ca7'), - ('\u2ca8', '\u2ca9'), ('\u2caa', '\u2cab'), - ('\u2cac', '\u2cad'), ('\u2cae', '\u2caf'), - ('\u2cb0', '\u2cb1'), ('\u2cb2', '\u2cb3'), - ('\u2cb4', '\u2cb5'), ('\u2cb6', '\u2cb7'), - ('\u2cb8', '\u2cb9'), ('\u2cba', '\u2cbb'), - ('\u2cbc', '\u2cbd'), ('\u2cbe', '\u2cbf'), - ('\u2cc0', '\u2cc1'), ('\u2cc2', '\u2cc3'), - ('\u2cc4', '\u2cc5'), ('\u2cc6', '\u2cc7'), - ('\u2cc8', '\u2cc9'), ('\u2cca', '\u2ccb'), - ('\u2ccc', '\u2ccd'), ('\u2cce', '\u2ccf'), - ('\u2cd0', '\u2cd1'), ('\u2cd2', '\u2cd3'), - ('\u2cd4', '\u2cd5'), ('\u2cd6', '\u2cd7'), - ('\u2cd8', '\u2cd9'), ('\u2cda', '\u2cdb'), - ('\u2cdc', '\u2cdd'), ('\u2cde', '\u2cdf'), - ('\u2ce0', '\u2ce1'), ('\u2ce2', '\u2ce3'), - ('\u2ceb', '\u2cec'), ('\u2ced', '\u2cee'), - ('\u2cf2', '\u2cf3'), ('\ua640', '\ua641'), - ('\ua642', '\ua643'), ('\ua644', '\ua645'), - ('\ua646', '\ua647'), ('\ua648', '\ua649'), - ('\ua64a', '\ua64b'), ('\ua64c', '\ua64d'), - ('\ua64e', '\ua64f'), ('\ua650', '\ua651'), - ('\ua652', '\ua653'), ('\ua654', '\ua655'), - ('\ua656', '\ua657'), ('\ua658', '\ua659'), - ('\ua65a', '\ua65b'), ('\ua65c', '\ua65d'), - ('\ua65e', '\ua65f'), ('\ua660', '\ua661'), - ('\ua662', '\ua663'), ('\ua664', '\ua665'), - ('\ua666', '\ua667'), ('\ua668', '\ua669'), - ('\ua66a', '\ua66b'), ('\ua66c', '\ua66d'), - ('\ua680', '\ua681'), ('\ua682', '\ua683'), - ('\ua684', '\ua685'), ('\ua686', '\ua687'), - ('\ua688', '\ua689'), ('\ua68a', '\ua68b'), - ('\ua68c', '\ua68d'), ('\ua68e', '\ua68f'), - ('\ua690', '\ua691'), ('\ua692', '\ua693'), - ('\ua694', '\ua695'), ('\ua696', '\ua697'), - ('\ua722', '\ua723'), ('\ua724', '\ua725'), - ('\ua726', '\ua727'), ('\ua728', '\ua729'), - ('\ua72a', '\ua72b'), ('\ua72c', '\ua72d'), - ('\ua72e', '\ua72f'), ('\ua732', '\ua733'), - ('\ua734', '\ua735'), ('\ua736', '\ua737'), - ('\ua738', '\ua739'), ('\ua73a', '\ua73b'), - ('\ua73c', '\ua73d'), ('\ua73e', '\ua73f'), - ('\ua740', '\ua741'), ('\ua742', '\ua743'), - ('\ua744', '\ua745'), ('\ua746', '\ua747'), - ('\ua748', '\ua749'), ('\ua74a', '\ua74b'), - ('\ua74c', '\ua74d'), ('\ua74e', '\ua74f'), - ('\ua750', '\ua751'), ('\ua752', '\ua753'), - ('\ua754', '\ua755'), ('\ua756', '\ua757'), - ('\ua758', '\ua759'), ('\ua75a', '\ua75b'), - ('\ua75c', '\ua75d'), ('\ua75e', '\ua75f'), - ('\ua760', '\ua761'), ('\ua762', '\ua763'), - ('\ua764', '\ua765'), ('\ua766', '\ua767'), - ('\ua768', '\ua769'), ('\ua76a', '\ua76b'), - ('\ua76c', '\ua76d'), ('\ua76e', '\ua76f'), - ('\ua779', '\ua77a'), ('\ua77b', '\ua77c'), - ('\ua77d', '\u1d79'), ('\ua77e', '\ua77f'), - ('\ua780', '\ua781'), ('\ua782', '\ua783'), - ('\ua784', '\ua785'), ('\ua786', '\ua787'), - ('\ua78b', '\ua78c'), ('\ua78d', '\u0265'), - ('\ua790', '\ua791'), ('\ua792', '\ua793'), - ('\ua7a0', '\ua7a1'), ('\ua7a2', '\ua7a3'), - ('\ua7a4', '\ua7a5'), ('\ua7a6', '\ua7a7'), - ('\ua7a8', '\ua7a9'), ('\ua7aa', '\u0266'), - ('\uff21', '\uff41'), ('\uff22', '\uff42'), - ('\uff23', '\uff43'), ('\uff24', '\uff44'), - ('\uff25', '\uff45'), ('\uff26', '\uff46'), - ('\uff27', '\uff47'), ('\uff28', '\uff48'), - ('\uff29', '\uff49'), ('\uff2a', '\uff4a'), - ('\uff2b', '\uff4b'), ('\uff2c', '\uff4c'), - ('\uff2d', '\uff4d'), ('\uff2e', '\uff4e'), - ('\uff2f', '\uff4f'), ('\uff30', '\uff50'), - ('\uff31', '\uff51'), ('\uff32', '\uff52'), - ('\uff33', '\uff53'), ('\uff34', '\uff54'), - ('\uff35', '\uff55'), ('\uff36', '\uff56'), - ('\uff37', '\uff57'), ('\uff38', '\uff58'), - ('\uff39', '\uff59'), ('\uff3a', '\uff5a'), - ('\U00010400', '\U00010428'), ('\U00010401', '\U00010429'), - ('\U00010402', '\U0001042a'), ('\U00010403', '\U0001042b'), - ('\U00010404', '\U0001042c'), ('\U00010405', '\U0001042d'), - ('\U00010406', '\U0001042e'), ('\U00010407', '\U0001042f'), - ('\U00010408', '\U00010430'), ('\U00010409', '\U00010431'), - ('\U0001040a', '\U00010432'), ('\U0001040b', '\U00010433'), - ('\U0001040c', '\U00010434'), ('\U0001040d', '\U00010435'), - ('\U0001040e', '\U00010436'), ('\U0001040f', '\U00010437'), - ('\U00010410', '\U00010438'), ('\U00010411', '\U00010439'), - ('\U00010412', '\U0001043a'), ('\U00010413', '\U0001043b'), - ('\U00010414', '\U0001043c'), ('\U00010415', '\U0001043d'), - ('\U00010416', '\U0001043e'), ('\U00010417', '\U0001043f'), - ('\U00010418', '\U00010440'), ('\U00010419', '\U00010441'), - ('\U0001041a', '\U00010442'), ('\U0001041b', '\U00010443'), - ('\U0001041c', '\U00010444'), ('\U0001041d', '\U00010445'), - ('\U0001041e', '\U00010446'), ('\U0001041f', '\U00010447'), - ('\U00010420', '\U00010448'), ('\U00010421', '\U00010449'), - ('\U00010422', '\U0001044a'), ('\U00010423', '\U0001044b'), - ('\U00010424', '\U0001044c'), ('\U00010425', '\U0001044d'), - ('\U00010426', '\U0001044e'), ('\U00010427', '\U0001044f') - ]; - - static LlLu_table : &'static [(char, char)] = &[ - ('\x61', '\x41'), ('\x62', '\x42'), - ('\x63', '\x43'), ('\x64', '\x44'), - ('\x65', '\x45'), ('\x66', '\x46'), - ('\x67', '\x47'), ('\x68', '\x48'), - ('\x69', '\x49'), ('\x6a', '\x4a'), - ('\x6b', '\x4b'), ('\x6c', '\x4c'), - ('\x6d', '\x4d'), ('\x6e', '\x4e'), - ('\x6f', '\x4f'), ('\x70', '\x50'), - ('\x71', '\x51'), ('\x72', '\x52'), - ('\x73', '\x53'), ('\x74', '\x54'), - ('\x75', '\x55'), ('\x76', '\x56'), - ('\x77', '\x57'), ('\x78', '\x58'), - ('\x79', '\x59'), ('\x7a', '\x5a'), - ('\xb5', '\u039c'), ('\xe0', '\xc0'), - ('\xe1', '\xc1'), ('\xe2', '\xc2'), - ('\xe3', '\xc3'), ('\xe4', '\xc4'), - ('\xe5', '\xc5'), ('\xe6', '\xc6'), - ('\xe7', '\xc7'), ('\xe8', '\xc8'), - ('\xe9', '\xc9'), ('\xea', '\xca'), - ('\xeb', '\xcb'), ('\xec', '\xcc'), - ('\xed', '\xcd'), ('\xee', '\xce'), - ('\xef', '\xcf'), ('\xf0', '\xd0'), - ('\xf1', '\xd1'), ('\xf2', '\xd2'), - ('\xf3', '\xd3'), ('\xf4', '\xd4'), - ('\xf5', '\xd5'), ('\xf6', '\xd6'), - ('\xf8', '\xd8'), ('\xf9', '\xd9'), - ('\xfa', '\xda'), ('\xfb', '\xdb'), - ('\xfc', '\xdc'), ('\xfd', '\xdd'), - ('\xfe', '\xde'), ('\xff', '\u0178'), - ('\u0101', '\u0100'), ('\u0103', '\u0102'), - ('\u0105', '\u0104'), ('\u0107', '\u0106'), - ('\u0109', '\u0108'), ('\u010b', '\u010a'), - ('\u010d', '\u010c'), ('\u010f', '\u010e'), - ('\u0111', '\u0110'), ('\u0113', '\u0112'), - ('\u0115', '\u0114'), ('\u0117', '\u0116'), - ('\u0119', '\u0118'), ('\u011b', '\u011a'), - ('\u011d', '\u011c'), ('\u011f', '\u011e'), - ('\u0121', '\u0120'), ('\u0123', '\u0122'), - ('\u0125', '\u0124'), ('\u0127', '\u0126'), - ('\u0129', '\u0128'), ('\u012b', '\u012a'), - ('\u012d', '\u012c'), ('\u012f', '\u012e'), - ('\u0131', '\x49'), ('\u0133', '\u0132'), - ('\u0135', '\u0134'), ('\u0137', '\u0136'), - ('\u013a', '\u0139'), ('\u013c', '\u013b'), - ('\u013e', '\u013d'), ('\u0140', '\u013f'), - ('\u0142', '\u0141'), ('\u0144', '\u0143'), - ('\u0146', '\u0145'), ('\u0148', '\u0147'), - ('\u014b', '\u014a'), ('\u014d', '\u014c'), - ('\u014f', '\u014e'), ('\u0151', '\u0150'), - ('\u0153', '\u0152'), ('\u0155', '\u0154'), - ('\u0157', '\u0156'), ('\u0159', '\u0158'), - ('\u015b', '\u015a'), ('\u015d', '\u015c'), - ('\u015f', '\u015e'), ('\u0161', '\u0160'), - ('\u0163', '\u0162'), ('\u0165', '\u0164'), - ('\u0167', '\u0166'), ('\u0169', '\u0168'), - ('\u016b', '\u016a'), ('\u016d', '\u016c'), - ('\u016f', '\u016e'), ('\u0171', '\u0170'), - ('\u0173', '\u0172'), ('\u0175', '\u0174'), - ('\u0177', '\u0176'), ('\u017a', '\u0179'), - ('\u017c', '\u017b'), ('\u017e', '\u017d'), - ('\u017f', '\x53'), ('\u0180', '\u0243'), - ('\u0183', '\u0182'), ('\u0185', '\u0184'), - ('\u0188', '\u0187'), ('\u018c', '\u018b'), - ('\u0192', '\u0191'), ('\u0195', '\u01f6'), - ('\u0199', '\u0198'), ('\u019a', '\u023d'), - ('\u019e', '\u0220'), ('\u01a1', '\u01a0'), - ('\u01a3', '\u01a2'), ('\u01a5', '\u01a4'), - ('\u01a8', '\u01a7'), ('\u01ad', '\u01ac'), - ('\u01b0', '\u01af'), ('\u01b4', '\u01b3'), - ('\u01b6', '\u01b5'), ('\u01b9', '\u01b8'), - ('\u01bd', '\u01bc'), ('\u01bf', '\u01f7'), - ('\u01c6', '\u01c4'), ('\u01c9', '\u01c7'), - ('\u01cc', '\u01ca'), ('\u01ce', '\u01cd'), - ('\u01d0', '\u01cf'), ('\u01d2', '\u01d1'), - ('\u01d4', '\u01d3'), ('\u01d6', '\u01d5'), - ('\u01d8', '\u01d7'), ('\u01da', '\u01d9'), - ('\u01dc', '\u01db'), ('\u01dd', '\u018e'), - ('\u01df', '\u01de'), ('\u01e1', '\u01e0'), - ('\u01e3', '\u01e2'), ('\u01e5', '\u01e4'), - ('\u01e7', '\u01e6'), ('\u01e9', '\u01e8'), - ('\u01eb', '\u01ea'), ('\u01ed', '\u01ec'), - ('\u01ef', '\u01ee'), ('\u01f3', '\u01f1'), - ('\u01f5', '\u01f4'), ('\u01f9', '\u01f8'), - ('\u01fb', '\u01fa'), ('\u01fd', '\u01fc'), - ('\u01ff', '\u01fe'), ('\u0201', '\u0200'), - ('\u0203', '\u0202'), ('\u0205', '\u0204'), - ('\u0207', '\u0206'), ('\u0209', '\u0208'), - ('\u020b', '\u020a'), ('\u020d', '\u020c'), - ('\u020f', '\u020e'), ('\u0211', '\u0210'), - ('\u0213', '\u0212'), ('\u0215', '\u0214'), - ('\u0217', '\u0216'), ('\u0219', '\u0218'), - ('\u021b', '\u021a'), ('\u021d', '\u021c'), - ('\u021f', '\u021e'), ('\u0223', '\u0222'), - ('\u0225', '\u0224'), ('\u0227', '\u0226'), - ('\u0229', '\u0228'), ('\u022b', '\u022a'), - ('\u022d', '\u022c'), ('\u022f', '\u022e'), - ('\u0231', '\u0230'), ('\u0233', '\u0232'), - ('\u023c', '\u023b'), ('\u023f', '\u2c7e'), - ('\u0240', '\u2c7f'), ('\u0242', '\u0241'), - ('\u0247', '\u0246'), ('\u0249', '\u0248'), - ('\u024b', '\u024a'), ('\u024d', '\u024c'), - ('\u024f', '\u024e'), ('\u0250', '\u2c6f'), - ('\u0251', '\u2c6d'), ('\u0252', '\u2c70'), - ('\u0253', '\u0181'), ('\u0254', '\u0186'), - ('\u0256', '\u0189'), ('\u0257', '\u018a'), - ('\u0259', '\u018f'), ('\u025b', '\u0190'), - ('\u0260', '\u0193'), ('\u0263', '\u0194'), - ('\u0265', '\ua78d'), ('\u0266', '\ua7aa'), - ('\u0268', '\u0197'), ('\u0269', '\u0196'), - ('\u026b', '\u2c62'), ('\u026f', '\u019c'), - ('\u0271', '\u2c6e'), ('\u0272', '\u019d'), - ('\u0275', '\u019f'), ('\u027d', '\u2c64'), - ('\u0280', '\u01a6'), ('\u0283', '\u01a9'), - ('\u0288', '\u01ae'), ('\u0289', '\u0244'), - ('\u028a', '\u01b1'), ('\u028b', '\u01b2'), - ('\u028c', '\u0245'), ('\u0292', '\u01b7'), - ('\u0371', '\u0370'), ('\u0373', '\u0372'), - ('\u0377', '\u0376'), ('\u037b', '\u03fd'), - ('\u037c', '\u03fe'), ('\u037d', '\u03ff'), - ('\u03ac', '\u0386'), ('\u03ad', '\u0388'), - ('\u03ae', '\u0389'), ('\u03af', '\u038a'), - ('\u03b1', '\u0391'), ('\u03b2', '\u0392'), - ('\u03b3', '\u0393'), ('\u03b4', '\u0394'), - ('\u03b5', '\u0395'), ('\u03b6', '\u0396'), - ('\u03b7', '\u0397'), ('\u03b8', '\u0398'), - ('\u03b9', '\u0399'), ('\u03ba', '\u039a'), - ('\u03bb', '\u039b'), ('\u03bc', '\u039c'), - ('\u03bd', '\u039d'), ('\u03be', '\u039e'), - ('\u03bf', '\u039f'), ('\u03c0', '\u03a0'), - ('\u03c1', '\u03a1'), ('\u03c2', '\u03a3'), - ('\u03c3', '\u03a3'), ('\u03c4', '\u03a4'), - ('\u03c5', '\u03a5'), ('\u03c6', '\u03a6'), - ('\u03c7', '\u03a7'), ('\u03c8', '\u03a8'), - ('\u03c9', '\u03a9'), ('\u03ca', '\u03aa'), - ('\u03cb', '\u03ab'), ('\u03cc', '\u038c'), - ('\u03cd', '\u038e'), ('\u03ce', '\u038f'), - ('\u03d0', '\u0392'), ('\u03d1', '\u0398'), - ('\u03d5', '\u03a6'), ('\u03d6', '\u03a0'), - ('\u03d7', '\u03cf'), ('\u03d9', '\u03d8'), - ('\u03db', '\u03da'), ('\u03dd', '\u03dc'), - ('\u03df', '\u03de'), ('\u03e1', '\u03e0'), - ('\u03e3', '\u03e2'), ('\u03e5', '\u03e4'), - ('\u03e7', '\u03e6'), ('\u03e9', '\u03e8'), - ('\u03eb', '\u03ea'), ('\u03ed', '\u03ec'), - ('\u03ef', '\u03ee'), ('\u03f0', '\u039a'), - ('\u03f1', '\u03a1'), ('\u03f2', '\u03f9'), - ('\u03f5', '\u0395'), ('\u03f8', '\u03f7'), - ('\u03fb', '\u03fa'), ('\u0430', '\u0410'), - ('\u0431', '\u0411'), ('\u0432', '\u0412'), - ('\u0433', '\u0413'), ('\u0434', '\u0414'), - ('\u0435', '\u0415'), ('\u0436', '\u0416'), - ('\u0437', '\u0417'), ('\u0438', '\u0418'), - ('\u0439', '\u0419'), ('\u043a', '\u041a'), - ('\u043b', '\u041b'), ('\u043c', '\u041c'), - ('\u043d', '\u041d'), ('\u043e', '\u041e'), - ('\u043f', '\u041f'), ('\u0440', '\u0420'), - ('\u0441', '\u0421'), ('\u0442', '\u0422'), - ('\u0443', '\u0423'), ('\u0444', '\u0424'), - ('\u0445', '\u0425'), ('\u0446', '\u0426'), - ('\u0447', '\u0427'), ('\u0448', '\u0428'), - ('\u0449', '\u0429'), ('\u044a', '\u042a'), - ('\u044b', '\u042b'), ('\u044c', '\u042c'), - ('\u044d', '\u042d'), ('\u044e', '\u042e'), - ('\u044f', '\u042f'), ('\u0450', '\u0400'), - ('\u0451', '\u0401'), ('\u0452', '\u0402'), - ('\u0453', '\u0403'), ('\u0454', '\u0404'), - ('\u0455', '\u0405'), ('\u0456', '\u0406'), - ('\u0457', '\u0407'), ('\u0458', '\u0408'), - ('\u0459', '\u0409'), ('\u045a', '\u040a'), - ('\u045b', '\u040b'), ('\u045c', '\u040c'), - ('\u045d', '\u040d'), ('\u045e', '\u040e'), - ('\u045f', '\u040f'), ('\u0461', '\u0460'), - ('\u0463', '\u0462'), ('\u0465', '\u0464'), - ('\u0467', '\u0466'), ('\u0469', '\u0468'), - ('\u046b', '\u046a'), ('\u046d', '\u046c'), - ('\u046f', '\u046e'), ('\u0471', '\u0470'), - ('\u0473', '\u0472'), ('\u0475', '\u0474'), - ('\u0477', '\u0476'), ('\u0479', '\u0478'), - ('\u047b', '\u047a'), ('\u047d', '\u047c'), - ('\u047f', '\u047e'), ('\u0481', '\u0480'), - ('\u048b', '\u048a'), ('\u048d', '\u048c'), - ('\u048f', '\u048e'), ('\u0491', '\u0490'), - ('\u0493', '\u0492'), ('\u0495', '\u0494'), - ('\u0497', '\u0496'), ('\u0499', '\u0498'), - ('\u049b', '\u049a'), ('\u049d', '\u049c'), - ('\u049f', '\u049e'), ('\u04a1', '\u04a0'), - ('\u04a3', '\u04a2'), ('\u04a5', '\u04a4'), - ('\u04a7', '\u04a6'), ('\u04a9', '\u04a8'), - ('\u04ab', '\u04aa'), ('\u04ad', '\u04ac'), - ('\u04af', '\u04ae'), ('\u04b1', '\u04b0'), - ('\u04b3', '\u04b2'), ('\u04b5', '\u04b4'), - ('\u04b7', '\u04b6'), ('\u04b9', '\u04b8'), - ('\u04bb', '\u04ba'), ('\u04bd', '\u04bc'), - ('\u04bf', '\u04be'), ('\u04c2', '\u04c1'), - ('\u04c4', '\u04c3'), ('\u04c6', '\u04c5'), - ('\u04c8', '\u04c7'), ('\u04ca', '\u04c9'), - ('\u04cc', '\u04cb'), ('\u04ce', '\u04cd'), - ('\u04cf', '\u04c0'), ('\u04d1', '\u04d0'), - ('\u04d3', '\u04d2'), ('\u04d5', '\u04d4'), - ('\u04d7', '\u04d6'), ('\u04d9', '\u04d8'), - ('\u04db', '\u04da'), ('\u04dd', '\u04dc'), - ('\u04df', '\u04de'), ('\u04e1', '\u04e0'), - ('\u04e3', '\u04e2'), ('\u04e5', '\u04e4'), - ('\u04e7', '\u04e6'), ('\u04e9', '\u04e8'), - ('\u04eb', '\u04ea'), ('\u04ed', '\u04ec'), - ('\u04ef', '\u04ee'), ('\u04f1', '\u04f0'), - ('\u04f3', '\u04f2'), ('\u04f5', '\u04f4'), - ('\u04f7', '\u04f6'), ('\u04f9', '\u04f8'), - ('\u04fb', '\u04fa'), ('\u04fd', '\u04fc'), - ('\u04ff', '\u04fe'), ('\u0501', '\u0500'), - ('\u0503', '\u0502'), ('\u0505', '\u0504'), - ('\u0507', '\u0506'), ('\u0509', '\u0508'), - ('\u050b', '\u050a'), ('\u050d', '\u050c'), - ('\u050f', '\u050e'), ('\u0511', '\u0510'), - ('\u0513', '\u0512'), ('\u0515', '\u0514'), - ('\u0517', '\u0516'), ('\u0519', '\u0518'), - ('\u051b', '\u051a'), ('\u051d', '\u051c'), - ('\u051f', '\u051e'), ('\u0521', '\u0520'), - ('\u0523', '\u0522'), ('\u0525', '\u0524'), - ('\u0527', '\u0526'), ('\u0561', '\u0531'), - ('\u0562', '\u0532'), ('\u0563', '\u0533'), - ('\u0564', '\u0534'), ('\u0565', '\u0535'), - ('\u0566', '\u0536'), ('\u0567', '\u0537'), - ('\u0568', '\u0538'), ('\u0569', '\u0539'), - ('\u056a', '\u053a'), ('\u056b', '\u053b'), - ('\u056c', '\u053c'), ('\u056d', '\u053d'), - ('\u056e', '\u053e'), ('\u056f', '\u053f'), - ('\u0570', '\u0540'), ('\u0571', '\u0541'), - ('\u0572', '\u0542'), ('\u0573', '\u0543'), - ('\u0574', '\u0544'), ('\u0575', '\u0545'), - ('\u0576', '\u0546'), ('\u0577', '\u0547'), - ('\u0578', '\u0548'), ('\u0579', '\u0549'), - ('\u057a', '\u054a'), ('\u057b', '\u054b'), - ('\u057c', '\u054c'), ('\u057d', '\u054d'), - ('\u057e', '\u054e'), ('\u057f', '\u054f'), - ('\u0580', '\u0550'), ('\u0581', '\u0551'), - ('\u0582', '\u0552'), ('\u0583', '\u0553'), - ('\u0584', '\u0554'), ('\u0585', '\u0555'), - ('\u0586', '\u0556'), ('\u1d79', '\ua77d'), - ('\u1d7d', '\u2c63'), ('\u1e01', '\u1e00'), - ('\u1e03', '\u1e02'), ('\u1e05', '\u1e04'), - ('\u1e07', '\u1e06'), ('\u1e09', '\u1e08'), - ('\u1e0b', '\u1e0a'), ('\u1e0d', '\u1e0c'), - ('\u1e0f', '\u1e0e'), ('\u1e11', '\u1e10'), - ('\u1e13', '\u1e12'), ('\u1e15', '\u1e14'), - ('\u1e17', '\u1e16'), ('\u1e19', '\u1e18'), - ('\u1e1b', '\u1e1a'), ('\u1e1d', '\u1e1c'), - ('\u1e1f', '\u1e1e'), ('\u1e21', '\u1e20'), - ('\u1e23', '\u1e22'), ('\u1e25', '\u1e24'), - ('\u1e27', '\u1e26'), ('\u1e29', '\u1e28'), - ('\u1e2b', '\u1e2a'), ('\u1e2d', '\u1e2c'), - ('\u1e2f', '\u1e2e'), ('\u1e31', '\u1e30'), - ('\u1e33', '\u1e32'), ('\u1e35', '\u1e34'), - ('\u1e37', '\u1e36'), ('\u1e39', '\u1e38'), - ('\u1e3b', '\u1e3a'), ('\u1e3d', '\u1e3c'), - ('\u1e3f', '\u1e3e'), ('\u1e41', '\u1e40'), - ('\u1e43', '\u1e42'), ('\u1e45', '\u1e44'), - ('\u1e47', '\u1e46'), ('\u1e49', '\u1e48'), - ('\u1e4b', '\u1e4a'), ('\u1e4d', '\u1e4c'), - ('\u1e4f', '\u1e4e'), ('\u1e51', '\u1e50'), - ('\u1e53', '\u1e52'), ('\u1e55', '\u1e54'), - ('\u1e57', '\u1e56'), ('\u1e59', '\u1e58'), - ('\u1e5b', '\u1e5a'), ('\u1e5d', '\u1e5c'), - ('\u1e5f', '\u1e5e'), ('\u1e61', '\u1e60'), - ('\u1e63', '\u1e62'), ('\u1e65', '\u1e64'), - ('\u1e67', '\u1e66'), ('\u1e69', '\u1e68'), - ('\u1e6b', '\u1e6a'), ('\u1e6d', '\u1e6c'), - ('\u1e6f', '\u1e6e'), ('\u1e71', '\u1e70'), - ('\u1e73', '\u1e72'), ('\u1e75', '\u1e74'), - ('\u1e77', '\u1e76'), ('\u1e79', '\u1e78'), - ('\u1e7b', '\u1e7a'), ('\u1e7d', '\u1e7c'), - ('\u1e7f', '\u1e7e'), ('\u1e81', '\u1e80'), - ('\u1e83', '\u1e82'), ('\u1e85', '\u1e84'), - ('\u1e87', '\u1e86'), ('\u1e89', '\u1e88'), - ('\u1e8b', '\u1e8a'), ('\u1e8d', '\u1e8c'), - ('\u1e8f', '\u1e8e'), ('\u1e91', '\u1e90'), - ('\u1e93', '\u1e92'), ('\u1e95', '\u1e94'), - ('\u1e9b', '\u1e60'), ('\u1ea1', '\u1ea0'), - ('\u1ea3', '\u1ea2'), ('\u1ea5', '\u1ea4'), - ('\u1ea7', '\u1ea6'), ('\u1ea9', '\u1ea8'), - ('\u1eab', '\u1eaa'), ('\u1ead', '\u1eac'), - ('\u1eaf', '\u1eae'), ('\u1eb1', '\u1eb0'), - ('\u1eb3', '\u1eb2'), ('\u1eb5', '\u1eb4'), - ('\u1eb7', '\u1eb6'), ('\u1eb9', '\u1eb8'), - ('\u1ebb', '\u1eba'), ('\u1ebd', '\u1ebc'), - ('\u1ebf', '\u1ebe'), ('\u1ec1', '\u1ec0'), - ('\u1ec3', '\u1ec2'), ('\u1ec5', '\u1ec4'), - ('\u1ec7', '\u1ec6'), ('\u1ec9', '\u1ec8'), - ('\u1ecb', '\u1eca'), ('\u1ecd', '\u1ecc'), - ('\u1ecf', '\u1ece'), ('\u1ed1', '\u1ed0'), - ('\u1ed3', '\u1ed2'), ('\u1ed5', '\u1ed4'), - ('\u1ed7', '\u1ed6'), ('\u1ed9', '\u1ed8'), - ('\u1edb', '\u1eda'), ('\u1edd', '\u1edc'), - ('\u1edf', '\u1ede'), ('\u1ee1', '\u1ee0'), - ('\u1ee3', '\u1ee2'), ('\u1ee5', '\u1ee4'), - ('\u1ee7', '\u1ee6'), ('\u1ee9', '\u1ee8'), - ('\u1eeb', '\u1eea'), ('\u1eed', '\u1eec'), - ('\u1eef', '\u1eee'), ('\u1ef1', '\u1ef0'), - ('\u1ef3', '\u1ef2'), ('\u1ef5', '\u1ef4'), - ('\u1ef7', '\u1ef6'), ('\u1ef9', '\u1ef8'), - ('\u1efb', '\u1efa'), ('\u1efd', '\u1efc'), - ('\u1eff', '\u1efe'), ('\u1f00', '\u1f08'), - ('\u1f01', '\u1f09'), ('\u1f02', '\u1f0a'), - ('\u1f03', '\u1f0b'), ('\u1f04', '\u1f0c'), - ('\u1f05', '\u1f0d'), ('\u1f06', '\u1f0e'), - ('\u1f07', '\u1f0f'), ('\u1f10', '\u1f18'), - ('\u1f11', '\u1f19'), ('\u1f12', '\u1f1a'), - ('\u1f13', '\u1f1b'), ('\u1f14', '\u1f1c'), - ('\u1f15', '\u1f1d'), ('\u1f20', '\u1f28'), - ('\u1f21', '\u1f29'), ('\u1f22', '\u1f2a'), - ('\u1f23', '\u1f2b'), ('\u1f24', '\u1f2c'), - ('\u1f25', '\u1f2d'), ('\u1f26', '\u1f2e'), - ('\u1f27', '\u1f2f'), ('\u1f30', '\u1f38'), - ('\u1f31', '\u1f39'), ('\u1f32', '\u1f3a'), - ('\u1f33', '\u1f3b'), ('\u1f34', '\u1f3c'), - ('\u1f35', '\u1f3d'), ('\u1f36', '\u1f3e'), - ('\u1f37', '\u1f3f'), ('\u1f40', '\u1f48'), - ('\u1f41', '\u1f49'), ('\u1f42', '\u1f4a'), - ('\u1f43', '\u1f4b'), ('\u1f44', '\u1f4c'), - ('\u1f45', '\u1f4d'), ('\u1f51', '\u1f59'), - ('\u1f53', '\u1f5b'), ('\u1f55', '\u1f5d'), - ('\u1f57', '\u1f5f'), ('\u1f60', '\u1f68'), - ('\u1f61', '\u1f69'), ('\u1f62', '\u1f6a'), - ('\u1f63', '\u1f6b'), ('\u1f64', '\u1f6c'), - ('\u1f65', '\u1f6d'), ('\u1f66', '\u1f6e'), - ('\u1f67', '\u1f6f'), ('\u1f70', '\u1fba'), - ('\u1f71', '\u1fbb'), ('\u1f72', '\u1fc8'), - ('\u1f73', '\u1fc9'), ('\u1f74', '\u1fca'), - ('\u1f75', '\u1fcb'), ('\u1f76', '\u1fda'), - ('\u1f77', '\u1fdb'), ('\u1f78', '\u1ff8'), - ('\u1f79', '\u1ff9'), ('\u1f7a', '\u1fea'), - ('\u1f7b', '\u1feb'), ('\u1f7c', '\u1ffa'), - ('\u1f7d', '\u1ffb'), ('\u1f80', '\u1f88'), - ('\u1f81', '\u1f89'), ('\u1f82', '\u1f8a'), - ('\u1f83', '\u1f8b'), ('\u1f84', '\u1f8c'), - ('\u1f85', '\u1f8d'), ('\u1f86', '\u1f8e'), - ('\u1f87', '\u1f8f'), ('\u1f90', '\u1f98'), - ('\u1f91', '\u1f99'), ('\u1f92', '\u1f9a'), - ('\u1f93', '\u1f9b'), ('\u1f94', '\u1f9c'), - ('\u1f95', '\u1f9d'), ('\u1f96', '\u1f9e'), - ('\u1f97', '\u1f9f'), ('\u1fa0', '\u1fa8'), - ('\u1fa1', '\u1fa9'), ('\u1fa2', '\u1faa'), - ('\u1fa3', '\u1fab'), ('\u1fa4', '\u1fac'), - ('\u1fa5', '\u1fad'), ('\u1fa6', '\u1fae'), - ('\u1fa7', '\u1faf'), ('\u1fb0', '\u1fb8'), - ('\u1fb1', '\u1fb9'), ('\u1fb3', '\u1fbc'), - ('\u1fbe', '\u0399'), ('\u1fc3', '\u1fcc'), - ('\u1fd0', '\u1fd8'), ('\u1fd1', '\u1fd9'), - ('\u1fe0', '\u1fe8'), ('\u1fe1', '\u1fe9'), - ('\u1fe5', '\u1fec'), ('\u1ff3', '\u1ffc'), - ('\u214e', '\u2132'), ('\u2184', '\u2183'), - ('\u2c30', '\u2c00'), ('\u2c31', '\u2c01'), - ('\u2c32', '\u2c02'), ('\u2c33', '\u2c03'), - ('\u2c34', '\u2c04'), ('\u2c35', '\u2c05'), - ('\u2c36', '\u2c06'), ('\u2c37', '\u2c07'), - ('\u2c38', '\u2c08'), ('\u2c39', '\u2c09'), - ('\u2c3a', '\u2c0a'), ('\u2c3b', '\u2c0b'), - ('\u2c3c', '\u2c0c'), ('\u2c3d', '\u2c0d'), - ('\u2c3e', '\u2c0e'), ('\u2c3f', '\u2c0f'), - ('\u2c40', '\u2c10'), ('\u2c41', '\u2c11'), - ('\u2c42', '\u2c12'), ('\u2c43', '\u2c13'), - ('\u2c44', '\u2c14'), ('\u2c45', '\u2c15'), - ('\u2c46', '\u2c16'), ('\u2c47', '\u2c17'), - ('\u2c48', '\u2c18'), ('\u2c49', '\u2c19'), - ('\u2c4a', '\u2c1a'), ('\u2c4b', '\u2c1b'), - ('\u2c4c', '\u2c1c'), ('\u2c4d', '\u2c1d'), - ('\u2c4e', '\u2c1e'), ('\u2c4f', '\u2c1f'), - ('\u2c50', '\u2c20'), ('\u2c51', '\u2c21'), - ('\u2c52', '\u2c22'), ('\u2c53', '\u2c23'), - ('\u2c54', '\u2c24'), ('\u2c55', '\u2c25'), - ('\u2c56', '\u2c26'), ('\u2c57', '\u2c27'), - ('\u2c58', '\u2c28'), ('\u2c59', '\u2c29'), - ('\u2c5a', '\u2c2a'), ('\u2c5b', '\u2c2b'), - ('\u2c5c', '\u2c2c'), ('\u2c5d', '\u2c2d'), - ('\u2c5e', '\u2c2e'), ('\u2c61', '\u2c60'), - ('\u2c65', '\u023a'), ('\u2c66', '\u023e'), - ('\u2c68', '\u2c67'), ('\u2c6a', '\u2c69'), - ('\u2c6c', '\u2c6b'), ('\u2c73', '\u2c72'), - ('\u2c76', '\u2c75'), ('\u2c81', '\u2c80'), - ('\u2c83', '\u2c82'), ('\u2c85', '\u2c84'), - ('\u2c87', '\u2c86'), ('\u2c89', '\u2c88'), - ('\u2c8b', '\u2c8a'), ('\u2c8d', '\u2c8c'), - ('\u2c8f', '\u2c8e'), ('\u2c91', '\u2c90'), - ('\u2c93', '\u2c92'), ('\u2c95', '\u2c94'), - ('\u2c97', '\u2c96'), ('\u2c99', '\u2c98'), - ('\u2c9b', '\u2c9a'), ('\u2c9d', '\u2c9c'), - ('\u2c9f', '\u2c9e'), ('\u2ca1', '\u2ca0'), - ('\u2ca3', '\u2ca2'), ('\u2ca5', '\u2ca4'), - ('\u2ca7', '\u2ca6'), ('\u2ca9', '\u2ca8'), - ('\u2cab', '\u2caa'), ('\u2cad', '\u2cac'), - ('\u2caf', '\u2cae'), ('\u2cb1', '\u2cb0'), - ('\u2cb3', '\u2cb2'), ('\u2cb5', '\u2cb4'), - ('\u2cb7', '\u2cb6'), ('\u2cb9', '\u2cb8'), - ('\u2cbb', '\u2cba'), ('\u2cbd', '\u2cbc'), - ('\u2cbf', '\u2cbe'), ('\u2cc1', '\u2cc0'), - ('\u2cc3', '\u2cc2'), ('\u2cc5', '\u2cc4'), - ('\u2cc7', '\u2cc6'), ('\u2cc9', '\u2cc8'), - ('\u2ccb', '\u2cca'), ('\u2ccd', '\u2ccc'), - ('\u2ccf', '\u2cce'), ('\u2cd1', '\u2cd0'), - ('\u2cd3', '\u2cd2'), ('\u2cd5', '\u2cd4'), - ('\u2cd7', '\u2cd6'), ('\u2cd9', '\u2cd8'), - ('\u2cdb', '\u2cda'), ('\u2cdd', '\u2cdc'), - ('\u2cdf', '\u2cde'), ('\u2ce1', '\u2ce0'), - ('\u2ce3', '\u2ce2'), ('\u2cec', '\u2ceb'), - ('\u2cee', '\u2ced'), ('\u2cf3', '\u2cf2'), - ('\u2d00', '\u10a0'), ('\u2d01', '\u10a1'), - ('\u2d02', '\u10a2'), ('\u2d03', '\u10a3'), - ('\u2d04', '\u10a4'), ('\u2d05', '\u10a5'), - ('\u2d06', '\u10a6'), ('\u2d07', '\u10a7'), - ('\u2d08', '\u10a8'), ('\u2d09', '\u10a9'), - ('\u2d0a', '\u10aa'), ('\u2d0b', '\u10ab'), - ('\u2d0c', '\u10ac'), ('\u2d0d', '\u10ad'), - ('\u2d0e', '\u10ae'), ('\u2d0f', '\u10af'), - ('\u2d10', '\u10b0'), ('\u2d11', '\u10b1'), - ('\u2d12', '\u10b2'), ('\u2d13', '\u10b3'), - ('\u2d14', '\u10b4'), ('\u2d15', '\u10b5'), - ('\u2d16', '\u10b6'), ('\u2d17', '\u10b7'), - ('\u2d18', '\u10b8'), ('\u2d19', '\u10b9'), - ('\u2d1a', '\u10ba'), ('\u2d1b', '\u10bb'), - ('\u2d1c', '\u10bc'), ('\u2d1d', '\u10bd'), - ('\u2d1e', '\u10be'), ('\u2d1f', '\u10bf'), - ('\u2d20', '\u10c0'), ('\u2d21', '\u10c1'), - ('\u2d22', '\u10c2'), ('\u2d23', '\u10c3'), - ('\u2d24', '\u10c4'), ('\u2d25', '\u10c5'), - ('\u2d27', '\u10c7'), ('\u2d2d', '\u10cd'), - ('\ua641', '\ua640'), ('\ua643', '\ua642'), - ('\ua645', '\ua644'), ('\ua647', '\ua646'), - ('\ua649', '\ua648'), ('\ua64b', '\ua64a'), - ('\ua64d', '\ua64c'), ('\ua64f', '\ua64e'), - ('\ua651', '\ua650'), ('\ua653', '\ua652'), - ('\ua655', '\ua654'), ('\ua657', '\ua656'), - ('\ua659', '\ua658'), ('\ua65b', '\ua65a'), - ('\ua65d', '\ua65c'), ('\ua65f', '\ua65e'), - ('\ua661', '\ua660'), ('\ua663', '\ua662'), - ('\ua665', '\ua664'), ('\ua667', '\ua666'), - ('\ua669', '\ua668'), ('\ua66b', '\ua66a'), - ('\ua66d', '\ua66c'), ('\ua681', '\ua680'), - ('\ua683', '\ua682'), ('\ua685', '\ua684'), - ('\ua687', '\ua686'), ('\ua689', '\ua688'), - ('\ua68b', '\ua68a'), ('\ua68d', '\ua68c'), - ('\ua68f', '\ua68e'), ('\ua691', '\ua690'), - ('\ua693', '\ua692'), ('\ua695', '\ua694'), - ('\ua697', '\ua696'), ('\ua723', '\ua722'), - ('\ua725', '\ua724'), ('\ua727', '\ua726'), - ('\ua729', '\ua728'), ('\ua72b', '\ua72a'), - ('\ua72d', '\ua72c'), ('\ua72f', '\ua72e'), - ('\ua733', '\ua732'), ('\ua735', '\ua734'), - ('\ua737', '\ua736'), ('\ua739', '\ua738'), - ('\ua73b', '\ua73a'), ('\ua73d', '\ua73c'), - ('\ua73f', '\ua73e'), ('\ua741', '\ua740'), - ('\ua743', '\ua742'), ('\ua745', '\ua744'), - ('\ua747', '\ua746'), ('\ua749', '\ua748'), - ('\ua74b', '\ua74a'), ('\ua74d', '\ua74c'), - ('\ua74f', '\ua74e'), ('\ua751', '\ua750'), - ('\ua753', '\ua752'), ('\ua755', '\ua754'), - ('\ua757', '\ua756'), ('\ua759', '\ua758'), - ('\ua75b', '\ua75a'), ('\ua75d', '\ua75c'), - ('\ua75f', '\ua75e'), ('\ua761', '\ua760'), - ('\ua763', '\ua762'), ('\ua765', '\ua764'), - ('\ua767', '\ua766'), ('\ua769', '\ua768'), - ('\ua76b', '\ua76a'), ('\ua76d', '\ua76c'), - ('\ua76f', '\ua76e'), ('\ua77a', '\ua779'), - ('\ua77c', '\ua77b'), ('\ua77f', '\ua77e'), - ('\ua781', '\ua780'), ('\ua783', '\ua782'), - ('\ua785', '\ua784'), ('\ua787', '\ua786'), - ('\ua78c', '\ua78b'), ('\ua791', '\ua790'), - ('\ua793', '\ua792'), ('\ua7a1', '\ua7a0'), - ('\ua7a3', '\ua7a2'), ('\ua7a5', '\ua7a4'), - ('\ua7a7', '\ua7a6'), ('\ua7a9', '\ua7a8'), - ('\uff41', '\uff21'), ('\uff42', '\uff22'), - ('\uff43', '\uff23'), ('\uff44', '\uff24'), - ('\uff45', '\uff25'), ('\uff46', '\uff26'), - ('\uff47', '\uff27'), ('\uff48', '\uff28'), - ('\uff49', '\uff29'), ('\uff4a', '\uff2a'), - ('\uff4b', '\uff2b'), ('\uff4c', '\uff2c'), - ('\uff4d', '\uff2d'), ('\uff4e', '\uff2e'), - ('\uff4f', '\uff2f'), ('\uff50', '\uff30'), - ('\uff51', '\uff31'), ('\uff52', '\uff32'), - ('\uff53', '\uff33'), ('\uff54', '\uff34'), - ('\uff55', '\uff35'), ('\uff56', '\uff36'), - ('\uff57', '\uff37'), ('\uff58', '\uff38'), - ('\uff59', '\uff39'), ('\uff5a', '\uff3a'), - ('\U00010428', '\U00010400'), ('\U00010429', '\U00010401'), - ('\U0001042a', '\U00010402'), ('\U0001042b', '\U00010403'), - ('\U0001042c', '\U00010404'), ('\U0001042d', '\U00010405'), - ('\U0001042e', '\U00010406'), ('\U0001042f', '\U00010407'), - ('\U00010430', '\U00010408'), ('\U00010431', '\U00010409'), - ('\U00010432', '\U0001040a'), ('\U00010433', '\U0001040b'), - ('\U00010434', '\U0001040c'), ('\U00010435', '\U0001040d'), - ('\U00010436', '\U0001040e'), ('\U00010437', '\U0001040f'), - ('\U00010438', '\U00010410'), ('\U00010439', '\U00010411'), - ('\U0001043a', '\U00010412'), ('\U0001043b', '\U00010413'), - ('\U0001043c', '\U00010414'), ('\U0001043d', '\U00010415'), - ('\U0001043e', '\U00010416'), ('\U0001043f', '\U00010417'), - ('\U00010440', '\U00010418'), ('\U00010441', '\U00010419'), - ('\U00010442', '\U0001041a'), ('\U00010443', '\U0001041b'), - ('\U00010444', '\U0001041c'), ('\U00010445', '\U0001041d'), - ('\U00010446', '\U0001041e'), ('\U00010447', '\U0001041f'), - ('\U00010448', '\U00010420'), ('\U00010449', '\U00010421'), - ('\U0001044a', '\U00010422'), ('\U0001044b', '\U00010423'), - ('\U0001044c', '\U00010424'), ('\U0001044d', '\U00010425'), - ('\U0001044e', '\U00010426'), ('\U0001044f', '\U00010427') - ]; - } diff --git a/src/libstd/unstable/mod.rs b/src/libstd/unstable/mod.rs index 372fcc396b1..8b07850263f 100644 --- a/src/libstd/unstable/mod.rs +++ b/src/libstd/unstable/mod.rs @@ -10,12 +10,13 @@ #![doc(hidden)] -use prelude::*; use libc::uintptr_t; +use kinds::Send; + +pub use core::finally; pub mod dynamic_lib; -pub mod finally; pub mod simd; pub mod sync; pub mod mutex; diff --git a/src/libstd/vec.rs b/src/libstd/vec.rs index f0f126bcf16..af146b96e50 100644 --- a/src/libstd/vec.rs +++ b/src/libstd/vec.rs @@ -23,13 +23,14 @@ use mem; use num; use num::{CheckedMul, CheckedAdd}; use ops::Drop; -use option::{None, Option, Some}; +use option::{None, Option, Some, Expect}; use ptr::RawPtr; use ptr; use rt::global_heap::{malloc_raw, realloc_raw}; use raw::Slice; use slice::{ImmutableEqVector, ImmutableVector, Items, MutItems, MutableVector}; use slice::{MutableTotalOrdVector, OwnedVector, Vector}; +use slice::{MutableVectorAllocating}; /// An owned, growable vector. /// diff --git a/src/libsyntax/util/interner.rs b/src/libsyntax/util/interner.rs index b7932da8738..d705da7b72b 100644 --- a/src/libsyntax/util/interner.rs +++ b/src/libsyntax/util/interner.rs @@ -109,11 +109,6 @@ impl Str for RcStr { let s: &'a str = *self.string; s } - - #[inline] - fn into_owned(self) -> ~str { - self.string.to_owned() - } } impl fmt::Show for RcStr { diff --git a/src/snapshots.txt b/src/snapshots.txt index 2f0092f48f5..3dbbf47d56b 100644 --- a/src/snapshots.txt +++ b/src/snapshots.txt @@ -1,3 +1,11 @@ +S 2014-05-06 24f6f26 + freebsd-x86_64 cebcfcece5676c9aea30241bf13c517ffdb37b7c + linux-i386 e9960c7c793ff7ae87c9d30c88cfedf7e40345f7 + linux-x86_64 120f63393bf9071b1424dc5e6e55eb3db4fa7c8d + macos-i386 1973f342f19d346a7ae1e2e6079e8335edbcebe3 + macos-x86_64 7b3dc30a2c28b546751593d5e34301fb314258c0 + winnt-i386 1c7898079cece7d5fbc98566f6826d270a3111f5 + S 2014-05-04 922c420 freebsd-x86_64 635f28dd48340db0c1cdc01adad18866acfc7020 linux-i386 360a40acf713e6f2d7fcde0112ae87d8336f320c diff --git a/src/test/compile-fail/drop-on-non-struct.rs b/src/test/compile-fail/drop-on-non-struct.rs index 1ce6cf55ac3..ac6e35d0b26 100644 --- a/src/test/compile-fail/drop-on-non-struct.rs +++ b/src/test/compile-fail/drop-on-non-struct.rs @@ -13,7 +13,7 @@ type Foo = Vec; -impl Drop for Foo { //~ ERROR conflicting implementations +impl Drop for Foo { //~^ ERROR cannot provide an extension implementation //~^^ ERROR multiple applicable methods fn drop(&mut self) { diff --git a/src/test/compile-fail/fully-qualified-type-name1.rs b/src/test/compile-fail/fully-qualified-type-name1.rs index dd9833ad41f..c5e7fc82cc9 100644 --- a/src/test/compile-fail/fully-qualified-type-name1.rs +++ b/src/test/compile-fail/fully-qualified-type-name1.rs @@ -13,5 +13,5 @@ fn main() { let x: Option; x = 5; - //~^ ERROR mismatched types: expected `std::option::Option` + //~^ ERROR mismatched types: expected `core::option::Option` } diff --git a/src/test/compile-fail/fully-qualified-type-name4.rs b/src/test/compile-fail/fully-qualified-type-name4.rs index 6e7ba16ac0b..768ae6353d2 100644 --- a/src/test/compile-fail/fully-qualified-type-name4.rs +++ b/src/test/compile-fail/fully-qualified-type-name4.rs @@ -14,7 +14,7 @@ use std::option::Option; fn bar(x: uint) -> Option { return x; - //~^ ERROR mismatched types: expected `std::option::Option` + //~^ ERROR mismatched types: expected `core::option::Option` } fn main() { diff --git a/src/test/compile-fail/issue-13466.rs b/src/test/compile-fail/issue-13466.rs index e4621495f47..44a52148e5b 100644 --- a/src/test/compile-fail/issue-13466.rs +++ b/src/test/compile-fail/issue-13466.rs @@ -16,7 +16,7 @@ pub fn main() { // tricked into looking up a non-existing second type parameter. let _x: uint = match Some(1u) { //~^ ERROR mismatched types: expected `uint` but found `` - Ok(u) => u, //~ ERROR mismatched types: expected `std::option::Option` - Err(e) => fail!(e) //~ ERROR mismatched types: expected `std::option::Option` + Ok(u) => u, //~ ERROR mismatched types: expected `core::option::Option` + Err(e) => fail!(e) //~ ERROR mismatched types: expected `core::option::Option` }; } diff --git a/src/test/compile-fail/issue-3680.rs b/src/test/compile-fail/issue-3680.rs index f6b5be349d0..02c619f5f36 100644 --- a/src/test/compile-fail/issue-3680.rs +++ b/src/test/compile-fail/issue-3680.rs @@ -11,7 +11,7 @@ fn main() { match None { Err(_) => () - //~^ ERROR mismatched types: expected `std::option::Option<>` - // but found `std::result::Result<,>` + //~^ ERROR mismatched types: expected `core::option::Option<>` + // but found `core::result::Result<,>` } } diff --git a/src/test/compile-fail/map-types.rs b/src/test/compile-fail/map-types.rs index eda4deba752..b59011b5880 100644 --- a/src/test/compile-fail/map-types.rs +++ b/src/test/compile-fail/map-types.rs @@ -18,6 +18,6 @@ fn main() { let x: Box> = box HashMap::new(); let x: Box> = x; let y: Box> = box x; - //~^ ERROR failed to find an implementation of trait std::container::Map - // for ~std::container::Map<~str,~str>:Send + //~^ ERROR failed to find an implementation of trait core::container::Map + // for ~core::container::Map<~str,~str>:Send } diff --git a/src/test/compile-fail/noexporttypeexe.rs b/src/test/compile-fail/noexporttypeexe.rs index 7091995fa77..508fec069c1 100644 --- a/src/test/compile-fail/noexporttypeexe.rs +++ b/src/test/compile-fail/noexporttypeexe.rs @@ -18,5 +18,5 @@ fn main() { // because the def_id associated with the type was // not convertible to a path. let x: int = noexporttypelib::foo(); - //~^ ERROR expected `int` but found `std::option::Option` + //~^ ERROR expected `int` but found `core::option::Option` }