module Mapred_fields:sig
..end
val text_field_range : ?pos:int ->
?len:int -> ?sep:char -> ?field:int -> ?num:int -> string -> int * int
let (p,l) = text_field_range s
: Extracts a field from s
, and returns
in p
the byte position where the field begins, and in l
the
byte length. This means one can get the contents of the field with
String.sub s p l
.
By default, the first field is selected.
If several fields are extracted, p
is the position where the
first field starts, and p+l-1
is the position where the last
field ends.
pos
and len
: These arguments may restrict the part of s
where to extract fieldssep
: The separator character, by default TABfield
: Which field to extract. This number counts from 1.
Defaults to 1.num
: How many fields to extract. Defaults to 1.val text_field : ?pos:int ->
?len:int -> ?sep:char -> ?field:int -> ?num:int -> string -> string
text_field_range
, but returns the contents and not the rangeval text_fields_range : ?pos:int ->
?len:int -> ?sep:char -> ?field:int -> ?num:int -> string -> (int * int) list
text_field_range
, but returns the ranges (p,l)
for each
field separatelyval text_fields : ?pos:int ->
?len:int -> ?sep:char -> ?field:int -> ?num:int -> string -> string list
text_field_range
, but returns the contents of each fieldval var_field_range : ?pos:int -> ?len:int -> ?field:int -> string -> int * int
let (p,l) = var_field_range s
: Extracts a field from s
, and returns
in p
the byte position where the field begins, and in l
the
byte length. This means one can get the contents of the field with
String.sub s p l
.
By default, the first field is selected.
pos
and len
: These arguments may restrict the part of s
where to extract fieldsfield
: Which field to extract. This number counts from 1.
Defaults to 1.val var_field : ?pos:int -> ?len:int -> ?field:int -> string -> string
var_field_range
, but returns the contents and not the rangeval var_fields_range : ?pos:int -> ?len:int -> ?field:int -> ?num:int -> string -> (int * int) list
var_field_range
, but returns the ranges (p,l)
for each
field separatelyval var_fields : ?pos:int -> ?len:int -> ?field:int -> ?num:int -> string -> string list
var_field_range
, but returns the contents of each fieldval var_concat : string list -> string
val escape : string -> string
val unescape : string -> string
val encode_alt64 : string -> string
val decode_alt64 : string -> string
The alphabet is chosen such that
alt64(x) > alt64(y) <=> x > y