palindrome

Crates.iopalindrome
lib.rspalindrome
version0.1.1
sourcesrc
created_at2018-07-12 00:26:56.449407
updated_at2018-07-12 05:14:10.75567
descriptionCheck for palindromes in words and sentences
homepagehttps://github.com/TheUnitedStatesOfAmerica/palindrome.rs
repositoryhttps://github.com/TheUnitedStatesOfAmerica/palindrome.rs.git
max_upload_size
id73854
size7,027
president moon (TheUnitedStatesOfAmerica)

documentation

https://docs.rs/palindrome

README

ci-badge docs-badge

Palindrome

Do you want to check if something is or contains a palindrome? Use this library!

Examples

If you want to check whether something is a palindrome:

extern crate palindrome;

assert!(palindrome::is_palindrome("Wow!"));

assert!(palindrome::is_palindrome("Are we not pure? “No sir!” Panama’s moody Noriega brags. “It is garbage!” Irony dooms a man; a prisoner up to new era."));

Alternatively, if you want to check whether something contains a palindrome:

extern crate palindrome;

assert!(palindrome::contains_palindrome("This contains a palindrome, wow!"));
assert!(!palindrome::contains_palindrome("Single characters like a are not palindromes for convenience"));

License

Licensed under MIT

Commit count: 6

cargo fmt