nautilus_core::correctness

Function check_valid_string

Source
pub fn check_valid_string<T: AsRef<str>>(s: T, param: &str) -> Result<()>
Expand description

Checks the string s has semantic meaning and contains only ASCII characters.

ยงErrors

This function returns an error:

  • If s is an empty string.
  • If s consists solely of whitespace characters.
  • If s contains one or more non-ASCII characters.