Function is_alpha

Source
pub fn is_alpha(input: &str) -> bool
Expand description

Checks if the input string contains only alphabetic characters.

§Arguments

  • input - A string slice that holds the string to be checked.

§Returns

  • true if the input string contains only alphabetic characters and is not empty.
  • false otherwise.

§Examples

use rust_string_utils::utils::number::is_alpha;
assert_eq!(is_alpha("abc"), true);
assert_eq!(is_alpha("ab2c"), false);
assert_eq!(is_alpha(""), false);