C |
capitalize [Text] |
capitalize t returns t with its first letter upper-cased
|
char [Text] |
char code returns the character corresponding to the given
unicode code-point.
|
check [Text] |
check str checks that str is a valid UTF-8 encoded
string.
|
chunk [Text] |
chunk a b returns the chunk of text between a and
b .
|
code [Text] |
code text returns the unicode code-point of first character of
text .
|
compare [Text] |
Compares two texts according to the current locale
|
concat [Text] |
concat sep l returns the concatenation of all texts contained
in l , separated by sep .
|
contains [Text] |
contains text sub returns whether sub appears in text
|
count [Text] |
count f text returhs the number of characters of text
verifying f
|
D |
decode [Text] |
decode ?encoding str decode the given string encoded in
encoding , which defaults to Encoding.system
|
decode [Encoding_bigarray] |
|
decode [Encoding] |
decode decoder buffer ptr len decodes with decoder bytes at
position ptr in buffer
|
decoder [Encoding] |
Creates a decoder from an encoding-name
|
E |
encode [Text] |
encode ?encoding txt encode the given text with encoding ,
which defaults to Encoding.system plus transliteration.
|
encode [Encoding_bigarray] |
|
encode [Encoding] |
encode decoder buffer ptr len code encodes code with
encoder at position ptr in buffer
|
encoder [Encoding] |
Creates an encoder from an encoding-name
|
ends_with [Text] |
ends_with s suffix returns true iff s ends with
suffix .
|
equal [Encoding] |
equal e1 e2 returns whether e1 and e2 denotes the same
encoding.
|
equal_at [Text] |
equal_at ptr str returns wether ptr points to a substring
equal to str
|
exec [Text_pcre] |
|
exists [Text] |
exists f text returns whether at least one character of text
verify f
|
explode [Text] |
explode txt returns the list of all characters of txt .
|
F |
filter [Text] |
filter text ~ implode (List.filter f (explode text))
|
find [Text] |
find ?from text patt returns a pointer to the first occurrence
of patt in text .
|
fold [Text] |
fold f x text ~ List.fold_left f x (explode text)
|
for_all [Text] |
for_all f text returns whether all characters of text verify
the predicate f
|
G |
get [Text] |
get text n returns the n -th character of text .
|
get_substring [Text_pcre] |
|
get_substring_ofs [Text_pcre] |
|
I |
icompare [Text] |
Compares two texts, case-insensitive
|
implode [Text] |
implode l returns the concatenation of all texts contained in
l .
|
init [Text] |
init n f returns f 0 ^ f 1 ^ ... ^ f (n - 1)
|
is_alnum [Text] |
|
is_alpha [Text] |
|
is_ascii [Text] |
|
is_blank [Text] |
|
is_cntrl [Text] |
|
is_digit [Text] |
|
is_graph [Text] |
|
is_lower [Text] |
|
is_print [Text] |
|
is_punct [Text] |
|
is_space [Text] |
|
is_upper [Text] |
|
is_xdigit [Text] |
|
iter [Text] |
iter f text ~ List.iter f (explode text)
|
L |
lchop [Text] |
lchop t returns t without is first character.
|
length [Text] |
Return the number of unicode character contained in the given
text
|
lines [Text] |
Returns all lines of the given text, without end of line
characters.
|
lower [Text] |
lower t returns the upper-cased version of t .
|
lstrip [Text] |
lstrip ?chars text removes all characters of text which are
part of chars at the left.
|
M |
map [Text] |
map f text ~ implode (List.map f (explode text))
|
move [Text] |
move n ptr moves ptr by n unicode characters.
|
N |
next [Text] |
next ptr if ptr is at the end of text, returns None ,
otherwise, returns Some(ch, ptr') where ch is the character
at current position and ptr' is the pointer to the next
character of the text.
|
O |
offset [Text] |
offset ptr returns the position in bytes of ptr
|
P |
pointer_at [Text] |
pointer_at txt n returns a pointer to the character at
position n in txt .
|
pointer_l [Text] |
Returns a pointer to the left of the given text
|
pointer_r [Text] |
Returns a pointer to the right of the given text
|
position [Text] |
position ptr returns the position in unicode character of ptr
|
prev [Text] |
prev ptr if ptr is at the beginning of text, returns None ,
otherwise, returns Some(ch, ptr') where ptr' points to the
previous character and ch is the character at ptr' .
|
R |
rchop [Text] |
rchop t returns t without is last character.
|
recode_string [Encoding] |
recode_string ~src ~dst str recode str from src encoding
to dst encoding.
|
regexp [Text_pcre] |
|
repeat [Text] |
repeat n text returns text concatened n -times with
itself.
|
replace [Text] |
replace text ~patt ~repl replace all occurences of patt in
text by repl .
|
rev [Text] |
rev t returns the sequence of characters of t in reverse
order.
|
rev_concat [Text] |
rev_concat sep l returns the concatenation of all texts
contained in l , separated by sep .
|
rev_explode [Text] |
rev_explode txt returns the list of all characters of txt ,
in reverse order.
|
rev_filter [Text] |
rev_filter text ~ implode (List.filter f (rev_explode text))
|
rev_find [Text] |
find ?from text patt returns a pointer to the last occurrence
of patt in text .
|
rev_fold [Text] |
fold f text x ~ List.fold_left f x (rev_explode text)
|
rev_implode [Text] |
rev_implode l returns the concatenation of all texts contained
in l , in reverse order.
|
rev_init [Text] |
rev_init n f returns f (n - 1) ^ f 1 ^ ... ^ f 0
|
rev_iter [Text] |
iter f text ~ List.iter f (rev_explode text)
|
rev_map [Text] |
rev_map f text ~ implode (List.rev_map f (explode text))
|
rev_split [Text] |
rev_split ?max text sep split text according to sep in reverse
order.
|
rstrip [Text] |
rstrip ?chars text removes all characters of text which are
part of chars at the right.
|
S |
slice [Text] |
slice text a b returns the text contained in txt between a
and b (exlusive).
|
splice [Text] |
splice text a b repl replace the text between a and b
(exclusive) by repl .
|
split [Text] |
split ?max ?sep text split text according to sep .
|
starts_with [Text] |
starts_with text prefix returns true iff s starts with
prefix .
|
strip [Text] |
strip ?chars text removes all characters of text which are
part of chars at the right and left.
|
sub [Text] |
sub text pos len Returns the sub-text of text starting at
position pos and of length len .
|
system [Encoding] |
The character encoding used by the system
|
T |
to_ascii [Text] |
to_ascii txt returns an approximative ascii version of
txt .
|
transform [Text] |
transform str transforms str in a way such that comparing
two string str1 and str2 transformed with
Pervasives.compare give the same result as comparing them with
Text.compare .
|
U |
uncapitalize [Text] |
capitalize t returns t with its first letter lower-cased
|
upper [Text] |
upper t returns the upper-cased version of t .
|
V |
validate [Text] |
Same as check but raises an exception in case the argument is
not a valid text.
|
W |
words [Text] |
Returns all words of the given text.
|