check_valid_string_utf8

Function check_valid_string_utf8 

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

Checks the string s has semantic meaning and allows UTF-8 characters.

This is a relaxed version of check_valid_string_ascii that permits non-ASCII UTF-8 characters. Use this for external identifiers (e.g., exchange symbols) that may contain Unicode characters.

ยงErrors

Returns an error if:

  • s is an empty string.
  • s consists solely of whitespace characters.