ocaml-core / base / core / extended / lib / shell__line_buffer.mli

The branch 'bash' does not exist.
(** String buffers that automatically get flushed at every line return. *)
open Core.Std

type t

(** [create ~eol f]
    Create a new line buffer where f will be called once on every line.
    Eol is the endline character (it's possible to use a Linebuffer to
    process null separated strings )
*)
val create : ?eol:char -> (string -> unit) -> t

(**
   [flush b] Flushes any pending output to the callback function.
    This causes unfinished newlines to be flushed out so adding
    more characters after flushing might result in there looking as though
    there are more lines than there really were.
*)
val flush : t -> unit

val add_char : t -> char -> unit
val add_string : t -> string -> unit

(** [add_substring b s ofs len] takes [len] characters from offset [ofs] in
   string [s] and appends them at the end of the buffer [b].
*)
val add_substring : t -> string -> pos:int -> len:int -> unit
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.