package biocaml

  1. Overview
  2. Docs
The OCaml Bioinformatics Library

Install

Dune Dependency

Authors

Maintainers

Sources

biocaml-0.11.2.tbz
sha256=fae219e66db06f81f3fd7d9e44717ccf2d6d85701adb12004ab4ae6d3359dd2d
sha512=f6abd60dac2e02777be81ce3b5acdc0db23b3fa06731f5b2d0b32e6ecc9305fe64f407bbd95a3a9488b14d0a7ac7c41c73a7e18c329a8f18febfc8fd50eccbc6

doc/biocaml.unix/Biocaml_unix/Lines/Buffer/index.html

Module Lines.BufferSource

Buffer used to parse strings into lines.

Sourcetype t

The buffer handle.

Sourceexception No_next_line

The exception thrown by next_line_exn.

Sourceval make : ?filename:string -> unit -> t

Make a new empty buffer. The optional filename is used only for error reporting; it should be set to the name of the file, if any, from which you will feed the buffer.

Sourceval feed_line : t -> item -> unit

Feed the parser with a line.

Sourceval feed_string : t -> string -> unit

Feed the parser with an arbitrary string buffer.

Sourceval queued_lines : t -> int

Get the number of lines ready-to-use in the buffer/queue.

Sourceval is_empty : t -> bool

Tell if the parser's buffers are empty or not. For instance, when there is no more content to feed and next_line returns None, is_empty p = true means that the content did not end with a complete line.

Sourceval peek_line : t -> item option

Peek at the next line, without removing it from the buffer.

Sourceval next_line : t -> item option

Get the next line.

Sourceval next_line_exn : t -> item

Get the next line, but throw No_next_line if there is no line to return.

Sourceval current_position : t -> Pos.t

Get the current position in the stream.

Sourceval contents : t -> item list * string option

Return any remaining lines and the unfinished string, without removing them from the buffer.

Sourceval empty : t -> unit

Empty the buffer. Subsequent call to contents will return ([], None).

OCaml

Innovation. Community. Security.