Up

Module String_monoid

Simple library for concatenating immutable strings efficiently

Signature

type t
val empty : t

Primitive, constant-time operations

val nl : t
val plus : t -> t -> t
val length : t -> int
val concat : ?sep:t -> t list -> t

Linear in the number of elements.

val concat_string : ?sep:string -> string list -> t

Linear in the number of elements in the list.

include Core.Std.Stringable.S with type t := t
type t
val of_string : string -> t
val to_string : t -> string
val of_bigstring : Core.Std.Bigstring.t -> t
val to_bigstring : t -> Core.Std.Bigstring.t
val of_char : char -> t
val output_unix : t -> Async.Std.Writer.t -> unit
val output_channel : t -> Core.Std.Out_channel.t -> unit