sig
val find_line_end : string -> int -> int -> int
val find_line_start : string -> int -> int -> int
val find_double_line_start : string -> int -> int -> int
val skip_line_ends : string -> int -> int -> int
val fold_lines_p :
('a -> int -> int -> int -> bool -> 'a) ->
'a -> string -> int -> int -> 'a
val fold_lines : ('a -> string -> 'a) -> 'a -> string -> int -> int -> 'a
val iter_lines : (string -> unit) -> string -> int -> int -> unit
val skip_whitespace_left : string -> int -> int -> int
val skip_whitespace_right : string -> int -> int -> int
val fold_header :
?downcase:bool ->
?unfold:bool ->
?strip:bool ->
('a -> string -> string -> 'a) -> 'a -> string -> int -> int -> 'a
val list_header :
?downcase:bool ->
?unfold:bool ->
?strip:bool -> string -> int -> int -> (string * string) list
val scan_header :
?downcase:bool ->
?unfold:bool ->
?strip:bool ->
string -> start_pos:int -> end_pos:int -> (string * string) list * int
val read_header :
?downcase:bool ->
?unfold:bool ->
?strip:bool -> Netstream.in_obj_stream -> (string * string) list
val write_header :
?soft_eol:string ->
?eol:string ->
Netchannels.out_obj_channel -> (string * string) list -> unit
type s_token =
Atom of string
| EncodedWord of ((string * string) * string * string)
| QString of string
| Control of char
| Special of char
| DomainLiteral of string
| Comment
| End
type s_option =
No_backslash_escaping
| Return_comments
| Recognize_encoded_words
type s_extended_token
val get_token : Netmime_string.s_extended_token -> Netmime_string.s_token
val get_decoded_word : Netmime_string.s_extended_token -> string
val get_charset : Netmime_string.s_extended_token -> string
val get_language : Netmime_string.s_extended_token -> string
val get_pos : Netmime_string.s_extended_token -> int
val get_line : Netmime_string.s_extended_token -> int
val get_column : Netmime_string.s_extended_token -> int
val get_length : Netmime_string.s_extended_token -> int
val separates_adjacent_encoded_words :
Netmime_string.s_extended_token -> bool
type mime_scanner
val create_mime_scanner :
specials:char list ->
scan_options:Netmime_string.s_option list ->
?pos:int ->
?line:int -> ?column:int -> string -> Netmime_string.mime_scanner
val get_pos_of_scanner : Netmime_string.mime_scanner -> int
val get_line_of_scanner : Netmime_string.mime_scanner -> int
val get_column_of_scanner : Netmime_string.mime_scanner -> int
val scan_token :
Netmime_string.mime_scanner ->
Netmime_string.s_extended_token * Netmime_string.s_token
val scan_token_list :
Netmime_string.mime_scanner ->
(Netmime_string.s_extended_token * Netmime_string.s_token) list
val scan_structured_value :
string ->
char list -> Netmime_string.s_option list -> Netmime_string.s_token list
val specials_rfc822 : char list
val specials_rfc2045 : char list
val scan_encoded_text_value :
string -> Netmime_string.s_extended_token list
val scan_value_with_parameters :
string -> Netmime_string.s_option list -> string * (string * string) list
type s_param
val param_value : Netmime_string.s_param -> string
val param_charset : Netmime_string.s_param -> string
val param_language : Netmime_string.s_param -> string
val mk_param :
?charset:string -> ?language:string -> string -> Netmime_string.s_param
val print_s_param : Format.formatter -> Netmime_string.s_param -> unit
val scan_value_with_parameters_ep :
string ->
Netmime_string.s_option list ->
string * (string * Netmime_string.s_param) list
val scan_mime_type :
string -> Netmime_string.s_option list -> string * (string * string) list
val scan_mime_type_ep :
string ->
Netmime_string.s_option list ->
string * (string * Netmime_string.s_param) list
val split_mime_type : string -> string * string
exception Line_too_long
val write_value :
?maxlen1:int ->
?maxlen:int ->
?hardmaxlen1:int ->
?hardmaxlen:int ->
?fold_qstring:bool ->
?fold_literal:bool ->
?unused:int Pervasives.ref ->
?hardunused:int Pervasives.ref ->
Netchannels.out_obj_channel -> Netmime_string.s_token list -> unit
val param_tokens :
?maxlen:int ->
(string * Netmime_string.s_param) list -> Netmime_string.s_token list
val split_uri : string -> Netmime_string.s_token list
val scan_multipart_body :
string ->
start_pos:int ->
end_pos:int -> boundary:string -> ((string * string) list * string) list
val scan_multipart_body_and_decode :
string ->
start_pos:int ->
end_pos:int -> boundary:string -> ((string * string) list * string) list
val scan_multipart_body_from_netstream :
Netstream.in_obj_stream ->
boundary:string ->
create:((string * string) list -> 'a) ->
add:('a -> Netstream.in_obj_stream -> int -> int -> unit) ->
stop:('a -> unit) -> unit
val read_multipart_body :
(Netstream.in_obj_stream -> 'a) ->
string -> Netstream.in_obj_stream -> 'a list
val create_boundary : ?random:string list -> ?nr:int -> unit -> string
end