sig
  type mutability = [ `Immutable | `Mutable ]
  type 'a text
  type utext = [ `Immutable ] Main.Type.UText.text
  type ustring = [ `Mutable ] Main.Type.UText.text
  type t = Main.Type.UText.utext
  val utext_of_ustring : Main.Type.UText.ustring -> Main.Type.UText.utext
  val ustring_of_utext : Main.Type.UText.utext -> Main.Type.UText.ustring
  val get : 'Main.Type.UText.text -> int -> Main.Type.UChar.t
  val set : Main.Type.UText.ustring -> int -> Main.Type.UChar.t -> unit
  type index
  val look :
    'Main.Type.UText.text -> Main.Type.UText.index -> Main.Type.UChar.t
  val nth : 'Main.Type.UText.text -> int -> Main.Type.UText.index
  val first : 'Main.Type.UText.text -> Main.Type.UText.index
  val last : 'Main.Type.UText.text -> Main.Type.UText.index
  val out_of_range : 'Main.Type.UText.text -> Main.Type.UText.index -> bool
  val compare_index :
    'Main.Type.UText.text ->
    Main.Type.UText.index -> Main.Type.UText.index -> int
  val next :
    'Main.Type.UText.text -> Main.Type.UText.index -> Main.Type.UText.index
  val prev :
    'Main.Type.UText.text -> Main.Type.UText.index -> Main.Type.UText.index
  val move :
    'Main.Type.UText.text ->
    Main.Type.UText.index -> int -> Main.Type.UText.index
  val length : 'Main.Type.UText.text -> int
  val of_string : string -> Main.Type.UText.utext
  val init : int -> (int -> Main.Type.UChar.t) -> Main.Type.UText.utext
  val init_ustring :
    int -> (int -> Main.Type.UChar.t) -> Main.Type.UText.ustring
  val make : int -> Main.Type.UChar.t -> Main.Type.UText.ustring
  val copy : Main.Type.UText.ustring -> Main.Type.UText.ustring
  val sub : 'Main.Type.UText.text -> int -> int -> 'Main.Type.UText.text
  val fill :
    Main.Type.UText.ustring -> int -> int -> Main.Type.UChar.t -> unit
  val blit :
    'Main.Type.UText.text ->
    int -> Main.Type.UText.ustring -> int -> int -> unit
  val append :
    'Main.Type.UText.text ->
    'Main.Type.UText.text -> 'Main.Type.UText.text
  val iter : (Main.Type.UChar.t -> unit) -> 'Main.Type.UText.text -> unit
  val compare : 'Main.Type.UText.text -> 'Main.Type.UText.text -> int
  module Buf :
    sig
      type buf
      val create : int -> Main.Type.UText.Buf.buf
      val contents : Main.Type.UText.Buf.buf -> Main.Type.UText.t
      val contents_string :
        Main.Type.UText.Buf.buf -> Main.Type.UText.ustring
      val length : Main.Type.UText.Buf.buf -> int
      val clear : Main.Type.UText.Buf.buf -> unit
      val reset : Main.Type.UText.Buf.buf -> unit
      val add_char : Main.Type.UText.Buf.buf -> Main.Type.UChar.t -> unit
      val add_string :
        Main.Type.UText.Buf.buf -> 'Main.Type.UText.text -> unit
      val add_buffer :
        Main.Type.UText.Buf.buf -> Main.Type.UText.Buf.buf -> unit
    end
end