Module Internals.Line_buffer
A line buffer is a variant of Stdlib.Buffer that supports skipping some section of the underlying bytestring when doing a write pass.
val create : size:int -> Line.Internals.Line_buffer.tCreate a line buffer with the given initial size.
val with_ppf :
Line.Internals.Line_buffer.t ->
(Stdlib.Format.formatter -> 'a) ->
'awith_ppf buf f gives a view of buf as a formatter to f (and then flushes the formatter to buf).
val add_char : Line.Internals.Line_buffer.t -> char -> unitval add_string : Line.Internals.Line_buffer.t -> string -> unitval add_substring :
Line.Internals.Line_buffer.t ->
string ->
off:int ->
len:int ->
unitval add_line_buffer :
dst:Line.Internals.Line_buffer.t ->
src:Line.Internals.Line_buffer.t ->
unitval lift_write :
len:int ->
write:('a -> into:bytes -> pos:int -> unit) ->
(Line.Internals.Line_buffer.t ->
'a ->
unit)
Progress_engine__.Stdlib_ext.Staged.tval contents :
Line.Internals.Line_buffer.t ->
[ `Clean of string | `Dirty of string ]Reset the write head to the start of the buffer and return a copy of the intervening contents.
val reset : Line.Internals.Line_buffer.t -> unitval current_position :
Line.Internals.Line_buffer.t ->
Line.Internals.Line_buffer.markGet a mark of the current write head in the buffer.
module Span : sig ... endval skip :
Line.Internals.Line_buffer.t ->
Line.Internals.Line_buffer.Span.t ->
unitAdvance over a given span in the buffer.