RosettaCodeData/Task/Palindrome-detection/Rust/palindrome-detection-2.rust
2017-09-25 22:28:19 +02:00

5 lines
185 B
Text

extern crate unicode_segmentation;
use unicode_segmentation::UnicodeSegmentation;
fn is_palindrome(string: &str) -> bool {
string.graphemes(true).eq(string.graphemes(true).rev())
}