evaluate_single_country

Function evaluate_single_country 

Source
pub fn evaluate_single_country(
    haystack: &str,
    country: Country,
    check_position: bool,
) -> Result<Option<PostcodeHolder>, PostcodeError>
Expand description

Used to parse a postcode from an address of an already known country

Use check_position to control whether you are evaluating a whole address or a single postcode. For example

  • check_position = true: “15 Main Road, EN35 0RS” will find “EN35 0RS”
  • check_position = false: “EN35 0RS” will find “EN35 0RS”