(@) [ExtList] |
the new implementation for ( @ ) operator, see
List.append .
|
A | |
add [RefList] |
adds an element at the end - O(n)
|
add [ExtHashtbl.Hashtbl] | |
add [DynArray] | add darr v appends v onto darr .
|
add_buffer [UTF8.Buf] | add_buffer b1 b2 adds the contents of b2 to b1 .
|
add_char [UTF8.Buf] |
Add one Unicode character to the 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.
|
append [ExtList.List] | |
append [DynArray] | append src dst adds all elements of src to the end of dst .
|
append [Enum] | append e1 e2 returns an enumeration that will enumerate over all
elements of e1 followed by all elements of e2 .
|
assoc [ExtList.List] | |
assq [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 [DynArray] | blit src srcidx dst dstidx len copies len elements from src
starting with index srcidx to dst starting at dstidx .
|
C | |
capitalize [ExtString.String] | |
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] | |
clone [BitSet] |
Clone a bitset : further modifications of first one will not affect the
clone.
|
clone [Enum] | clone e creates a new enumeration that is copy of e .
|
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 [BitSet] | compare s1 s2 compare 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 .
|
concat [ExtString.String] | |
concat [ExtList.List] | |
concat [Enum] | concat e returns an enumeration over all elements of all enumerations
of e .
|
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.
|
copy [RefList] |
makes a copy of a ref list - O(1)
|
copy [ExtString.String] | |
copy [ExtHashtbl.Hashtbl] | |
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_enum [RefList] |
makes a copy of a enum
|
copy_list [RefList] |
makes a copy of a list - O(1)
|
count [BitSet] | count s returns the number of bits set in the bitset s .
|
count [Enum] | count e returns the number of remaining elements in e without
consuming the enumeration.
|
create [UTF8.Buf] | create n creates the buffer with the initial size n -bytes.
|
create [ExtString.String] | |
create [ExtHashtbl.Hashtbl] | |
create [DynArray] | create() returns a new empty dynamic array.
|
create [BitSet] |
Create an empty bitset with an initial size (in number of bits).
|
D | |
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 .
|
E | |
empty [RefList] |
returns a new empty ref list
|
empty [Global] |
returns an new named empty global.
|
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 automaticaly expands
when needed.
|
empty [Enum] |
The empty enumeration : contains no element
|
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 [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] |
returns an enumeration of (key,value) pairs of an hashtable.
|
enum [DynArray] | enum darr returns the enumeration of darr elements.
|
enum [BitSet] | enum s return an enumeration of bit indexed which are set
in the bitset s .
|
eq [UChar] |
Equality by code point comparison
|
equals [BitSet] | equals s1 s2 return true if all bits value in s1 are same as s2.
|
escaped [ExtString.String] | |
exists [RefList] |
tells if an element match the specified
predicate
|
exists [ExtList.List] | |
exists [ExtHashtbl.Hashtbl] | exists h k returns true is at least one item with key k is
found in the hashtable.
|
exists2 [ExtList.List] | |
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.
|
fill [ExtString.String] | |
filter [RefList] |
remove all elements that does not match the
specified predicate
|
filter [ExtList.List] | |
filter [Enum] | filter f e returns an enumeration over all elements x of e such
as f x returns true .
|
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 .
|
find [RefList] |
find the first element that match
the specified predicate
raise Not_found if no element is found
|
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 [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_default [ExtHashtbl.Hashtbl] |
find a binding for the key, and return a default
value if not found
|
find_exc [RefList] |
same as find but take 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.
|
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] | |
fold [ExtHashtbl.Hashtbl] | |
fold [Enum] | fold f v e returns v if e is empty,
otherwise f (... (f (f v a1) a2) ...) aN 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 [ExtList.List] | |
fold_left [DynArray] | fold_left f x darr computes
f ( ... ( f ( f (get darr 0) x) (get darr 1) ) ... ) (get darr n-1) ,
similiar to Array.fold_left or List.fold_left .
|
fold_left2 [ExtList.List] | |
fold_right [ExtList.List] | |
fold_right [DynArray] | fold_right f darr x computes
f (get darr 0) (f (get darr 1) ( ... ( f (get darr n-1) x ) ... ) )
similiar to Array.fold_right or List.fold_right .
|
fold_right2 [ExtList.List] | |
foldi [Enum] | |
for_all [RefList] |
tells if all elements are matching the specified
predicate
|
for_all [ExtList.List] | |
for_all2 [ExtList.List] | |
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.
|
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 [Global] |
get the global value contents - raise Global_not_initialized if not
defined.
|
get [ExtString.String] | |
get [DynArray] | get darr idx gets the element in darr at index idx .
|
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_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 are raise
Empty_list if the
list is empty.
|
I | |
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_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.
|
init [UTF8] | init len f
returns a new string which contains len Unicode characters.
|
init [ExtList.List] |
Similar to
Array.init , init n f returns the list containing
the results of (f 0),(f 1)....
|
init [DynArray] | init n f returns an array of n elements filled with values
returned by f 0 , f 1, ... f (n-1) .
|
init [Enum] | init n f create a new enumeration over elements
f 0, f 1, ..., f (n-1)
|
input_all [Std] |
return the whole contents of an input channel as a single
string.
|
input_chars [Std] |
returns an enumeration over characters of a input channel.
|
input_lines [Std] |
returns an enumeration over lines of a input channel, as read by the
input_line function.
|
input_list [Std] |
returns the list of lines read from an input channel.
|
insert [DynArray] | insert darr idx v inserts v into darr at index idx .
|
int_of_uchar [UChar] |
Alias of
uint_code
|
is_empty [RefList] |
tells if a ref list 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 or false either.
|
is_set [BitSet] | is_set s n return true if nth-bit it the bitset s is set,
or false otherwise.
|
is_some [Option] | is_some (Some x) returns true or false either.
|
isdef [Global] |
tell 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 [ExtString.String] | |
iter [ExtList.List] | |
iter [ExtHashtbl.Hashtbl] | |
iter [DynArray] | iter f darr calls the function f on every element of darr .
|
iter [Enum] | iter f e calls the function f with each elements of e in turn.
|
iter2 [ExtList.List] | |
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 [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 [DynArray] | iter f darr calls the function f on every element of darr .
|
iteri [Enum] | |
J | |
junk [Enum] | junk e removes the first element from the enumeration, if any.
|
K | |
keys [ExtHashtbl.Hashtbl] |
returns an enumeration of all the keys of an 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 [DynArray] |
Return the number of elements in the array.
|
look [UTF8] | look s i
returns the Unicode character of the location i in the string s .
|
lowercase [ExtString.String] | |
M | |
make [ExtString.String] | |
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 [Enum] |
This function creates a fully defined enumeration.
|
map [RefList] |
apply a function to all elements
and return the ref list constructed with
the function returned values
|
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 beeen
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 [DynArray] | map f darr applies the function f to every element of darr
and creates a dynamic array from the results - similiar to List.map or
Array.map .
|
map [Enum] | map f e returns an enumeration over (f a1, f a2, ... , f aN) where
a1...N are the elements of e .
|
map2 [ExtList.List] | |
map_list [RefList] |
apply a function to all elements
and return the list constructed with
the function returned values
|
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 [DynArray] | mapi f darr applies the function f to every element of darr
and creates a dynamic array from the results - similiar to List.mapi or
Array.mapi .
|
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.
|
may [Option] | may f (Some x) will call f x and may f None will no nothing.
|
mem [ExtList.List] | |
mem [ExtHashtbl.Hashtbl] | |
mem_assoc [ExtList.List] | |
mem_assq [ExtList.List] | |
memq [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 .
|
npop [RefList] |
removes and returns the n first elements or
raises
Empty_list if the ref list doed not
containes enough elements
|
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.
|
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 [ExtString.String] |
Creates a string from a character enumeration.
|
of_enum [ExtList.List] |
Build a list from and enumeration.
|
of_enum [ExtHashtbl.Hashtbl] |
create an hashtable from a (key,value) enumeration.
|
of_enum [DynArray] | of_enum e returns an array that holds, in order, the elements of e .
|
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 [DynArray] | of_list lst returns a dynamic array with the elements of lst in
it in order.
|
opt [Global] |
return
None if the global is undefined, or Some v where v is the
current global value contents either.
|
out_of_range [UTF8] | out_of_range s i
tests whether i is a position inside of s .
|
P | |
partition [ExtList.List] | |
peek [Enum] | peek e returns None if e is empty or Some x where x is
the next element of e .
|
pop [RefList] |
removes and returns the first element or
raises
Empty_list if the ref list is empty
|
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 .
|
print_bool [Std] |
print a boolean to stdout.
|
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 set the nth-bit in the bitset s to v .
|
R | |
rchop [ExtString.String] |
returns the same string but without the last character.
|
rcontains_from [ExtString.String] | |
remove [RefList] |
remove an element from the ref list
raise Not_found if the element is not found
|
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_all [RefList] |
remove all elements equals 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 equals 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 that does match the
specified predicate
raise Not_found if no element have been removed
|
remove_if [ExtList.List] | remove_if cmp l x is similar to remove , but with cmp used
instead of ( = ).
|
replace [ExtHashtbl.Hashtbl] | |
reset [UTF8.Buf] |
Empty the buffer and de-allocate the internal storage.
|
rev [RefList] |
reverses the ref list
|
rev [ExtList.List] | |
rev_append [ExtList.List] | |
rev_map [ExtList.List] | |
rfind [RefList] |
find the first element in the reversed ref list that
match 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] | |
S | |
set [RefList.Index] |
change the element at the specified index
raise Invalid_index if the index is outside
0 ; length-1
|
set [Global] |
set the global value contents.
|
set [ExtString.String] | |
set [DynArray] | set darr idx v sets the element of darr at index idx to value
v .
|
set [BitSet] | set s n set the nth-bit in the bitset s to true.
|
set_resizer [DynArray] |
Change the resizer for this array.
|
shuffle [RefList] |
randomly shuffles the elements
using the module Random - O(n^2)
|
shuffle [ExtList.List] |
Returns the shuffled list, using
Random module.
|
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 ).
|
split [ExtString.String] | split s sep splits the string s among each part of the
separator 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.
|
step_resizer [DynArray] |
The stepwise resizer- another example of a resizer function, this
time of a parameterized resizer.
|
sub [ExtString.String] | |
sub [DynArray] | sub darr start len returns an array holding the subset of len
elements from darr starting with the element at index idx .
|
T | |
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_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 [DynArray] | to_list darr returns the elements of darr in order as a list.
|
toggle [BitSet] | toggle s n change the nth-bit value in the bitset s .
|
transform [RefList] |
transform all elements in the ref list
using a function.
|
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] | |
undef [Global] |
reset the global value contents to undefined.
|
unique [ExtList.List] | unique cmp l returns the list l without any duplicate element.
|
unset [BitSet] | unset s n set the nth-bit in the bitset s to false.
|
uppercase [ExtString.String] | |
V | |
validate [UTF8] | validate s
successes if s is valid UTF-8, otherwise raises Malformed_code.
|
values [ExtHashtbl.Hashtbl] |
returns an enumeration of all the values of an hashtable.
|