summaryrefslogtreecommitdiff
path: root/tools/stringhelpers.h
diff options
context:
space:
mode:
authorhorchi <vdr@jwendel.de>2017-03-05 16:39:28 +0100
committerhorchi <vdr@jwendel.de>2017-03-05 16:39:28 +0100
commite2a48d8701f91b8e24fbe9e99e91eb72a87bb749 (patch)
tree726f70554b4ca985a09ef6e30a7fdc8df089993c /tools/stringhelpers.h
downloadvdr-epg-daemon-e2a48d8701f91b8e24fbe9e99e91eb72a87bb749.tar.gz
vdr-epg-daemon-e2a48d8701f91b8e24fbe9e99e91eb72a87bb749.tar.bz2
git init1.1.103
Diffstat (limited to 'tools/stringhelpers.h')
-rw-r--r--tools/stringhelpers.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/tools/stringhelpers.h b/tools/stringhelpers.h
new file mode 100644
index 0000000..b4006f3
--- /dev/null
+++ b/tools/stringhelpers.h
@@ -0,0 +1,31 @@
+
+#ifndef _STRINGHELPERS_H_
+#define _STRINGHELPERS_H_
+
+#include <string>
+using namespace std;
+
+string str_replace(const string& search, const string& replace, const string& subject);
+string str_cut(const string& search, const string& subject);
+
+#include <jansson.h>
+
+class cJsonLoader
+{
+ public:
+
+ cJsonLoader(const char* name);
+ ~cJsonLoader();
+
+ json_t* object() { return obj; }
+ json_error_t* error() { return err; }
+ json_t* objectByName(const char* name);
+ int isObject();
+
+ protected:
+
+ json_error_t* err;
+ json_t* obj;
+};
+
+#endif // _STRINGHELPERS_H_