diff options
author | Chris Xiong <chirs241097@gmail.com> | 2018-04-09 22:42:45 +0800 |
---|---|---|
committer | Chris Xiong <chirs241097@gmail.com> | 2018-04-09 22:42:45 +0800 |
commit | 6bdb9028af9a5256fbb47b942843e49aef7e3aa1 (patch) | |
tree | a2346e35e36a3fcb016cb7ab65bcbcb84dede1bf /utils.hpp | |
download | lightsd-6bdb9028af9a5256fbb47b942843e49aef7e3aa1.tar.xz |
Initial commit.
Diffstat (limited to 'utils.hpp')
-rw-r--r-- | utils.hpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/utils.hpp b/utils.hpp new file mode 100644 index 0000000..055201d --- /dev/null +++ b/utils.hpp @@ -0,0 +1,12 @@ +#ifndef UTILS_HPP +#define UTILS_HPP +#include <string> +#include <vector> +#define LOG(type,format,...) fprintf(stderr,"%c: " format "\n",type,__VA_ARGS__) +extern int readint(const char* path); +extern float readfloat(const char* path); +extern std::string readstr(const char* path); +extern void writeint(const char* path,int v); +extern std::string trim(std::string s); +extern void split(std::string s,char c,std::vector<std::string>& v); +#endif |