package biocaml
Install
Dune Dependency
Authors
Maintainers
Sources
md5=486aeb3e552dabae85839e2af30d6c52
sha512=4ed2df0b7cbd80bd6e29bd8fee9d2dacd9379ad0f4ff142bd8e16ade3f1507f6cc7cbe4c614943b8feb8fa4705935695cb458606b0da813dbf255b1e566a43cf
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.