package camomile

  1. Overview
  2. Docs
A comprehensive Unicode library

Install

Dune Dependency

Authors

Maintainers

Sources

rel-0.8.7.tar.gz
sha256=48a24e20960962b950c8a6846c7cfa17ccd665440627ff9ca01d21c2429ccaa4
md5=7727d76048d99a6ba157cddf2b4bb0ef

doc/camomile/UText/index.html

Module UTextSource

An implementation of Unicode string.

An implementation of Unicode string. Internally, it uses integer array. The semantics matches the description of UStorage.

Sourcetype mutability = [
  1. | `Mutable
  2. | `Immutable
]

Phantom type for distinguishing mutability

Sourcetype 'a text
Sourcetype utext = [ `Immutable ] text
Sourcetype ustring = [ `Mutable ] text
Sourcetype t = utext
Sourceval utext_of_ustring : ustring -> utext
Sourceval ustring_of_utext : utext -> ustring
Sourceval get : 'a text -> int -> UChar.t
Sourceval set : ustring -> int -> UChar.t -> unit

set s i u sets the i-th character in s to u.

Sourcetype index
Sourceval look : 'a text -> index -> UChar.t
Sourceval nth : 'a text -> int -> index
Sourceval first : 'a text -> index
Sourceval last : 'a text -> index
Sourceval out_of_range : 'a text -> index -> bool
Sourceval compare_index : 'a text -> index -> index -> int
Sourceval next : 'a text -> index -> index
Sourceval prev : 'a text -> index -> index
Sourceval move : 'a text -> index -> int -> index
Sourceval length : 'a text -> int
Sourceval of_string : string -> utext

Conversion from Latin-1 strings.

Sourceval init : int -> (int -> UChar.t) -> utext
Sourceval init_ustring : int -> (int -> UChar.t) -> ustring
Sourceval make : int -> UChar.t -> ustring

The semantics of these function are similar to the equivalents of string.

Sourceval copy : ustring -> ustring
Sourceval sub : 'a text -> int -> int -> 'a text
Sourceval fill : ustring -> int -> int -> UChar.t -> unit
Sourceval blit : 'a text -> int -> ustring -> int -> int -> unit
Sourceval append : 'a text -> 'b text -> 'a text
Sourceval iter : (UChar.t -> unit) -> 'a text -> unit
Sourceval compare : 'a text -> 'b text -> int
Sourcemodule Buf : sig ... end
OCaml

Innovation. Community. Security.