package biocaml
Install
Dune Dependency
Authors
Maintainers
Sources
md5=e292efa2f61fec33dad63ec897106f59
sha512=35519bf3b1e67a9191ef9bb74eba0dae941e0d05bad89076a36f507dc5c2d105a03c1c917d5a3f7ed9d1da4acbf3199582f78c308aa2a5a22c21f743945c852b
doc/biocaml.base/Biocaml_base/Line/index.html
Module Biocaml_base.Line
Source
Single line of text. See also Lines
.
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.
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
.
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.