Module Core_kernel.Substring

A substring is a contiguous set of characters within a string. Creating a substring does not copy. Therefore modifying the string also modifies the substring.

module type S = Core_kernel__.Make_substring.S
type base = bytes
type t
val mem : t -> Core_kernel__.Import.char -> bool
val length : t -> int
val is_empty : t -> bool
val iter : t -> f:(Core_kernel__.Import.char -> unit) -> unit
val fold : t -> init:'accum -> f:('accum -> Core_kernel__.Import.char -> 'accum) -> 'accum
val fold_result : t -> init:'accum -> f:('accum -> Core_kernel__.Import.char -> ('accum'e) Base.Result.t) -> ('accum'e) Base.Result.t
val fold_until : t -> init:'accum -> f:('accum -> Core_kernel__.Import.char -> ('accum'final) Base__.Container_intf.Continue_or_stop.t) -> finish:('accum -> 'final) -> 'final
val exists : t -> f:(Core_kernel__.Import.char -> bool) -> bool
val for_all : t -> f:(Core_kernel__.Import.char -> bool) -> bool
val count : t -> f:(Core_kernel__.Import.char -> bool) -> int
val sum : (module Base__.Container_intf.Summable with type t = 'sum) -> t -> f:(Core_kernel__.Import.char -> 'sum) -> 'sum
val find : t -> f:(Core_kernel__.Import.char -> bool) -> Core_kernel__.Import.char option
val find_map : t -> f:(Core_kernel__.Import.char -> 'a option) -> 'a option
val to_list : t -> Core_kernel__.Import.char list
val to_array : t -> Core_kernel__.Import.char array
val min_elt : t -> compare:(Core_kernel__.Import.char -> Core_kernel__.Import.char -> int) -> Core_kernel__.Import.char option
val max_elt : t -> compare:(Core_kernel__.Import.char -> Core_kernel__.Import.char -> int) -> Core_kernel__.Import.char option
val base : t -> base
val pos : t -> Core_kernel__.Import.int
val get : t -> Core_kernel__.Import.int -> Core_kernel__.Import.char
val create : ?⁠pos:Core_kernel__.Import.int -> ?⁠len:Core_kernel__.Import.int -> base -> t
val sub : ?⁠pos:Core_kernel__.Import.int -> ?⁠len:Core_kernel__.Import.int -> t -> t
val blit_to_string : t -> dst:Core_kernel__.Import.bytes -> dst_pos:Core_kernel__.Import.int -> Core_kernel__.Import.unit
val blit_to_bytes : t -> dst:Core_kernel__.Import.bytes -> dst_pos:Core_kernel__.Import.int -> Core_kernel__.Import.unit
val blit_to_bigstring : t -> dst:Bigstring.t -> dst_pos:Core_kernel__.Import.int -> Core_kernel__.Import.unit
val blit_from_string : t -> src:Core_kernel__.Import.string -> src_pos:Core_kernel__.Import.int -> len:Core_kernel__.Import.int -> Core_kernel__.Import.unit
val blit_from_bigstring : t -> src:Bigstring.t -> src_pos:Core_kernel__.Import.int -> len:Core_kernel__.Import.int -> Core_kernel__.Import.unit
val concat : t Core_kernel__.Import.list -> t
val concat_string : t Core_kernel__.Import.list -> Core_kernel__.Import.string
val concat_bigstring : t Core_kernel__.Import.list -> Bigstring.t
val to_string : t -> Core_kernel__.Import.string
val to_bigstring : t -> Bigstring.t
val of_string : Core_kernel__.Import.string -> t
val of_bigstring : Bigstring.t -> t
val drop_prefix : t -> Core_kernel__.Import.int -> t
val drop_suffix : t -> Core_kernel__.Import.int -> t
val prefix : t -> Core_kernel__.Import.int -> t
val suffix : t -> Core_kernel__.Import.int -> t