package sosa

  1. Overview
  2. Docs
type character = char
type t = bytes
val max_string_length : int option
val empty : bytes
val is_empty : bytes -> bool
val make : int -> char -> bytes
val length : bytes -> int
val of_character : char -> bytes
val of_character_list : char list -> bytes
val to_character_list : bytes -> char list
val get : bytes -> index:int -> char option
val set : bytes -> index:int -> v:char -> bytes option
val get_exn : bytes -> index:int -> char
val set_exn : bytes -> index:int -> v:char -> bytes
val concat : ?sep:bytes -> bytes list -> bytes
val of_native_string : string -> (bytes, [> `wrong_char_at of int ]) Api.result
val of_native_substring : string -> offset:int -> length:int -> (bytes, [> `out_of_bounds | `wrong_char_at of int ]) Api.result
val to_native_string : bytes -> string
val to_string_hum : bytes -> string
val fold : bytes -> init:'a -> f:('a -> char -> 'a) -> 'a
val foldi : bytes -> init:'a -> f:(int -> 'a -> char -> 'a) -> 'a
val fold2_exn : bytes -> bytes -> init:'a -> f:('a -> char -> char -> 'a) -> 'a
val compare : bytes -> bytes -> int
val sub : bytes -> index:int -> length:int -> bytes option
val sub_exn : bytes -> index:int -> length:int -> bytes
val slice : ?start:int -> ?finish:int -> bytes -> bytes option
val slice_exn : ?start:int -> ?finish:int -> bytes -> bytes
val is_prefix : bytes -> prefix:bytes -> bool
val is_suffix : bytes -> suffix:bytes -> bool
val chop_prefix_exn : bytes -> prefix:bytes -> bytes
val chop_prefix : bytes -> prefix:bytes -> bytes option
val chop_suffix_exn : bytes -> suffix:bytes -> bytes
val chop_suffix : bytes -> suffix:bytes -> bytes option
val split_at : bytes -> index:int -> bytes * bytes
val take : bytes -> index:int -> bytes
val drop : bytes -> index:int -> bytes
val compare_substring : (bytes * int * int) -> (bytes * int * int) -> int
val compare_substring_strict : (bytes * int * int) -> (bytes * int * int) -> int option
val iter : bytes -> f:(char -> unit) -> unit
val iteri : bytes -> f:(int -> char -> unit) -> unit
val iter_reverse : bytes -> f:(char -> unit) -> unit
val rev : bytes -> bytes
val map : bytes -> f:(char -> char) -> bytes
val mapi : bytes -> f:(int -> char -> char) -> bytes
val map2_exn : bytes -> bytes -> f:(char -> char -> char) -> bytes
val for_all : bytes -> f:(char -> bool) -> bool
val exists : bytes -> f:(char -> bool) -> bool
val take_while : bytes -> f:(char -> bool) -> bytes
val take_while_with_index : bytes -> f:(int -> char -> bool) -> bytes
val index_of_character : bytes -> ?from:int -> char -> int option
val index_of_character_reverse : bytes -> ?from:int -> char -> int option
val index_of_string : ?from:int -> ?sub_index:int -> ?sub_length:int -> bytes -> sub:bytes -> int option
val index_of_string_reverse : ?from:int -> ?sub_index:int -> ?sub_length:int -> bytes -> sub:bytes -> int option
val find : ?from:int -> ?length:int -> bytes -> f:(char -> bool) -> int option
val find_reverse : ?from:int -> ?length:int -> bytes -> f:(char -> bool) -> int option
val filter_map : ?from:int -> ?length:int -> bytes -> f:(char -> char option) -> bytes
val filter : ?from:int -> ?length:int -> bytes -> f:(char -> bool) -> bytes
val split : bytes -> on:[ `Character of char | `String of bytes ] -> bytes list
val strip : ?on:[ `Both | `Left | `Right ] -> ?whitespace:(char -> bool) -> bytes -> bytes
module Make_output (Model : Api.OUTPUT_MODEL) : sig ... end
val mutate : bytes -> index:int -> char -> (unit, [> `out_of_bounds ]) Api.result
val mutate_exn : bytes -> index:int -> char -> unit
val blit : src:bytes -> src_index:int -> dst:bytes -> dst_index:int -> length:int -> (unit, [> `out_of_bounds ]) Api.result
val blit_exn : src:bytes -> src_index:int -> dst:bytes -> dst_index:int -> length:int -> unit
OCaml

Innovation. Community. Security.