package camomile

  1. Overview
  2. Docs
A Unicode library

Install

dune-project
 Dependency

Authors

Maintainers

Sources

v2.1.0.tar.gz
md5=35c450853b72e286bef9b75ae4821621
sha512=fff70942e1866c5ad180a9de392a153809db7858f6d9f1067cd88db8b23b03643d09666abf09e6fae3d4da99f44570158b83170104cee68fdd5c1fc41b7c3e7b

doc/camomile.lib/CamomileLib/SubText/Make/index.html

Module SubText.Make

Parameters

Signature

type t
val get : t -> int -> UChar.t
val init : int -> (int -> UChar.t) -> t
val length : t -> int
type index
val look : t -> index -> UChar.t
val nth : t -> int -> index
val first : t -> index
val last : t -> index
val next : t -> index -> index
val prev : t -> index -> index
val move : t -> index -> int -> index
val out_of_range : t -> index -> bool
val compare_index : t -> index -> index -> int
val iter : (UChar.t -> unit) -> t -> unit
val compare : t -> t -> int
module Buf : sig ... end
type ur_text = Text.t

The type of original texts.

type ur_index = Text.index

The type of indexes of original texts.

val 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.

val excerpt : t -> ur_text

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

val context : t -> ur_text * ur_index * ur_index

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

val ur_index_of : t -> index -> ur_index

Conversion from indexes of sub-texts to ur_texts.