/src/librustc_unicode/lib.rs

https://gitlab.com/alx741/rust · Rust · 59 lines · 30 code · 7 blank · 22 comment · 0 complexity · 60ed7fee7902908b9b421cb93a4799be 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. #![crate_name = "rustc_unicode"]
  22. #![unstable(feature = "unicode", issue = "27783")]
  23. #![crate_type = "rlib"]
  24. #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
  25. html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
  26. html_root_url = "https://doc.rust-lang.org/nightly/",
  27. html_playground_url = "https://play.rust-lang.org/",
  28. issue_tracker_base_url = "https://github.com/rust-lang/rust/issues/",
  29. test(no_crate_inject, attr(allow(unused_variables), deny(warnings))))]
  30. #![cfg_attr(not(stage0), deny(warnings))]
  31. #![no_std]
  32. #![feature(core_char_ext)]
  33. #![feature(lang_items)]
  34. #![feature(staged_api)]
  35. #![feature(unicode)]
  36. mod tables;
  37. mod u_str;
  38. pub mod char;
  39. #[allow(deprecated)]
  40. pub mod str {
  41. pub use u_str::{UnicodeStr, SplitWhitespace};
  42. pub use u_str::{utf8_char_width, is_utf16};
  43. pub use u_str::{Utf16Encoder};
  44. }
  45. // For use in libcollections, not re-exported in libstd.
  46. pub mod derived_property {
  47. pub use tables::derived_property::{Cased, Case_Ignorable};
  48. }
  49. // For use in libsyntax
  50. pub mod property {
  51. pub use tables::property::Pattern_White_Space;
  52. }