package line_oriented

  1. Overview
  2. Docs
Library to operate on files made of lines of text

Install

Dune Dependency

Authors

Maintainers

Sources

v1.3.0.tar.gz
sha256=ab6c827ec95e91e2819a953040d61e9183037c847a17953f4647cffb09977db3
md5=8c8c25aac4271fd321c05633633014f5

doc/line_oriented/Line_oriented/index.html

Module Line_orientedSource

Sourcetype filename = string

to make signatures more readable

Sourceval with_in_file : filename -> (in_channel -> 'a) -> 'a

work with open input file

Sourceval to_string : filename -> string

read whole file content

Sourceval with_out_file : filename -> (out_channel -> 'a) -> 'a

work with open output file

Sourceval with_infile_outfile : filename -> filename -> (in_channel -> out_channel -> 'a) -> 'a

work with open input and output files

Sourceval lines_of_file : filename -> string list

read all lines from file

Sourceval rev_lines_of_file : filename -> string list

reverse read all lines from file

Sourceval lines_to_file : filename -> string list -> unit

write all lines to file

Sourceval iter : filename -> (string -> unit) -> unit

iter on lines of file

Sourceval iteri : filename -> (int -> string -> unit) -> unit

iteri on lines of file

Sourceval map : filename -> (string -> 'a) -> 'a list

map on lines of file

Sourceval mapi : filename -> (int -> string -> 'a) -> 'a list

mapi on lines of file

Sourceval rev_map : filename -> (string -> 'a) -> 'a list

reverse map on lines of file

Sourceval fold : filename -> ('a -> string -> 'a) -> 'a -> 'a

fold on lines of file

Sourceval filter : filename -> (string -> bool) -> string list

filter lines of file

Sourceval count : filename -> int

count lines of file

Sourceval length : filename -> int

alias for count

Sourceval save : filename -> 'a -> unit

save fn x: marshal x to file fn

Sourceval restore : filename -> 'a

restore fn: unmarshal value from whole file fn

OCaml

Innovation. Community. Security.