package bytestring

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t

an immutable efficient binary string

type view = {
  1. offset : int;
  2. length : int;
  3. data : string;
}

A valid sub-range with an associated string.

When used inside representations, it should always be a, non-empty, and a strict sub-range of the associated string.

val empty : t
val is_empty : t -> bool
val length : t -> int
val pp : Stdlib.Format.formatter -> t -> unit
exception No_match
exception Guard_mismatch
exception Malformed of string
val of_string : string -> t
val to_string : t -> string
val to_iovec : t -> Rio.Iovec.t
exception View_out_of_bounds
val join : t -> t -> t
val (^) : t -> t -> t
val concat : t -> t list -> t
val sub : ?off:int -> len:int -> t -> t
module Iter : sig ... end
val to_iter : t -> Iter.t
module Transient : sig ... end
val to_transient : t -> Transient.t
val with_bytes : ?capacity:int -> (bytes -> (int, 'error) Stdlib.result) -> (t, 'error) Stdlib.result
OCaml

Innovation. Community. Security.