stdlib: Fix %branch -> %fedora-branch.
[goals.git] / src / utils.mli
index bbb8670..c63db29 100644 (file)
@@ -17,6 +17,9 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  *)
 
+val nprocs : unit -> int
+(** Return the number of processors on the system. *)
+
 val failwithf : ('a, unit, string, 'b) format4 -> 'a
 (** Like [failwith] but supports printf-like arguments. *)
 
@@ -26,6 +29,9 @@ val (//) : string -> string -> string
 val is_directory : string -> bool
 (** Return true iff parameter is a directory. *)
 
+val unique : unit -> int
+(** Returns a unique number each time called. *)
+
 val filter_map : ('a -> 'b option) -> 'a list -> 'b list
 (** [filter_map f l] applies [f] to every element of [l], filters
     out the [None] elements and returns the list of the arguments of
@@ -35,6 +41,12 @@ val string_find : string -> string -> int
 (** [string_find str sub] finds the index of [sub] in [str].  If
     not found, returns -1. *)
 
+val split : string -> string -> string * string
+(** [split sep str] splits [str] at the first occurrence of the
+    separator [sep], returning the part before and the part after.
+    If separator is not found, return the whole string and an
+    empty string. *)
+
 val nsplit : ?max:int -> string -> string -> string list
 (** [nsplit ?max sep str] splits [str] into multiple strings at each
     separator [sep].