#![warn(clippy::pedantic, clippy::nursery)]
#![allow(clippy::doc_markdown)]
#![deny(missing_docs, rustdoc::broken_intra_doc_links)]
#![doc(
html_logo_url = "https://raw.githubusercontent.com/azzamsa/dryip-of-rust/master/docs/logo.png
"
)]
#![doc(
html_favicon_url = "https://raw.githubusercontent.com/azzamsa/dryip-of-rust/master/docs/favicon.ico
"
)]
pub mod arrays;
pub mod dates;
pub mod maths;
pub mod strings;
#[must_use]
pub fn sorted(word: &str) -> String {
let mut chars_ = word.chars().collect::<Vec<char>>();
chars_.sort_unstable();
chars_.iter().collect::<String>()
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_sorted() {
assert_eq!("aaagmnr", sorted("anagram"));
assert_eq!("aceimn", sorted("iceman"));
}
}