Index of values

(@) [ExtList]

the new implementation for ( @ ) operator, see List.append.

(@) [ExtLib]
A
add [RefList]

Adds an element at the end - O(n)

add [PMap]

add x y m returns a map containing the same bindings as m, plus a binding of x to y.

add [OptParse.OptParser]

Add an option to the option parser.

add [ExtHashtbl.Hashtbl]
add [DynArray]

add darr v appends v onto darr.

add [Dllist]

add n a Creates a new node containing data a and inserts it into the list after node n.

add_buffer [UTF8.Buf]

add_buffer b1 b2 adds the contents of b2 to b1.

add_buffer [ExtBuffer.Buffer]
add_bytes [ExtBuffer.Buffer]
add_channel [ExtBuffer.Buffer]
add_char [UTF8.Buf]

Add one Unicode character to the buffer.

add_char [ExtBuffer.Buffer]
add_group [OptParse.OptParser]

Add a group to the option parser.

add_int16_be [ExtBuffer.Buffer]
add_int16_le [ExtBuffer.Buffer]
add_int16_ne [ExtBuffer.Buffer]
add_int32_be [ExtBuffer.Buffer]
add_int32_le [ExtBuffer.Buffer]
add_int32_ne [ExtBuffer.Buffer]
add_int64_be [ExtBuffer.Buffer]
add_int64_le [ExtBuffer.Buffer]
add_int64_ne [ExtBuffer.Buffer]
add_int8 [ExtBuffer.Buffer]
add_seq [ExtHashtbl.Hashtbl]
add_seq [ExtBuffer.Buffer]
add_sort [RefList]

Adds an element in a sorted list, using optional comparator or 'compare' as default.

add_string [UTF8.Buf]

Add the UTF-8 string to the buffer.

add_string [ExtBuffer.Buffer]
add_subbytes [ExtBuffer.Buffer]
add_substitute [ExtBuffer.Buffer]
add_substring [ExtBuffer.Buffer]
add_uint16_be [ExtBuffer.Buffer]
add_uint16_le [ExtBuffer.Buffer]
add_uint16_ne [ExtBuffer.Buffer]
add_uint8 [ExtBuffer.Buffer]

add_*int* functions were introduced in OCaml 4.08.0, and are _not_ implemented in extlib for older OCaml versions

add_utf_16be_uchar [ExtBuffer.Buffer]
add_utf_16le_uchar [ExtBuffer.Buffer]
add_utf_8_uchar [ExtBuffer.Buffer]
append [ExtList.List]
append [ExtArray.Array]
append [Enum]

append e1 e2 returns an enumeration that will enumerate over all elements of e1 followed by all elements of e2.

append [DynArray]

append src dst adds all elements of src to the end of dst.

append [Dllist]

append n a Creates a new node containing data a and inserts it into the list after node n.

assoc [ExtList.List]
assoc_opt [ExtList.List]
assq [ExtList.List]
assq_opt [ExtList.List]
at_index [RefList.Index]

Return the element of ref list at the specified index raise Invalid_index if the index is outside 0 ; length-1

B
blit [ExtString.String]
blit [ExtBuffer.Buffer]
blit [ExtArray.Array]
blit [DynArray]

blit src srcidx dst dstidx len copies len elements from src starting with index srcidx to dst starting at dstidx.

C
callback_option [OptParse.Opt]

Make a callback option which takes a single argument.

capitalize [ExtString.String]
capitalize_ascii [ExtString.String]
cast_output [IO]

You can safely transform any output to an unit output in a safe way by using this function.

char_of [UChar]

char_of u returns the Latin-1 representation of u.

chr [UChar]

code n returns the Unicode character with the code number n.

chr_of_uint [UChar]

chr_of_uint n returns the Unicode character of the code number n.

clear [UTF8.Buf]

Empty the buffer, but retains the internal storage which was holding the contents

clear [RefList]

Removes all elements

clear [ExtHashtbl.Hashtbl]
clear [ExtBuffer.Buffer]
clear [DynArray]

remove all elements from the array and resize it to 0.

clone [Enum]

clone e creates a new enumeration that is copy of e.

clone [BitSet]

Same as copy

close_in [IO]

Close the input.

close_out [IO]

Close the output and return its accumulator data.

code [UChar]

code u returns the Unicode code number of u.

combine [ExtList.List]
compact [DynArray]

compact darr ensures that the space allocated by the array is minimal.

compare [UTF8]

Code point comparison by the lexicographic order.

compare [UChar]

compare u1 u2 returns, a value > 0 if u1 has a larger Unicode code number than u2, 0 if u1 and u2 are the same Unicode character, a value < 0 if u1 has a smaller Unicode code number than u2.

compare [ExtString.String]
compare [ExtList.List]

compare cmp [a1; ...; an] [b1; ...; bm] performs a lexicographic comparison of the two input lists, using the same 'a -> 'a -> int interface as Stdlib.compare:

compare [BitSet]

compare s1 s2 compares two bitsets.

compare_index [UTF8]

compare_index s i1 i2 returns a value < 0 if i1 is the position located before i2, 0 if i1 and i2 points the same location, a value > 0 if i1 is the position located after i2.

compare_length_with [ExtList.List]
compare_lengths [ExtList.List]
concat [ExtString.String]
concat [ExtList.List]
concat [ExtArray.Array]
concat [Enum]

concat e returns an enumeration over all elements of all enumerations of e.

concat_map [ExtList.List]
cons [ExtList.List]
conservative_exponential_resizer [DynArray]

conservative_exponential_resizer is an example resizer function which uses the oldlength parameter.

contains [ExtString.String]
contains_from [ExtString.String]
contents [UTF8.Buf]

contents buf returns the contents of the buffer.

contents [ExtBuffer.Buffer]
copy [RefList]

Makes a copy of a ref list - O(1)

copy [ExtString.String]
copy [ExtHashtbl.Hashtbl]
copy [ExtArray.Array]
copy [DynArray]

copy src returns a fresh copy of src, such that no modification of src affects the copy, or vice versa (all new memory is allocated for the copy).

copy [Dllist]

Copy the list attached to the given node and return the copy of the given node.

copy [BitSet]

Copy a bitset : further modifications of first one will not affect the copy.

copy_enum [RefList]

Makes a copy of a enum

copy_list [RefList]

Makes a copy of a list - O(1)

count [Enum]

count e returns the number of remaining elements in e without consuming the enumeration.

count [BitSet]

count s returns the number of bits set in the bitset s.

count_option [OptParse.StdOpt]

Create a counting option which increments its value each time the option is encountered on the command line.

create [UTF8.Buf]

create n creates a buffer with the initial size n-bytes.

create [PMap]

creates a new empty map, using the provided function for key comparison.

create [ExtString.String]
create [ExtHashtbl.Hashtbl]
create [ExtBuffer.Buffer]
create [ExtArray.Array.Floatarray]
create [ExtArray.Array]
create [DynArray]

create() returns a new empty dynamic array.

create [Dllist]

Creates a node.

create [BitSet]

Create an empty bitset with an initial size (in number of bits).

create_float [ExtArray.Array]
create_in [IO]

Fully create an input by giving all the needed functions.

create_matrix [ExtArray.Array]
create_out [IO]

Fully create an output by giving all the needed functions.

D
decode [Base64]

Generic base64 decoding over an input.

decode_string [Base64]

Decode a string encoded into Base64, raise Invalid_char if a character in the input string is not a valid one.

decr_option [OptParse.StdOpt]

Exactly identical to count_option ~dest:dest ~increment:(-1) ().

default [Option]

default x (Some v) returns v and default x None returns x.

default_resizer [DynArray]

The default resizer function the library is using - in this version of DynArray, this is the exponential_resizer but should change in next versions.

delete [DynArray]

delete darr idx deletes the element of darr at idx.

delete_last [DynArray]

delete_last darr deletes the last element of darr.

delete_range [DynArray]

delete_range darr p len deletes len elements starting at index p.

demote [Dllist]

demote n Swaps n with prev n.

diff [BitSet]

diff s t returns s-t.

differentiate [BitSet]

differentiate s t removes the elements of t from s.

differentiate_sym [BitSet]

differentiate_sym s t sets s to the symmetrical difference of the sets s and t.

drop [ExtList.List]

drop n l returns l without the first n elements, or the empty list if l have less than n elements.

drop [Dllist]

Remove node from the list no matter where it is.

drop_bits [IO]

Drop up to 7 buffered bits and restart to next input character.

dropwhile [ExtList.List]

dropwhile f xs returns the list xs with the first elements satisfying the predicate f dropped.

dump [Std]

represent a runtime value as a string.

E
empty [RefList]

Returns a new empty ref list

empty [PMap]

The empty map, using compare as key comparison function.

empty [Global]

Returns an new named empty global.

empty [Enum]

The empty enumeration : contains no element

empty [DynArray]

Return true if the number of elements in the array is 0.

empty [BitSet]

Create an empty bitset of size 0, the bitset will automatically expand when needed.

encode [Base64]

Generic base64 encoding over an output.

encode_string [Base64]

Encode a string into Base64.

ends_with [ExtString.String]

ends_with s x returns true if the string s is ending with x.

enum [RefList]

Returns an enumeration of current elements in the ref list

enum [PMap]

creates an enumeration for this map.

enum [ExtString.String]

Returns an enumeration of the characters of a string.

enum [ExtList.List]

Returns an enumeration of the elements of a list.

enum [ExtHashtbl.Hashtbl]

Return an enumeration of (key,value) pairs of a hashtable.

enum [ExtArray.Array]

Returns an enumeration of the elements of an array.

enum [DynArray]

enum darr returns the enumeration of darr elements.

enum [Dllist]

Create an enum of the list.

enum [BitSet]

enum s returns an enumeration of bits which are set in the bitset s.

eq [UChar]

Equality by code point comparison

equal [ExtString.String]
equal [ExtList.List]

equal eq [a1; ...; an] [b1; ..; bm] holds when the two input lists have the same length, and for each pair of elements ai, bi at the same position we have eq ai bi.

equals [BitSet]

equals s1 s2 returns true if, and only if, all bits values in s1 are the same as in s2.

error [OptParse.OptParser]

Display an error message and exit the program.

escaped [ExtString.String]
exists [RefList]

Return true if an element matches the specified predicate

exists [PMap]

same as mem.

exists [ExtString.String]

exists str sub returns true if sub is a substring of str or false otherwise.

exists [ExtList.List]
exists [ExtHashtbl.Hashtbl]

exists h k returns true is at least one item with key k is found in the hashtable.

exists [ExtArray.Array]

exists p [a1; ...; an] checks if at least one element of the array satisfies the predicate p.

exists2 [ExtList.List]
exists2 [ExtArray.Array]

Same as ExtArray.Array.exists, but for a two-argument predicate.

explode [ExtString.String]

explode s returns the list of characters in the string s.

exponential_resizer [DynArray]

The exponential resizer- The default resizer except when the resizer is being copied from some other darray.

F
fast_count [Enum]

For users worried about the speed of count you can call the fast_count function that will give an hint about count implementation.

fast_sort [ExtList.List]
fast_sort [ExtArray.Array]
fill [OptParse.Formatter]
fill [ExtString.String]
fill [ExtArray.Array]
filter [RefList]

Remove all elements that do not match the specified predicate

filter [ExtList.List]
filter [ExtArray.Array]

filter p a returns all the elements of the array a that satisfy the predicate p.

filter [Enum]

filter f e returns an enumeration over all elements x of e such as f x returns true.

filter [DynArray]
filter_map [ExtList.List]

filter_map f l call (f a0) (f a1).... (f an) where a0..an are the elements of l.

filter_map [Enum]

filter_map f e returns an enumeration over all elements x such as f y returns Some x , where y is an element of e.

filter_map_inplace [ExtHashtbl.Hashtbl]
filteri [ExtList.List]

Same as ExtList.List.filter, but the predicate is applied to the index of the element as first argument (counting from 0), and the element itself as second argument.

finally [Std]

finally fend f x calls f x and then fend() even if f x raised an exception.

find [RefList]

Find the first element matching the specified predicate raise Not_found if no element is found

find [PMap]

find x m returns the current binding of x in m, or raises Not_found if no such binding exists.

find [ExtString.String]

find s x returns the starting index of the string x within the string s or raises Invalid_string if x is not a substring of s.

find [ExtList.List]
find [ExtHashtbl.Hashtbl]
find [ExtArray.Array]

find p a returns the first element of array a that satisfies the predicate p.

find [Enum]

find f e returns the first element x of e such that f x returns true, consuming the enumeration up to and including the found element, or, raises Not_found if no such element exists in the enumeration, consuming the whole enumeration in the search.

find_all [ExtList.List]
find_all [ExtHashtbl.Hashtbl]
find_all [ExtArray.Array]

find_all is another name for ExtArray.Array.filter.

find_default [ExtHashtbl.Hashtbl]

Find a binding for the key, and return a default value if not found

find_exc [RefList]

Same as find but takes an exception to be raised when no element is found as additional parameter

find_exc [ExtList.List]

find_exc p e l returns the first element of l such as p x returns true or raises e if such element as not been found.

find_from [ExtString.String]

find s i x returns the starting index of the string x within the string s (starting search from position i) or raises Invalid_string if no such substring exists.

find_map [ExtList.List]

same as find_map_opt

find_map_exn [ExtList.List]

find_map_exn pred list finds the first element of list for which pred element returns Some r.

find_map_opt [ExtList.List]

same as find_map_exn but returning option

find_opt [ExtList.List]
find_opt [ExtHashtbl.Hashtbl]

Find a binding for the key, or return None if no value is found

find_option [ExtHashtbl.Hashtbl]

compatibility, use find_opt

findi [ExtList.List]

findi p e l returns the first element ai of l along with its index i such that p i ai is true, or raises Not_found if no such element has been found.

findi [ExtArray.Array]

findi p a returns the index of the first element of array a that satisfies the predicate p.

first [RefList]

Returns the first element or raises Empty_list if the ref list is empty

first [ExtList.List]

Returns the first element of the list, or raise Empty_list if the list is empty (similar to hd).

flatten [ExtList.List]
float_callback [OptParse.StdOpt]
float_option [OptParse.StdOpt]
flush [IO]

Flush an output.

flush_bits [IO]

Flush remaining unwritten bits, adding up to 7 bits which values 0.

fold [PMap]

fold f m a computes (f kN dN ... (f k1 d1 a)...), where k1 ... kN are the keys of all bindings in m, and d1 ... dN are the associated data.

fold [ExtHashtbl.Hashtbl]
fold [Enum]

fold f v e returns v if e is empty, otherwise f aN (... (f a2 (f a1 v)) ...) where a1..N are the elements of e.

fold2 [Enum]

fold2 is similar to fold but will fold over two enumerations at the same time until one of the two enumerations ends.

fold2i [Enum]
fold_left [ExtString.String]

fold_left f a s is f (... (f (f a s.[0]) s.[1]) ...) s.[n-1]

fold_left [ExtList.List]
fold_left [ExtArray.Array]
fold_left [DynArray]

fold_left f x darr computes f ( ... ( f ( f (get darr 0) x) (get darr 1) ) ... ) (get darr n-1), similar to Array.fold_left or List.fold_left.

fold_left [Dllist]

Accumulate a value over the entire list.

fold_left2 [ExtList.List]
fold_left_map [ExtList.List]

fold_left_map is a combination of fold_left and map that threads an accumulator through calls to f

fold_right [ExtString.String]

fold_right f s b is f s.[0] (f s.[1] (... (f s.[n-1] b) ...))

fold_right [ExtList.List]
fold_right [ExtArray.Array]
fold_right [DynArray]

fold_right f darr x computes f (get darr 0) (f (get darr 1) ( ... ( f (get darr n-1) x ) ... ) ) similar to Array.fold_right or List.fold_right.

fold_right [Dllist]

Accumulate a value over the entire list.

fold_right2 [ExtList.List]
foldi [PMap]

Same as fold, but the function receives as arguments both the key and the associated value for each binding of the map.

foldi [Enum]
for_all [RefList]

Return true if all elements match the specified predicate

for_all [ExtList.List]
for_all [ExtArray.Array]

for_all p [a1; ...; an] checks if all elements of the array satisfy the predicate p.

for_all2 [ExtList.List]
for_all2 [ExtArray.Array]

Same as ExtArray.Array.for_all, but for a two-argument predicate.

force [Enum]

force e forces the application of all lazy functions and the enumeration of all elements, exhausting the enumeration.

from [Enum]

from next creates an enumeration from the next function.

from_in_channel [IO]
from_in_chars [IO]
from_out_channel [IO]
from_out_chars [IO]
G
get [UTF8]

get s n returns n-th Unicode character of s.

get [Option]

get (Some x) returns x and get None raises No_value.

get [OptParse.Opt]

Get the value of an option.

get [Global]

Get the global value contents - raise Global_not_initialized if not defined.

get [ExtString.String]
get [ExtArray.Array.Floatarray]
get [ExtArray.Array]
get [Enum]

get e returns None if e is empty or Some x where x is the next element of e, in which case the element is removed from the enumeration.

get [DynArray]

get darr idx gets the element in darr at index idx.

get [Dllist]

Given a node, get the data associated with that node.

get_resizer [DynArray]

Get the current resizer function for a given array

H
hash [ExtHashtbl.Hashtbl]
hash_param [ExtHashtbl.Hashtbl]
hd [RefList]

same as first

hd [ExtList.List]

Returns the first element of the list or raise Empty_list if the list is empty.

help_option [OptParse.StdOpt]

help_option () returns the standard help option which displays a usage message and exits the program when encountered on the command line.

I
identity [Std]

the identity function.

implode [ExtString.String]

implode cs returns a string resulting from concatenating the characters in the list cs.

incr_option [OptParse.StdOpt]

Exactly identical to count_option ~dest:dest ~increment:1 ().

indented_formatter [OptParse.Formatter]

Create an "indented" formatter with the given options.

index [RefList.Index]

Return the index (position : 0 starting) of an element in a ref list, using the specified comparator raise Not_found if no element was found

index [ExtString.String]
index_from [ExtString.String]
index_from_opt [ExtString.String]
index_of [RefList.Index]

Return the index (position : 0 starting) of an element in a ref list, using ( = ) for testing element equality raise Not_found if no element was found

index_of [DynArray]

index_of f darr returns the index of the first element x in darr such as f x returns true or raise Not_found if not found.

index_opt [ExtString.String]
inflate [Unzip]

wrap an input using "inflate" decompression algorithm.

inflate_data [Unzip]
inflate_init [Unzip]
init [UTF8]

init len f returns a new string which contains len Unicode characters.

init [ExtString.String]

init l f returns the string of length l with the chars f 0 , f 1 , f 2 ...

init [ExtList.List]

Similar to Array.init, init n f returns the list containing the results of (f 0),(f 1)....

init [ExtArray.Array]
init [Enum]

init n f creates a new enumeration over elements f 0, f 1, ..., f (n-1)

init [DynArray]

init n f returns an array of n elements filled with values returned by f 0 , f 1, ... f (n-1).

input [IO]

input i b p l reads up to l characters from the given input, storing them in buffer b, starting at character number p.

input_all [Std]

Return the whole contents of an input channel as a single string.

input_bits [IO]

Read bits from an input

input_bytes [IO]

Create an input that will read from a byte sequence.

input_channel [IO]

Create an input that will read from a channel.

input_chars [Std]

Returns an enumeration over characters of an input channel.

input_enum [IO]

Create an input that will read from an enum.

input_file [Std]

returns the data of a given filename.

input_lines [Std]

Returns an enumeration over lines of an input channel, as read by the input_line function.

input_list [Std]

Returns the list of lines read from an input channel.

input_string [IO]

Create an input that will read from a string.

insert [DynArray]

insert darr idx v inserts v into darr at index idx.

int_callback [OptParse.StdOpt]

int_callback ?metavar f returns an option which takes a single integer argument and calls f with that argument when encountered on the command line.

int_of_uchar [UChar]

Alias of uint_code

int_option [OptParse.StdOpt]

int_option ?default ?metavar () returns an option which takes a single integer argument.

inter [BitSet]

inter s t returns the intersection of sets s and t.

intersect [BitSet]

intersect s t sets s to the intersection of the sets s and t.

is_empty [RefList]

Return true if a ref list is empty

is_empty [PMap]

returns true if the map is empty.

is_empty [Enum]

is_empty e returns true if e does not contains any element.

is_none [Option]

is_none None returns true otherwise it returns false.

is_randomized [ExtHashtbl.Hashtbl]
is_set [OptParse.Opt]

Find out if the option has a value (either by default or from the command line).

is_set [BitSet]

is_set s n returns true if nth-bit in the bitset s is set, or false otherwise.

is_some [Option]

is_some (Some x) returns true otherwise it returns false.

isdef [Global]

Return true if the global value has been set.

iter [UTF8]

iter f s applies f to all Unicode characters in s.

iter [RefList]

Apply the given function to all elements of the ref list, in respect with the order of the list

iter [PMap]

iter f m applies f to all bindings in map m.

iter [ExtString.String]
iter [ExtList.List]
iter [ExtHashtbl.Hashtbl]
iter [ExtArray.Array]
iter [Enum]

iter f e calls the function f with each elements of e in turn.

iter [DynArray]

iter f darr calls the function f on every element of darr.

iter [Dllist]

iter f n Apply f to every element in the list, starting at n.

iter2 [ExtList.List]
iter2 [ExtArray.Array]

Array.iter2 f [|a1; ...; an|] [|b1; ...; bn|] performs calls f a1 b1; ...; f an bn in that order.

iter2 [Enum]

iter2 f e1 e2 calls the function f with the next elements of e and e2 repeatedly until one of the two enumerations ends.

iter2i [Enum]
iteri [ExtString.String]

Call f i s.[i] for every position i in string

iteri [ExtList.List]

iteri f l will call (f 0 a0);(f 1 a1) ... (f n an) where a0..an are the elements of the list l.

iteri [ExtArray.Array]
iteri [Enum]
iteri [DynArray]

iteri f darr calls the function f on every element of darr.

J
join [ExtString.String]

Same as concat

junk [Enum]

junk e removes the first element from the enumeration, if any.

K
keys [ExtHashtbl.Hashtbl]

Return an enumeration of all the keys of a hashtable.

L
last [UTF8]

The position of the head of the last Unicode character.

last [RefList]

Returns the last element - O(n) or raises Empty_list if the ref list is empty

last [ExtList.List]

Returns the last element of the list, or raise Empty_list if the list is empty.

last [DynArray]

last darr returns the last element of darr.

lchop [ExtString.String]

Returns the same string but without the first character.

length [UTF8]

length s returns the number of Unicode characters contained in s

length [RefList]

Returns the number of elements - O(n)

length [ExtString.String]
length [ExtList.List]
length [ExtHashtbl.Hashtbl]

Return the number of elements inserted into the Hashtbl (including duplicates)

length [ExtBuffer.Buffer]
length [ExtArray.Array.Floatarray]
length [ExtArray.Array]
length [DynArray]

Return the number of elements in the array.

length [Dllist]

Returns the length of the list.

look [UTF8]

look s i returns the Unicode character of the location i in the string s.

lowercase [ExtString.String]
lowercase_ascii [ExtString.String]
M
make [OptParse.OptParser]

Creates a new option parser with the given options.

make [ExtString.String]
make [ExtList.List]

Similar to String.make, make n x returns a * list containing n elements x.

make [ExtArray.Array]
make [Enum]

This function creates a fully defined enumeration.

make [DynArray]

make count returns an array with some memory already allocated so up to count elements can be stored into it without resizing.

make_decoding_table [Base64]

Create a valid decoding table from an encoding one.

make_float [ExtArray.Array]
make_matrix [ExtArray.Array]
map [RefList]

Apply a function to all elements and return the ref list constructed with the function returned values

map [PMap]

map f m returns a map with same domain as m, where the associated value a of all bindings of m has been replaced by the result of the application of f to a.

map [Option]

map f (Some x) returns Some (f x) and map None returns None.

map [ExtString.String]

map f s returns a string where all characters c in s have been replaced by f c.

map [ExtList.List]
map [ExtHashtbl.Hashtbl]

map f x creates a new hashtable with the same keys as x, but with the function f applied to all the values

map [ExtArray.Array]
map [Enum]

map f e returns an enumeration over (f a1, f a2, ... , f aN) where a1...N are the elements of e.

map [DynArray]

map f darr applies the function f to every element of darr and creates a dynamic array from the results - similar to List.map or Array.map.

map [Dllist]

Allocate a new list, with entirely new nodes, whose values are the transforms of the values of the original list.

map2 [ExtList.List]
map2 [ExtArray.Array]

Array.map2 f [|a1; ...; an|] [|b1; ...; bn|] creates new array [|f a1 b1; ...; f an bn|].

map_default [Option]

map_default f x (Some v) returns f v and map_default f x None returns x.

map_list [RefList]

Apply a function to all elements and return the list constructed with the function returned values

mapi [PMap]

Same as map, but the function receives as arguments both the key and the associated value for each binding of the map.

mapi [ExtString.String]

map f s returns a string where all characters c in s have been replaced by f i s.[i].

mapi [ExtList.List]

mapi f l will build the list containing (f 0 a0);(f 1 a1) ... (f n an) where a0..an are the elements of the list l.

mapi [ExtArray.Array]
mapi [Enum]

mapi is similar to map except that f is passed one extra argument which is the index of the element in the enumeration, starting from 0.

mapi [DynArray]

mapi f darr applies the function f to every element of darr and creates a dynamic array from the results - similar to List.mapi or Array.mapi.

may [Option]

may f (Some x) calls f x and may f None does nothing.

mem [PMap]

mem x m returns true if m contains a binding for x, and false otherwise.

mem [ExtList.List]
mem [ExtHashtbl.Hashtbl]
mem [ExtArray.Array]

mem m a is true if and only if m is equal to an element of a.

mem_assoc [ExtList.List]
mem_assq [ExtList.List]
memq [ExtList.List]
memq [ExtArray.Array]

Same as ExtArray.Array.mem but uses physical equality instead of structural equality to compare array elements.

merge [ExtList.List]
move [UTF8]

move s i n returns n-th Unicode character after i if n >= 0, n-th Unicode character before i if n < 0.

N
name [Global]

Retrieve the name of a global.

next [UTF8]

next s i returns the position of the head of the Unicode character located immediately after i.

next [Enum]

next e returns the next element of e (and removes it from enumeration).

next [Dllist]

Given a node, get the next element in the list after the node.

npop [RefList]

Removes and returns the n first elements or raises Empty_list if the ref list does not contain enough elements

nread [IO]

nread i n reads a byte sequence of size up to n from an input.

nread_string [IO]

as nread, but reads a string.

nsplit [ExtString.String]

nsplit s sep splits the string s into a list of strings which are separated by sep.

nth [UTF8]

nth s n returns the position of the n-th Unicode character.

nth [ExtList.List]

nth l n returns the n-th element of the list l or raise Invalid_index is the index is outside of l bounds.

nth [ExtBuffer.Buffer]
nth_opt [ExtList.List]
nwrite [IO]

Write a byte sequence to an output.

nwrite_string [IO]

Write a string to an output.

O
of_array [DynArray]

of_array arr returns an array with the elements of arr in it in order.

of_char [UChar]

of_char c returns the Unicode character of the Latin-1 character c

of_char [ExtString.String]

Returns a string containing one given character.

of_enum [RefList]

Creates a ref list from an enumeration

of_enum [PMap]

creates a map from an enumeration, using the specified function for key comparison or compare by default.

of_enum [ExtString.String]

Creates a string from a character enumeration.

of_enum [ExtList.List]

Build a list from an enumeration.

of_enum [ExtHashtbl.Hashtbl]

Create a hashtable from a (key,value) enumeration.

of_enum [ExtArray.Array]

Build an array from an enumeration.

of_enum [DynArray]

of_enum e returns an array that holds, in order, the elements of e.

of_enum [Dllist]

Create a dllist from an enum.

of_float [ExtString.String]

Returns the string representation of an float.

of_int [ExtString.String]

Returns the string representation of an int.

of_list [RefList]

Creates a ref list from a list - O(1)

of_list [ExtArray.Array]
of_list [DynArray]

of_list lst returns a dynamic array with the elements of lst in it in order.

of_list [Dllist]

Converts from a normal list to a Dllist and returns the first node.

of_seq [ExtString.String]
of_seq [ExtList.List]
of_seq [ExtHashtbl.Hashtbl]
of_seq [ExtBuffer.Buffer]
of_seq [ExtArray.Array]
opt [OptParse.Opt]

Get the value of an option as an optional value.

opt [Global]

Return None if the global is undefined, else Some v where v is the current global value contents.

out_of_range [UTF8]

out_of_range s i tests whether i is a position inside of s.

output [IO]

output o b p l writes up to l characters from byte sequence b, starting at offset p.

output_bits [IO]

Write bits to an output

output_buffer [ExtBuffer.Buffer]
output_bytes [IO]

Create an output that will write into a byte sequence in an efficient way.

output_channel [IO]

Create an output that will write into a channel.

output_enum [IO]

Create an output that will write into an enum.

output_file [Std]

creates a filename, write text into it and close it.

output_string [IO]

Create an output that will write into a string in an efficient way.

output_strings [IO]

Create an output that will write into a string in an efficient way.

P
parse [OptParse.OptParser]

Parse arguments as if the arguments args.(first), args.(first+1), ..., args.(last) had been given on the command line.

parse_argv [OptParse.OptParser]

Parse all the arguments in Sys.argv.

partition [ExtList.List]
partition [ExtArray.Array]

partition p a returns a pair of arrays (a1, a2), where a1 is the array of all the elements of a that satisfy the predicate p, and a2 is the array of all the elements of a that do not satisfy p.

peek [Enum]

peek e returns None if e is empty or Some x where x is the next element of e.

pipe [IO]

Create a pipe between an input and an ouput.

pop [RefList]

Removes and returns the first element or raises Empty_list if the ref list is empty

pos_in [IO]

Create an input that provide a count function of the number of Bytes.t read from it.

pos_out [IO]

Create an output that provide a count function of the number of Bytes.t written through it.

prepend [Dllist]

prepend n a Creates a new node containing data a and inserts it into the list before node n.

prerr_bool [Std]

Print a boolean to stderr.

prev [UTF8]

prev s i returns the position of the head of the Unicode character located immediately before i.

prev [Dllist]

Given a node, get the previous element in the list before the node.

print [Std]

print the representation of a runtime value on stdout.

print_bool [Std]

Print a boolean to stdout.

printf [IO]

The printf function works for any output.

promote [Dllist]

promote n Swaps n with next n.

push [RefList]

Adds an element at the head - O(1)

push [Enum]

push e x will add x at the beginning of e.

put [BitSet]

put s v n sets the nth-bit in the bitset s to v.

R
randomize [ExtHashtbl.Hashtbl]
rchop [ExtString.String]

Returns the same string but without the last character.

rcontains_from [ExtString.String]
read [IO]

Read a single char from an input or raise No_more_input if no input available.

read_all [IO]

read all the contents of the input until No_more_input is raised.

read_bits [IO]

Read up to 31 bits, raise Bits_error if n < 0 or n > 31

read_byte [IO]

Read an unsigned 8-bit integer.

read_bytes [IO]

Read a null-terminated byte sequence.

read_double [IO.BigEndian]
read_double [IO]

Read an IEEE double precision floating point value (64 bits).

read_float32 [IO.BigEndian]
read_float32 [IO]

Read an IEEE single precision floating point value (32 bits).

read_i16 [IO.BigEndian]
read_i16 [IO]

Read a signed 16-bit word.

read_i31 [IO.BigEndian]
read_i31 [IO]

Read a signed 32-bit integer.

read_i32 [IO.BigEndian]
read_i32 [IO]

Deprecated, same as read_i31

read_i32_as_int [IO.BigEndian]
read_i32_as_int [IO]

Read a signed 32-bit integer, represented as OCaml integer, wrapping around 31-bit int on 32-bit architecture

read_i64 [IO.BigEndian]
read_i64 [IO]

Read a signed 64-bit integer as an OCaml int64.

read_line [IO]

Read a LF or CRLF terminated string.

read_real_i32 [IO.BigEndian]
read_real_i32 [IO]

Read a signed 32-bit integer as an OCaml int32.

read_signed_byte [IO]

Read an signed 8-bit integer.

read_string [IO]

Read a null-terminated string.

read_ui16 [IO.BigEndian]
read_ui16 [IO]

Read an unsigned 16-bit word.

really_input [IO]

really_input i b p l reads exactly l characters from the given input, storing them in the buffer b, starting at position p.

really_nread [IO]

really_nread i n reads a byte sequence of exactly n characters from the input.

really_nread_string [IO]

as really_nread, but reads a string.

really_output [IO]

really_output o b p l writes exactly l characters from byte sequence b onto the the output, starting with the character at offset p.

remove [RefList]

Remove an element from the ref list raise Not_found if the element is not found

remove [PMap]

remove x m returns a map containing the same bindings as m, except for x which is unbound in the returned map.

remove [ExtList.List]

remove l x returns the list l without the first element x found or returns l if no element is equal to x.

remove [ExtHashtbl.Hashtbl]
remove [Dllist]

Remove node from the list no matter where it is.

remove_all [RefList]

Remove all elements equal to the specified element from the ref list

remove_all [ExtList.List]

remove_all l x is similar to remove but removes all elements that are equal to x and not only the first one.

remove_all [ExtHashtbl.Hashtbl]

Remove all bindings for the given key

remove_assoc [ExtList.List]
remove_assq [ExtList.List]
remove_at [RefList.Index]

Remove the element at the specified index raise Invalid_index if the index is outside 0 ; length-1

remove_if [RefList]

Remove the first element matching the specified predicate raise Not_found if no element has been removed

remove_if [ExtList.List]

remove_if cmp l is similar to remove, but with cmp used instead of ( = ).

replace [ExtString.String]

replace ~str ~sub ~by returns a tuple constisting of a boolean and a string where the first occurrence of the string sub within str has been replaced by the string by.

replace [ExtHashtbl.Hashtbl]
replace_chars [ExtString.String]

replace_chars f s returns a string where all chars c of s have been replaced by the string returned by f c.

replace_seq [ExtHashtbl.Hashtbl]
reset [UTF8.Buf]

Empty the buffer and de-allocate the internal storage.

reset [ExtHashtbl.Hashtbl]
reset [ExtBuffer.Buffer]
rev [RefList]

Reverses the ref list - O(n)

rev [ExtList.List]
rev [ExtArray.Array]

New functions

rev [Dllist]

List reversal.

rev_append [ExtList.List]
rev_drop [Dllist]

Remove node from the list no matter where it is.

rev_enum [Dllist]

Create a reverse enum of the list.

rev_in_place [ExtArray.Array]

In-place array reversal.

rev_map [ExtList.List]
rev_map2 [ExtList.List]
rfind [RefList]

Find the first element in the reversed ref list matching the specified predicate raise Not_found if no element is found

rfind [ExtList.List]

rfind p l returns the last element x of l such as p x returns true or raises Not_found if such element as not been found.

rindex [ExtString.String]
rindex_from [ExtString.String]
rindex_from_opt [ExtString.String]
rindex_opt [ExtString.String]
S
scanf [IO]

The scanf function works for any input.

seeded_hash [ExtHashtbl.Hashtbl]
seeded_hash_param [ExtHashtbl.Hashtbl]
set [RefList.Index]

Change the element at the specified index raise Invalid_index if the index is outside 0 ; length-1

set [OptParse.Opt]

Set the value of an option.

set [Global]

Set the global value contents.

set [ExtString.String]
set [ExtArray.Array.Floatarray]
set [ExtArray.Array]
set [DynArray]

set darr idx v sets the element of darr at index idx to value v.

set [Dllist]

Given a node, set the data associated with that node.

set [BitSet]

set s n sets the nth-bit in the bitset s to true.

set_resizer [DynArray]

Change the resizer for this array.

skip [Dllist]

skip n i Return the node that is i nodes after node n in the list.

slice [ExtString.String]

slice ?first ?last s returns a "slice" of the string which corresponds to the characters s.[first], s.[first+1], ..., s[last-1].

sort [RefList]

Sort elements using the specified comparator or compare as default comparator

sort [ExtList.List]

Sort the list using optional comparator (by default compare).

sort [ExtArray.Array]
sort_uniq [ExtList.List]

Same as ExtList.List.sort, but also remove duplicates.

splice [Dllist]

splice n1 n2 Connects n1 and n2 so that next n1 == n2 && prev n2 == n1.

split [ExtString.String]

split s sep splits the string s between the first occurrence of sep.

split [ExtList.List]
split_nth [ExtList.List]

split_nth n l returns two lists l1 and l2, l1 containing the first n elements of l and l2 the others.

split_on_char [ExtString.String]
stable_sort [ExtList.List]
stable_sort [ExtArray.Array]
starts_with [ExtString.String]

starts_with s x return true if s is starting with x.

stats [ExtHashtbl.Hashtbl]
step_resizer [DynArray]

The stepwise resizer- another example of a resizer function, this time of a parameterized resizer.

store_const [OptParse.StdOpt]

store_const ?default const returns a flag option which stores the constant value const when the option is encountered on the command line.

store_false [OptParse.StdOpt]

store_false () returns an option which is set to false when it is encountered on the command line.

store_true [OptParse.StdOpt]

store_true () returns an option which is set to true when it is encountered on the command line.

str_callback [OptParse.StdOpt]
str_decode [Base64]

erroneous interface, kept for compatibility use decode_string instead

str_encode [Base64]

erroneous interface, kept for compatibility use encode_string instead

str_option [OptParse.StdOpt]
string_of_char [Std]

creates a string from a char.

strip [ExtString.String]

Returns the string without the chars if they are at the beginning or at the end of the string.

sub [ExtString.String]
sub [ExtBuffer.Buffer]
sub [ExtArray.Array]
sub [DynArray]

sub darr start len returns an array holding the subset of len elements from darr starting with the element at index idx.

substring [UTF8]

substring s i len returns the substring made of the Unicode locations i to i + len - 1 inclusive.

sym_diff [BitSet]

sym_diff s t returns the symmetrical difference of s and t.

T
take [ExtList.List]

take n l returns up to the n first elements from list l, if available.

takewhile [ExtList.List]

takewhile f xs returns the first elements of list xs which satisfy the predicate f.

titled_formatter [OptParse.Formatter]

Creates a titled formatter which is quite similar to the indented formatter.

tl [RefList]

Returns a ref list containing the same elements but without the first one or raises Empty_list if the ref list is empty

tl [ExtList.List]

Returns the list without its first elements or raise Empty_list if the list is empty.

to_array [DynArray]

to_array darr returns the elements of darr in order as an array.

to_bytes [ExtBuffer.Buffer]
to_float [ExtString.String]

Returns the float represented by the given string or raises Invalid_string if the string does not represent a float.

to_int [ExtString.String]

Returns the integer represented by the given string or raises Invalid_string if the string does not represent an integer.

to_list [RefList]

Returns the current elements as a list - O(1)

to_list [ExtArray.Array]
to_list [DynArray]

to_list darr returns the elements of darr in order as a list.

to_list [Dllist]

Converts a dllist to a normal list.

to_seq [ExtString.String]

*_seq functions were introduced in OCaml 4.07.0, and are _not_ implemented in extlib for older OCaml versions

to_seq [ExtList.List]

*_seq functions were introduced in OCaml 4.07.0, and are _not_ implemented in extlib for older OCaml versions

to_seq [ExtHashtbl.Hashtbl]

*_seq functions were introduced in OCaml 4.07.0, and are _not_ implemented in extlib for older OCaml versions

to_seq [ExtBuffer.Buffer]

*_seq functions were introduced in OCaml 4.07.0, and are _not_ implemented in extlib for older OCaml versions

to_seq [ExtArray.Array]

*_seq functions were introduced in OCaml 4.07.0, and are _not_ implemented in extlib for older OCaml versions

to_seq_keys [ExtHashtbl.Hashtbl]
to_seq_values [ExtHashtbl.Hashtbl]
to_seqi [ExtString.String]
to_seqi [ExtBuffer.Buffer]
to_seqi [ExtArray.Array]
toggle [BitSet]

toggle s n changes the nth-bit value in the bitset s.

transform [RefList]

transform all elements in the ref list using a function.

trim [ExtString.String]

Return a copy of the argument, without leading and trailing whitespace.

truncate [ExtBuffer.Buffer]
U
uchar_of_int [UChar]

Alias of chr_of_uint

uint_code [UChar]

uint_code u returns the Unicode code number of u.

uncapitalize [ExtString.String]
uncapitalize_ascii [ExtString.String]
undef [Global]

Reset the global value contents to undefined.

union [BitSet]

union s t return the union of sets s and t.

unique [Std]

returns an unique identifier every time it is called.

unique [ExtList.List]

unique cmp l returns the list l without any duplicate element.

unite [BitSet]

unite s t sets s to the union of the sets s and t.

unsafe_chr_of_uint [UChar]

Unsafe version of UChar.chr_of_uint.

unsafe_get [ExtArray.Array.Floatarray]
unsafe_get [ExtArray.Array]
unsafe_get [DynArray]
unsafe_set [ExtArray.Array.Floatarray]
unsafe_set [ExtArray.Array]
unsafe_set [DynArray]
unset [BitSet]

unset s n sets the nth-bit in the bitset s to false.

uppercase [ExtString.String]
uppercase_ascii [ExtString.String]
usage [OptParse.OptParser]

Display the usage message to the channel chn (default is Pervasives.stdout) and return.

V
validate [UTF8]

validate s Succeeds if s is valid UTF-8, otherwise raises Malformed_code.

value_option [OptParse.Opt]

Make an option which takes a single argument.

values [ExtHashtbl.Hashtbl]

Return an enumeration of all the values of a hashtable.

version_option [OptParse.StdOpt]

version_option f returns the standard version option which displays the string returned by f () (and nothing else) on standard output and exits.

W
wrap [OptParse.Formatter]

wrap text width reflows the given text paragraph into lines of width at most width (lines may exceed this if the are single words that exceed this limit).

write [IO]

Write a single char to an output.

write_bits [IO]

Write up to 31 bits represented as a value, raise Bits_error if nbits < 0 or nbits > 31 or the value representation excess nbits.

write_byte [IO]

Write an unsigned 8-bit byte.

write_bytes [IO]

Write a byte sequence and append an null character.

write_double [IO.BigEndian]
write_double [IO]

Write an IEEE double precision floating point value (64 bits).

write_float32 [IO.BigEndian]
write_float32 [IO]

Write an IEEE single precision floating point value (32 bits).

write_i16 [IO.BigEndian]
write_i16 [IO]

Write a signed 16-bit word.

write_i31 [IO.BigEndian]
write_i31 [IO]

Write a signed 31-bit integer as 4 bytes.

write_i32 [IO.BigEndian]
write_i32 [IO]

Write a signed 32-bit integer.

write_i64 [IO.BigEndian]
write_i64 [IO]

Write an OCaml int64.

write_line [IO]

Write a line and append a LF (it might be converted to CRLF on some systems depending on the underlying IO).

write_real_i32 [IO.BigEndian]
write_real_i32 [IO]

Write an OCaml int32.

write_string [IO]

Write a string and append an null character.

write_ui16 [IO.BigEndian]
write_ui16 [IO]

Write an unsigned 16-bit word.