2 * Copyright (C) 2014-2015 Red Hat Inc.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 (** Miscellaneous utility functions. *)
21 val (//) : string -> string -> string
22 val quote : string -> string
24 val ( +^ ) : int64 -> int64 -> int64
25 val ( -^ ) : int64 -> int64 -> int64
26 val ( *^ ) : int64 -> int64 -> int64
27 val ( /^ ) : int64 -> int64 -> int64
28 val ( &^ ) : int64 -> int64 -> int64
29 val ( ~^ ) : int64 -> int64
30 (** Various int64 operators. *)
32 val filter_map : ('a -> 'b option) -> 'a list -> 'b list
33 (** {!List.map} + {!List.filter} *)
35 val human_size : int64 -> string
36 (** Turn a bytes count into a human-readable string (eg. [4.0G]). *)
38 val bytes_of_human_size : string -> int64
40 val string_of_dom_state : Libvirt.Domain.state -> string
42 val regexp_of_glob : string -> string
43 (** Convert glob to regular expression. *)
45 val string_random8 : unit -> string
47 val name_parse : string -> string option * string
48 (** Parse a guest name of either [name] or [node:name] into the parts. *)