Function is_valid_utf8

Source
pub fn is_valid_utf8(data: &[u8]) -> bool
Expand description

Checks if the given byte slice is valid UTF-8.

  • data: The byte slice to validate.
  • Returns: true if the byte slice is valid UTF-8, otherwise false.