Classes | Namespaces
mootUtils.h File Reference

useful utilities, especially for command-line programs More...

Go to the source code of this file.

Classes

class  moot::cmdutil_file_churner
 Class for churning through many input files, given either directly or as a list-file. More...
 

Namespaces

 moot
 

Functions

Locale Utilities
void moot::moot_setlocale (void)
 
const char * moot::moot_lc_ctype (void)
 
const char * moot::moot_lc_numeric (void)
 
String Utilities
bool moot::moot_parse_doubles (const char *str, double *dbls, size_t ndbls)
 
void moot::moot_normalize_ws (const char *buf, size_t len, std::string &out, bool trim_left=true, bool trim_right=true)
 
void moot::moot_normalize_ws (const std::string &in, std::string &out, bool trim_left=true, bool trim_right=true)
 
void moot::moot_normalize_ws (const char *s, std::string &out, bool trim_left=true, bool trim_right=true)
 
std::string moot::moot_normalize_ws (const char *buf, size_t len, bool trim_left=true, bool trim_right=true)
 
std::string moot::moot_normalize_ws (const char *s, bool trim_left=true, bool trim_right=true)
 
std::string moot::moot_normalize_ws (const std::string &s, bool trim_left=true, bool trim_right=true)
 
void moot::moot_remove_newlines (char *buf, size_t len)
 
void moot::moot_remove_newlines (char *s)
 
void moot::moot_remove_newlines (std::string &s)
 
void moot::moot_strtok (const std::string &s, const std::string &delim, std::list< std::string > &out)
 
std::list< std::string > moot::moot_strtok (const std::string &s, const std::string &delim)
 
void moot::moot_strsplit (const std::string &s, const std::string &delim, std::vector< std::string > &out)
 
std::vector< std::string > moot::moot_strsplit (const std::string &s, const std::string &delim)
 
int moot::std_vsprintf (std::string &s, const char *fmt, va_list &ap)
 
int moot::std_sprintf (std::string &s, const char *fmt,...)
 
std::string moot::std_vssprintf (const char *fmt, va_list &ap)
 
std::string moot::std_ssprintf (const char *fmt,...)
 
Named File Utilities
bool moot::moot_file_exists (const char *filename)
 
bool moot::moot_file_exists (const std::string &filename)
 
std::string moot::moot_unextend (const char *filename)
 
const char * moot::moot_extension (const char *filename, size_t pos)
 
const char * moot::moot_extension (const char *filename)
 

Message and Command-line utilities

enum  moot::VerbosityLevel {
  moot::vlSilent = 0, moot::vlErrors = 1, moot::vlWarnings = 2, moot::vlInfo = 3,
  moot::vlProgress = 4, moot::vlDebug = 5, moot::vlTrace = 6, moot::vlEverything = 255
}
 
std::string moot::moot_banner (void)
 
std::string moot::moot_program_banner (const std::string &prog_name, const std::string &prog_version, const std::string &prog_author, bool is_free=true)
 
void moot::moot_vcarp (const char *fmt, va_list &ap)
 
void moot::moot_carp (const char *fmt,...)
 
void moot::moot_vcroak (const char *fmt,...)
 
void moot::moot_croak (const char *fmt,...)
 
void moot::moot_vmsg (int curLevel, int minLevel, const char *fmt, va_list &ap)
 
void moot::moot_msg (int curLevel, int minLevel, const char *fmt,...)