package camomile

  1. Overview
  2. No Docs
A Unicode library

Install

dune-project
 Dependency

Authors

Maintainers

Sources

camomile-1.0.2.tbz
sha256=f0a419b0affc36500f83b086ffaa36c545560cee5d57e84b729e8f851b3d1632
sha512=7586422e68779476206027c6ebbe19b677fbe459153221f7c952c7fae374c5c8232249cb76fdb1f482069707aa1580be827cd39693906142988268b7f0e7f6d0

doc/camomile.library/CamomileLibrary/module-type-Type/UText/index.html

Module Type.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 = 'a UText.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 = UText.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 = UText.Buf
OCaml

Innovation. Community. Security.