00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00034 #ifndef HBCISTRING_H
00035 #define HBCISTRING_H
00036
00037 #include <stdio.h>
00038 #include <string>
00039
00040 #include <openhbci/dllimport.h>
00041
00042 using namespace std;
00043
00044 namespace HBCI {
00045
00051 class DLLIMPORT String : public string {
00052 private:
00053 String();
00054 ~String();
00055 public:
00056
00061 DLLIMPORT static string nextDE(const string &data, int startIndex=0);
00062
00067 DLLIMPORT static string nextDEG(const string &data, int startIndex=0);
00068
00073 DLLIMPORT static string nextSEG(const string &data, int startIndex=0);
00074
00079 DLLIMPORT static string num2string(int number, bool fillWithZero = false, int length = 0);
00080
00088
00089
00090
00103 DLLIMPORT static double string2double(const string &data);
00104
00109 DLLIMPORT static string escape(const string &unescaped);
00110
00112 DLLIMPORT static string unEscape(const string &escaped);
00113
00117 DLLIMPORT static string date2string();
00118
00122 DLLIMPORT static string time2string();
00123
00127
00128
00132
00133
00137
00138
00142 DLLIMPORT static string transformToDTAUS0(const string &msg);
00143
00147 DLLIMPORT static string transformToHBCIBinData(const string &data);
00148
00153 DLLIMPORT static string extractBinData(const string &data);
00154
00164 DLLIMPORT static string nextTLV(const string &data, int startIndex=0);
00165
00170 DLLIMPORT static unsigned int typeTLV(const string &tlv);
00171
00176 DLLIMPORT static int sizeTLV(const string &tlv);
00177
00182 DLLIMPORT static string dataTLV(const string &tlv);
00183
00188 DLLIMPORT static string newTLV(int tag, const string &data);
00189
00195 DLLIMPORT static string dumpToString(const string &s);
00196
00197 DLLIMPORT static const char *hbciSegmentName(const char *segment);
00198
00206 DLLIMPORT static void simpleDump(const string &s, FILE *f=stderr);
00207
00208 private:
00209
00210 DLLIMPORT static int lengthOfBinaryData(const string &data, int startIndex);
00211
00212 };
00213
00214 }
00215
00223 extern char* hbci_strdup(const char *c);
00230 extern char* hbci_strdup(const string &s);
00231
00232
00233 #endif
00234