Module Util


module Util: sig  end
A module with very common operations while configuring

val shell_capture : ?maxchars:int -> string -> string
Executes the given string in a shell, and returns what came through stdout, by default clips it at 100 chars, because you are probably just filling in a command path - if you don't need the output of the command, use Unix.system or Sys.command. If you need all the output, use Unix.open_process_in
val chomp : string -> string
Chomps off the last character of the string - useful for path manglish sometimes
val chomp_char : char -> string -> string
Chomps off the last character only if it matches given char
val chomp_eol : string -> string
Chomps the last character only if it is a trailing \n - convenience wrapper only
val escape_slashes : string -> string
Escapes all the slashes in a string so it can be used as a regexp