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;
21
22#[allow(unreachable_pub)]
23pub mod unicode_data;
24
25/// The version of [Unicode](https://www.unicode.org/) that the Unicode parts of
26/// `char` and `str` methods are based on.
27///
28/// New versions of Unicode are released regularly and subsequently all methods
29/// in the standard library depending on Unicode are updated. Therefore the
30/// behavior of some `char` and `str` methods and the value of this constant
31/// changes over time, within the boundaries of Unicode's [stability policies].
32/// This is *not* considered to be a breaking change.
33///
34/// [stability policies]: https://www.unicode.org/policies/stability_policy.html
35///
36/// The version numbering scheme is explained in
37/// [Section 3.1 (Version Numbering)] of the Unicode Standard.
38///
39/// [Section 3.1 (Version Numbering)]: https://www.unicode.org/versions/latest/core-spec/chapter-3/#G49512
40pub const UNICODE_VERSION: (u8, u8, u8) = unicode_data::UNICODE_VERSION;