sub_strs/
lib.rs

1/*
2==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--
3
4sub-strs
5
6Copyright (C) 2019-2024  Anonymous
7
8There are several releases over multiple years,
9they are listed as ranges, such as: "2019-2024".
10
11This program is free software: you can redistribute it and/or modify
12it under the terms of the GNU Lesser General Public License as published by
13the Free Software Foundation, either version 3 of the License, or
14(at your option) any later version.
15
16This program is distributed in the hope that it will be useful,
17but WITHOUT ANY WARRANTY; without even the implied warranty of
18MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19GNU Lesser General Public License for more details.
20
21You should have received a copy of the GNU Lesser General Public License
22along with this program.  If not, see <https://www.gnu.org/licenses/>.
23
24::--::--::--::--::--::--::--::--::--::--::--::--::--::--::--::--
25*/
26
27//! # `sub-strs`
28//!
29//! ## Project
30//!
31//! - License: GNU Lesser General Public License, either version 3, or (at your option) any later version.
32//! - _This project follows [Semantic Versioning 2.0.0]_
33//!
34//! ## Features
35//!
36//! - Simple function for finding sub strings within a string: [`sub_strs()`][::sub_strs()].
37//! - Case insensitive string: [`CainStr`][::CainStr].
38//! - [`Glob`][::Glob]/[`GlobSet`][::GlobSet].
39//!
40//! ## Notes
41//!
42//! Documentation is built with all features. Some of them are optional. If you see components from other crates, you can view source to see
43//! what features are required.
44//!
45//! [Semantic Versioning 2.0.0]: https://semver.org/spec/v2.0.0.html
46//!
47//! [::sub_strs()]: fn.sub_strs.html
48//! [::CainStr]: struct.CainStr.html
49//! [::Glob]: struct.Glob.html
50//! [::GlobSet]: struct.GlobSet.html
51
52#![warn(missing_docs)]
53#![no_std]
54
55// ╔═════════════════╗
56// ║   IDENTIFIERS   ║
57// ╚═════════════════╝
58
59macro_rules! code_name  { () => { "sub-strs" }}
60macro_rules! version    { () => { "0.29.3" }}
61
62/// # Crate name
63pub const NAME: &str = "sub-strs";
64
65/// # Crate code name
66pub const CODE_NAME: &str = code_name!();
67
68/// # ID of this crate
69pub const ID: &str = concat!(
70    "81c8cd7c-bb6ff55c-04532796-0c5f8e78-dc58e220-de29f966-6cf5438c-b8e7d644-",
71    "5599b650-c828cd64-75581638-1018c24e-1ae61d33-4eab6d5e-bb158f27-ecaf4911",
72);
73
74/// # Crate version
75pub const VERSION: &str = version!();
76
77/// # Crate release date (year/month/day)
78pub const RELEASE_DATE: (u16, u8, u8) = (2024, 12, 10);
79
80/// # Tag, which can be used for logging...
81pub const TAG: &str = concat!(code_name!(), "::81c8cd7c::", version!());
82
83// ╔════════════════════╗
84// ║   IMPLEMENTATION   ║
85// ╚════════════════════╝
86
87extern crate alloc;
88
89#[cfg(feature="std")]
90extern crate std;
91
92#[test]
93fn test_crate_version() {
94    assert_eq!(VERSION, env!("CARGO_PKG_VERSION"));
95}
96
97pub mod version_info;
98
99mod cain_str;
100mod error;
101mod glob;
102mod glob_set;
103mod order;
104mod sub_str;
105mod sub_str_iter;
106
107pub use self::{
108    cain_str::*,
109    error::*,
110    glob::*,
111    glob_set::*,
112    order::*,
113    sub_str::*,
114    sub_str_iter::*,
115};
116
117/// # Result type used in this crate
118pub type Result<T> = core::result::Result<T, Error>;