Ad
Strings
Code
Diff
  • fn last_char(string: &str) -> Option<char> {
        string.chars().last()
    }
    • fn last_char(string: &str) -> Option<char> {
    • string.chars().rev().next()
    • string.chars().last()
    • }