package containers

  1. Overview
  2. Docs
On This Page
  1. Conversions
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t
val length : t -> int

Return the length (number of characters) of the given string.

val blit : t -> int -> Stdlib.Bytes.t -> int -> int -> unit

Like String.blit. Compatible with the -safe-string option.

  • raises Invalid_argument

    if indices are not valid.

val fold : ('a -> char -> 'a) -> 'a -> t -> 'a

Fold on chars by increasing index.

  • since 0.7

Conversions

val to_gen : t -> char gen

Return the gen of characters contained in the string.

val to_iter : t -> char iter

Return the iter of characters contained in the string.

  • since 2.8
val to_std_seq : t -> char Stdlib.Seq.t

to_std_seq s returns a Seq.t of the bytes in s.

  • since 2.8
val to_seq : t -> char sequence
  • deprecated use to_iter or to_std_seq
val to_klist : t -> char klist
  • deprecated use to_std_seq
val to_list : t -> char list

Return the list of characters contained in the string.

val pp_buf : Stdlib.Buffer.t -> t -> unit

Renamed from pp since 2.0.

val pp : Stdlib.Format.formatter -> t -> unit

Print the string within quotes.

Renamed from print since 2.0.

OCaml

Innovation. Community. Security.