mirror of
https://github.com/c-cube/iter.git
synced 2025-12-05 19:00:31 -05:00
sequence.concat_str
This commit is contained in:
parent
e0a95a3c31
commit
77d74953fd
2 changed files with 10 additions and 0 deletions
|
|
@ -591,6 +591,11 @@ let to_str seq =
|
|||
iter (fun c -> Buffer.add_char b c) seq;
|
||||
Buffer.contents b
|
||||
|
||||
let concat_str seq =
|
||||
let b = Buffer.create 64 in
|
||||
iter (Buffer.add_string b) seq;
|
||||
Buffer.contents b
|
||||
|
||||
let of_in_channel ic =
|
||||
from_iter (fun k ->
|
||||
try while true do
|
||||
|
|
|
|||
|
|
@ -366,6 +366,11 @@ val hashtbl_values : ('a, 'b) Hashtbl.t -> 'b t
|
|||
val of_str : string -> char t
|
||||
val to_str : char t -> string
|
||||
|
||||
val concat_str : string t -> string
|
||||
(** Concatenate strings together, eagerly.
|
||||
Also see {!intersperse} to add a separator.
|
||||
@since NEXT_VERSION *)
|
||||
|
||||
val of_in_channel : in_channel -> char t
|
||||
(** Iterates on characters of the input (can block when one
|
||||
iterates over the sequence). If you need to iterate
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue