Function libyml::internal::yaml_check_utf8

source ·
pub unsafe fn yaml_check_utf8(start: *const u8, length: u64) -> Success
Expand description

Checks if the provided UTF-8 encoded string is valid according to the UTF-8 specification.

§Parameters

  • start: A pointer to the start of the UTF-8 encoded string.
  • length: The length of the UTF-8 encoded string in bytes.

§Return

Returns Success::OK if the string is valid UTF-8, otherwise returns Success::FAIL.

§Safety

  • start must be a valid, non-null pointer to a null-terminated UTF-8 string.
  • The UTF-8 encoded string must be properly formatted and not contain any invalid characters.
  • The string must be properly null-terminated.
  • The string must not contain any invalid characters or sequences.