package plebeia

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

Memory buffer

Memory buffer

type t
val len : t -> int

length in bytes

val to_string : t -> string
val get_char : t -> int -> char
val set_char : t -> int -> char -> unit
val get_uint8 : t -> int -> int
val set_uint8 : t -> int -> int -> unit
val get_uint16 : t -> int -> int
val set_uint16 : t -> int -> int -> unit
val get_uint32 : t -> int -> int
val set_uint32 : t -> int -> int -> unit
val get_uint64 : t -> int -> int64
val set_uint64 : t -> int -> int64 -> unit
val get_index : t -> int -> Index.t
val set_index : t -> int -> Index.t -> unit
val copy : t -> int -> int -> string

copy t off len copies the contents of the given region to a string

val blit_from_string : string -> int -> t -> int -> int -> unit
val write_string : string -> t -> int -> unit

write_string s t off is equivalent with blit_from_string s 0 t off (String.length s)

val create : int -> t

Create a buffer on memory of the specified bytes

val duplicate : t -> t

Copy the given buffer to a new buffer on memory

OCaml

Innovation. Community. Security.