1
(* $Id: uLine.mli,v 1.4 2004/04/14 18:11:07 yori Exp $ *)
2
(* Copyright 2003 Yamagata Yoriyuki. distributed with LGPL *)
4
(** Line I/O, conversion of line separators. *)
8
- [`CR] specifies carriage return.
9
- [`LF] specifies linefeed.
10
- [`CRLF] specifies the sequence of carriage return and linefeed.
11
- [`NEL] specifies next line (\u0085).
12
- [`LS] specifies Unicode line separator (\u2028).
13
- [`PS] specifies Unicode paragraph separator (\u2029). *)
22
(** [new input separator input_obj] creates the new input channel object
23
{!OOChannel.obj_input_channel} which reads from [input_obj] and
24
converts line separators (all of CR, LF, CRLF, NEL, LS, PS) to
26
class input : separator ->
27
UChar.t #obj_input_channel -> [UChar.t] obj_input_channel
29
(** [new output separator output_obj] creates the new output channel
30
object {!OOChannel.obj_output_channel} which receives Unicode characters
31
and converts line separators (all of CR, LF, CRLF, NEL, LS, PS) to
33
class output : separator ->
34
UChar.t #obj_output_channel -> [UChar.t] obj_output_channel
36
module type Type = sig
40
(** [new input_line input_obj] creates the new input channel object
41
{!OOChannel.obj_input_channel} which reads Unicode characters
42
from [input_obj] and output lines. All of CR, LF, CRLF, NEL, LS, PS,
43
as well as FF (formfeed) are recognised as a line separator. *)
44
class input_line : UChar.t #obj_input_channel -> [text] obj_input_channel
46
(** [new output_line ~sp output_obj] create the new output channel object
47
{!OOChannel.obj_output_channel} which output each line to [output_obj]
48
using [sp] as a line separator.
49
If [sp] is omitted, linefeed (LF) is used. *)
50
class output_line : ?sp:separator ->
51
UChar.t #obj_output_channel -> [text] obj_output_channel
55
module Make : functor (Text : UnicodeString.Type) ->
56
(Type with type text = Text.t)