Function validate_complex

Source
pub fn validate_complex(to_parse: &str, chrs: &Vec<char>) -> Option<String>
Expand description

Validates the string to be parsed.

If the string to parse is empty or too long, this function will return an error message. Also, the string must not begin with a dollar sign or a parenthesis.

§Argument

  • to_parse - &str
  • chars - vector of chars

§Return

  • Option - Some(error_message) or None