Rust Check Palindrome
fn check_palindrome(input_string: &str) -> bool {
input_string.chars().rev().collect::<String>() == input_string
}
This compares the string with its reverse. If they match, it is a palindrome.
fn check_palindrome(input_string: &str) -> bool {
input_string.chars().rev().collect::<String>() == input_string
}
This compares the string with its reverse. If they match, it is a palindrome.