summaryrefslogtreecommitdiff
path: root/tools/stringhelpers.h
blob: b4006f395e52c332f317f54bff6f67093b543e44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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_