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

6 lines
185 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
extern crate unicode_segmentation;
use unicode_segmentation::UnicodeSegmentation;
fn is_palindrome(string: &str) -> bool {
string.graphemes(true).eq(string.graphemes(true).rev())
}