@@ -54,20 +54,42 @@ val add_char : t -> char -> unit
5454 @raise Invalid_argument if this requires the buffer to grow beyond system limits. *)
5555
5656val append_bytes : t -> bytes -> unit
57+ (* * Add bytes at the end *)
58+
5759val append_subbytes : t -> bytes -> int -> int -> unit
60+ (* * Add byte slice at the end *)
61+
5862val append_string : t -> string -> unit
63+ (* * Add string at the end *)
64+
5965val append_substring : t -> string -> int -> int -> unit
66+ (* * Add substring at the end *)
67+
6068val append_buf : t -> Buffer .t -> unit
69+ (* * Add content of the buffer at the end *)
70+
6171val append_iter : t -> char iter -> unit
72+ (* * Adds characters from the iter *)
73+
6274val append_seq : t -> char Seq .t -> unit
75+ (* * Adds characters from the seq *)
76+
6377val get : t -> int -> char
78+ (* * Get the char at the given offset *)
79+
6480val unsafe_get : t -> int -> char
81+ (* * Get the char at the given offset, unsafe (no bound check) *)
82+
6583val set : t -> int -> char -> unit
84+ (* * Set the char at the given offset *)
85+
6686val unsafe_set : t -> int -> char -> unit
87+ (* * Set the char at the given offset, unsafe (no bound check) *)
6788
6889val to_slice : t -> CCByte_slice .t
6990(* * [to_slice buf] returns a slice of the current content.
70- The slice shares the same byte array as [buf] (until [buf] is resized). *)
91+ The slice shares the same byte array as [buf] (until [buf] is resized).
92+ @since NEXT_RELEASE *)
7193
7294val contents : t -> string
7395(* * Copy the internal data to a string. Allocates. *)
@@ -76,7 +98,12 @@ val contents_bytes : t -> bytes
7698(* * Copy the internal data to a {!bytes}. Allocates. *)
7799
78100val iter : (char -> unit ) -> t -> unit
101+ (* * Iterate on the content *)
102+
79103val iteri : (int -> char -> unit ) -> t -> unit
104+ (* * Iterate with index.
105+ @since NEXT_RELEASE *)
106+
80107val fold_left : ('a -> char -> 'a ) -> 'a -> t -> 'a
81108val of_iter : char iter -> t
82109val of_seq : char Seq .t -> t
0 commit comments