Skip to content

Rust library to check if something contains/is a palindrome

License

Notifications You must be signed in to change notification settings

holbewoner/palindrome.rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Rust library to check if something contains/is a palindrome

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages