RosettaCodeData/Task/Palindrome-detection/Rust/palindrome-detection-2.rust

6 lines
185 B
Plaintext

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