package containers

  1. Overview
  2. Docs
type t = string * int * int

A string, an offset, and the length of the slice

val make : string -> int -> len:int -> t
val full : string -> t

Full string

val copy : t -> string

Make a copy of the substring

val underlying : t -> string
val sub : t -> int -> int -> t

Sub-slice

include S with type t := t
val length : t -> int
val blit : t -> int -> t -> int -> int -> unit
val fold : ('a -> char -> 'a) -> 'a -> t -> 'a

Fold on chars by increasing index.

  • since 0.7

Conversions

val to_gen : t -> char gen
val to_seq : t -> char sequence
val to_klist : t -> char klist
val to_list : t -> char list
val pp : Buffer.t -> t -> unit
val print : Format.formatter -> t -> unit
OCaml

Innovation. Community. Security.