libqalculate-3.10.0
Classes | Functions
util.h File Reference
#include <libqalculate/includes.h>
#include <pthread.h>
#include <unistd.h>

Classes

class  Thread
 

Functions

void sleep_ms (int milliseconds)
 
std::string & gsub (const std::string &pattern, const std::string &sub, std::string &str)
 
std::string & gsub (const char *pattern, const char *sub, std::string &str)
 
std::string d2s (double value, int precision=100)
 
std::string i2s (long int value)
 
std::string u2s (unsigned long int value)
 
const char * b2yn (bool b, bool capital=true)
 
const char * b2tf (bool b, bool capital=true)
 
const char * b2oo (bool b, bool capital=true)
 
std::string p2s (void *o)
 
long int s2i (const std::string &str)
 
long int s2i (const char *str)
 
void * s2p (const std::string &str)
 
void * s2p (const char *str)
 
void now (int &hour, int &min, int &sec)
 
size_t find_ending_bracket (const std::string &str, size_t start, int *missing=NULL)
 
char op2ch (MathOperation op)
 
std::string & wrap_p (std::string &str)
 
std::string & remove_blanks (std::string &str)
 
std::string & remove_duplicate_blanks (std::string &str)
 
std::string & remove_blank_ends (std::string &str)
 
std::string & remove_parenthesis (std::string &str)
 
bool is_in (const char *str, char c)
 
bool is_not_in (const char *str, char c)
 
bool is_in (const std::string &str, char c)
 
bool is_not_in (const std::string &str, char c)
 
int sign_place (std::string *str, size_t start=0)
 
int gcd (int i1, int i2)
 
char * locale_to_utf8 (const char *str)
 
char * locale_from_utf8 (const char *str)
 
char * utf8_strdown (const char *str, int l=-1)
 
size_t unicode_length (const std::string &str)
 
size_t unicode_length (const char *str)
 
bool text_length_is_one (const std::string &str)
 
bool equalsIgnoreCase (const std::string &str1, const std::string &str2)
 
bool equalsIgnoreCase (const std::string &str1, const char *str2)
 
void parse_qalculate_version (std::string qalculate_version, int *qalculate_version_numbers)
 
std::string getOldLocalDir ()
 
std::string getLocalDir ()
 
std::string getPackageDataDir ()
 
std::string getGlobalDefinitionsDir ()
 
std::string getPackageLocaleDir ()
 
std::string getLocalDataDir ()
 
std::string getLocalTmpDir ()
 
std::string buildPath (std::string dir, std::string filename)
 
std::string buildPath (std::string dir1, std::string dir2, std::string filename)
 
std::string buildPath (std::string dir1, std::string dir2, std::string dir3, std::string filename)
 
bool dirExists (std::string dirpath)
 
bool fileExists (std::string dirpath)
 
bool makeDir (std::string dirpath)
 
bool recursiveMakeDir (std::string dirpath)
 
bool removeDir (std::string dirpath)
 
bool move_file (const char *from_file, const char *to_file)
 
int checkAvailableVersion (const char *version_id, const char *current_version, std::string *avaible_version=NULL, int timeout=5)