/rust/librustc_unicode/lib.rs

https://gitlab.com/aw1231/redox · Rust · 59 lines · 31 code · 6 blank · 22 comment · 0 complexity · e2364867f2bdca0223a0562da69b8c00 MD5 · raw file

  1. // Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
  2. // file at the top-level directory of this distribution and at
  3. // http://rust-lang.org/COPYRIGHT.
  4. //
  5. // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
  6. // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
  7. // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
  8. // option. This file may not be copied, modified, or distributed
  9. // except according to those terms.
  10. //! # The Unicode Library
  11. //!
  12. //! Unicode-intensive functions for `char` and `str` types.
  13. //!
  14. //! This crate provides a collection of Unicode-related functionality,
  15. //! including decompositions, conversions, etc., and provides traits
  16. //! implementing these functions for the `char` and `str` types.
  17. //!
  18. //! The functionality included here is only that which is necessary to
  19. //! provide for basic string-related manipulations. This crate does not
  20. //! (yet) aim to provide a full set of Unicode tables.
  21. // Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
  22. #![cfg_attr(stage0, feature(custom_attribute))]
  23. #![crate_name = "rustc_unicode"]
  24. #![unstable(feature = "unicode", issue = "27783")]
  25. #![staged_api]
  26. #![crate_type = "rlib"]
  27. #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
  28. html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
  29. html_root_url = "https://doc.rust-lang.org/nightly/",
  30. html_playground_url = "https://play.rust-lang.org/",
  31. issue_tracker_base_url = "https://github.com/rust-lang/rust/issues/",
  32. test(no_crate_inject))]
  33. #![no_std]
  34. #![feature(char_from_unchecked)]
  35. #![feature(core_char_ext)]
  36. #![feature(core_slice_ext)]
  37. #![feature(core_str_ext)]
  38. #![feature(lang_items)]
  39. #![feature(no_std)]
  40. #![feature(staged_api)]
  41. mod tables;
  42. mod u_str;
  43. pub mod char;
  44. #[allow(deprecated)]
  45. pub mod str {
  46. pub use u_str::{UnicodeStr, SplitWhitespace};
  47. pub use u_str::{utf8_char_width, is_utf16, Utf16Items, Utf16Item};
  48. pub use u_str::{utf16_items, Utf16Encoder};
  49. }
  50. // For use in libcollections, not re-exported in libstd.
  51. pub mod derived_property {
  52. pub use tables::derived_property::{Cased, Case_Ignorable};
  53. }