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

6 lines
185 B
Text
Raw Permalink Normal View History

2017-09-23 10:01:46 +02:00
extern crate unicode_segmentation;
use unicode_segmentation::UnicodeSegmentation;
fn is_palindrome(string: &str) -> bool {
string.graphemes(true).eq(string.graphemes(true).rev())
}