#![cfg_attr(not(feature="std"), no_std)]
#![warn(missing_docs, unsafe_op_in_unsafe_fn)]
#![allow(
clippy::unusual_byte_groupings,// I sometimes group into UTF-8 control part and codepoint part
clippy::derive_hash_xor_eq,// tested
clippy::len_without_is_empty,// the character types are never empty
clippy::needless_return,// `foo.bar();\n foo` looks unfinished
clippy::redundant_closure_call,// not redundant in macros
clippy::cast_lossless,// the sizes are part of the struct name and so won't change
clippy::many_single_char_names,// the variables are in different scopes
clippy::cmp_owned,// smaller than pointer, and no allocations anyway
clippy::wrong_self_convention,// smaller than pointer
clippy::needless_range_loop,// the suggested iterator chains are less intuitive
clippy::identity_op,// applying a set of opereations with varying arguments to many elements looks nice
clippy::get_first,// .get(0), .get(1) is more readable
clippy::question_mark,// I prefer it very explicit
)]
#![warn(clippy::doc_markdown, clippy::manual_filter_map)]
mod errors;
mod traits;
mod utf8_char;
mod utf8_iterators;
mod utf16_char;
mod utf16_iterators;
mod decoding_iterators;
pub use traits::{CharExt, U8UtfExt, U16UtfExt, StrExt, IterExt, SliceExt};
pub use utf8_char::Utf8Char;
pub use utf16_char::Utf16Char;
pub mod error { pub use crate::errors::{FromStrError, EmptyStrError};
pub use crate::errors::{CodepointError, NonAsciiError, NonBmpError};
pub use crate::errors::{Utf8Error, Utf8ErrorKind};
pub use crate::errors::{Utf16SliceError, Utf16ArrayError, Utf16TupleError};
pub use crate::errors::{Utf16FirstUnitError, Utf16PairError};
}
pub mod iterator {
pub use crate::utf8_iterators::{Utf8Iterator, Utf8CharSplitter, Utf8Chars, Utf8CharIndices};
pub use crate::utf16_iterators::{Utf16Iterator, Utf16CharSplitter, Utf16Chars, Utf16CharIndices};
pub use crate::decoding_iterators::{Utf8CharMerger, Utf8CharDecoder};
pub use crate::decoding_iterators::{Utf16CharMerger, Utf16CharDecoder};
}