Skip to main content

core/unicode/
mod.rs

1//! Unicode internals used in liballoc and libstd. Not public API.
2#![unstable(feature = "unicode_internals", issue = "none")]
3#![doc(hidden)]
4
5// for use in alloc, not re-exported in std.
6#[rustfmt::skip]
7pub use unicode_data::conversions;
8
9#[rustfmt::skip]
10pub(crate) use unicode_data::alphabetic::lookup as Alphabetic;
11pub(crate) use unicode_data::case_ignorable::lookup as Case_Ignorable;
12pub(crate) use unicode_data::cf::lookup as Cf;
13pub(crate) use unicode_data::cn_planes_0_3::lookup as Cn_planes_0_3;
14pub(crate) use unicode_data::default_ignorable_code_point::lookup as Default_Ignorable_Code_Point;
15pub(crate) use unicode_data::grapheme_extend::lookup as Grapheme_Extend;
16pub(crate) use unicode_data::lowercase::lookup as Lowercase;
17pub(crate) use unicode_data::lt::lookup as Lt;
18pub(crate) use unicode_data::n::lookup as N;
19pub(crate) use unicode_data::uppercase::lookup as Uppercase;
20pub(crate) use unicode_data::white_space::lookup as White_Space;
21pub(crate) use unicode_data::xid_continue::lookup as XID_Continue;
22pub(crate) use unicode_data::xid_start::lookup as XID_Start;
23
24#[allow(unreachable_pub)]
25pub mod unicode_data;
26
27/// The version of [Unicode](https://www.unicode.org/) that the Unicode parts of
28/// `char` and `str` methods are based on.
29///
30/// New versions of Unicode are released regularly and subsequently all methods
31/// in the standard library depending on Unicode are updated. Therefore the
32/// behavior of some `char` and `str` methods and the value of this constant
33/// changes over time, within the boundaries of Unicode's [stability policies].
34/// This is *not* considered to be a breaking change.
35///
36/// [stability policies]: https://www.unicode.org/policies/stability_policy.html
37///
38/// The version numbering scheme is explained in
39/// [Section 3.1 (Version Numbering)] of the Unicode Standard.
40///
41/// [Section 3.1 (Version Numbering)]: https://www.unicode.org/versions/latest/core-spec/chapter-3/#G49512
42pub const UNICODE_VERSION: (u8, u8, u8) = unicode_data::UNICODE_VERSION;