[][src]Function in_definite::get_a_or_an

pub fn get_a_or_an(word: &str) -> &str

Get 'a' or 'an' to match the given word.

Examples

use in_definite;

let result = in_definite::get_a_or_an("alien");

assert_eq!("an", result);
// Irregular word
let result = in_definite::get_a_or_an("unicorn");

assert_eq!("a", result);
// Title Case
let result = in_definite::get_a_or_an("Ugly");

assert_eq!("An", result);