1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
//! Compile-time string operations
//!
//! MSRV: Rust 1.65.0
//!
#![deny(unsafe_code, missing_docs, clippy::all, clippy::cargo)]
#![allow(
    clippy::missing_docs_in_private_items,
    clippy::missing_inline_in_public_items,
    clippy::implicit_return
)]
#![cfg_attr(not(any(test, feature = "std")), no_std)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![cfg_attr(
    feature = "unstable", 
    feature(const_char_from_u32_unchecked), // https://github.com/rust-lang/rust/issues/89259
    feature(const_align_offset),            // https://github.com/rust-lang/rust/issues/90962
)]

#[allow(unused_macros)]
macro_rules! item_group {
    ($($item:item)*) => {
        $($item)*
    }
}

mod ascii;
mod bytes;
mod printable;
mod slice;
mod str;
mod utf16;
mod utf8;

#[doc(hidden)]
#[cfg(feature = "proc")]
pub mod __proc {
    mod case;
    pub use self::case::*;

    mod fmt;
    pub use self::fmt::*;

    #[cfg(feature = "http")]
    item_group! {
        mod http;
        pub use self::http::*;
    }

    #[cfg(feature = "regex")]
    item_group! {
        mod regex;
        pub use self::regex::*;
    }
}

#[doc(hidden)]
pub mod __ctfe {
    mod ascii_case;
    pub use self::ascii_case::*;

    mod compare;
    pub use self::compare::*;

    mod concat;
    pub use self::concat::*;

    mod concat_bytes;
    pub use self::concat_bytes::*;

    mod cstr;
    pub use self::cstr::*;

    mod encode;
    pub use self::encode::*;

    mod equal;
    pub use self::equal::*;

    mod find;
    pub use self::find::*;

    mod fmt;
    pub use self::fmt::*;

    mod hex;
    pub use self::hex::*;

    #[cfg(feature = "std")]
    item_group! {
        mod net;
        pub use self::net::*;
    }

    mod parse;
    pub use self::parse::*;

    mod repeat;
    pub use self::repeat::*;
    mod replace;
    pub use self::replace::*;

    mod str;
    pub use self::str::*;

    mod to_byte_array;
    pub use self::to_byte_array::*;

    mod to_char_array;
    pub use self::to_char_array::*;

    mod to_str;
    pub use self::to_str::*;

    mod sorted;
    pub use self::sorted::*;

    mod split;
    pub use self::split::*;

    mod squish;
    pub use self::squish::*;

    mod is_ascii;
    pub use self::is_ascii::*;

    mod eq_ignore_ascii_case;
    pub use self::eq_ignore_ascii_case::*;

    mod unwrap;
    pub use self::unwrap::*;
}