encodings.mli 744 Bytes
Newer Older
1 2
type uchar = int

3
module Utf8 :
4
sig
5
  include Custom.T
6
  type uindex
7

8
  val mk_check: string -> t option
9 10 11
  val to_string: t -> string
  val print: Format.formatter -> t -> unit

12
  val empty: t
13 14
  val end_index: t -> uindex
  val start_index: t -> uindex
15
  val equal_index: uindex -> uindex -> bool
16 17
  val mk: string -> t
  val mk_latin1: string -> t
18
  val mk_char: int -> t
19
  val mk_idx: int -> uindex
20
  val get_str: t -> string
21 22
  val get_idx: uindex -> int

23 24 25
  val get: t -> uindex -> uchar
  val advance: t -> uindex -> uindex
  val next: t -> uindex -> uchar * uindex 
26

27 28
  val concat: t -> t -> t

29
  val store: Buffer.t -> uchar -> unit
30 31
  val copy: Buffer.t -> t -> uindex -> uindex -> unit
  val get_substr: t -> uindex -> uindex -> string
32
end