From 236627cdf081e51fce3bc54fdee4e40d4f6ca85e Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Tue, 14 Jun 2016 00:08:14 +0200 Subject: Moving UTF-8 related functions to Unicode module. --- lib/unicode.mli | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/unicode.mli') diff --git a/lib/unicode.mli b/lib/unicode.mli index aaf455dec5..1f8bd44eee 100644 --- a/lib/unicode.mli +++ b/lib/unicode.mli @@ -40,3 +40,9 @@ val ascii_of_ident : string -> string (** Validate an UTF-8 string *) val is_utf8 : string -> bool + +(** Return the length of a valid UTF-8 string. *) +val utf8_length : string -> int + +(** Variant of {!String.sub} for UTF-8 strings. *) +val utf8_sub : string -> int -> int -> string -- cgit v1.2.3