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/SubText/module-type-Type/index.html

Module type SubText.TypeSource

Sub-texts, parts of original (ur-) texts. The signature and semantics matches those of UStorage.

Sourcetype t
Sourceval get : t -> int -> UChar.t
Sourceval init : int -> (int -> UChar.t) -> t
Sourceval length : t -> int
Sourcetype index
Sourceval look : t -> index -> UChar.t
Sourceval nth : t -> int -> index
Sourceval first : t -> index
Sourceval last : t -> index
Sourceval next : t -> index -> index
Sourceval prev : t -> index -> index
Sourceval move : t -> index -> int -> index
Sourceval out_of_range : t -> index -> bool
Sourceval compare_index : t -> index -> index -> int
Sourceval iter : (UChar.t -> unit) -> t -> unit
Sourceval compare : t -> t -> int
Sourcemodule Buf : sig ... end
Sourcetype ur_text

The type of original texts.

Sourcetype ur_index

The type of indexes of original texts.

Sourceval refer : ur_text -> ur_index -> ur_index -> t

refer t i j returns the part of t from i until j. The character pointed by j is not included in the result. If j is equal to i or located before j, the result is an empty string.

Sourceval excerpt : t -> ur_text

excerpt t copies the contents of t as a new ur_text.

Sourceval context : t -> ur_text * ur_index * ur_index

context t returns the tuple (s, i, j) such that t = refer s i j.

Sourceval ur_index_of : t -> index -> ur_index

Conversion from indexes of sub-texts to ur_texts.

OCaml

Innovation. Community. Security.