package xapi-stdext-encodings

  1. Overview
  2. Docs

Provides functions for validating and processing * strings according to the UTF-8 character encoding. * * Validly-encoded strings must satisfy RFC 3629. * * For further information, see: * http://www.rfc.net/rfc3629.html

val is_valid : string -> bool

Returns true if and only if the given string is validly-encoded.

val validate : string -> unit

Raises an encoding error if the given string is not validly-encoded.

val longest_valid_prefix : string -> string

Returns the longest validly-encoded prefix of the given string.

OCaml

Innovation. Community. Security.