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/Line/index.html

Module Biocaml_unix.LineSource

include module type of Biocaml_base.Line
Sourcetype t = private Base.string

A line is simply a string, possibly empty, that does not contain a newline character. As the name suggests, usually such strings are obtained by reading a file line by line.

Sourceval empty : t
Sourceval parse_string : Base.string -> t Base.list

parse_string s splits s on newline characters, returning the resulting list of lines. If the final line ended with a newline, the last string of the list is empty.

rightmost s returns a pair whose right member is the longest suffix v of s that represents a line, while the possible remainder of s (minus the newline character) is represented in the left member. More formally, if v = s then the left member of the pair is None; otherwise it is Some u where s = u ^ "\n" ^ v.

Sourceval to_string : t -> Base.string
Sourceval of_string_unsafe : Base.string -> t

Return the given string without checking that it is a line. Useful for efficiency reasons if you're certain the given string is a line.

Standard String Operations

Sourceval is_empty : t -> Base.bool
Sourceval lstrip : ?drop:(Base.char -> Base.bool) -> t -> t
Sourceval rstrip : ?drop:(Base.char -> Base.bool) -> t -> t
Sourceval strip : ?drop:(Base.char -> Base.bool) -> t -> t
Sourceval split : t -> on:Base.char -> Base.string Base.list
Sourceval for_all : Base.string -> f:(Base.char -> Base.bool) -> Base.bool
Sourceval append : t -> t -> t
Sourceval concat : ?sep:Base.char -> t Base.list -> t
  • raises [Invalid_arg

    _] if sep = '\n'

S-Expressions

Sourceval t_of_sexp : Base.Sexp.t -> t
Sourceval sexp_of_t : t -> Base.Sexp.t
OCaml

Innovation. Community. Security.