26#include "error_treat.h"
38#define PACKAGE_LOCALE_DIR "/usr/share/locale"
39#define GETTEXT_PACKAGE "cards"
41void *Malloc(
size_t s);
45 std::string parameter;
66void addItemToItemList(
itemList *list,
const char *item);
78(std::string s,
char delimiter);
80std::set<std::string> getKeysList
81(std::string file, std::string delimiter);
83std::string getValueOfKey
84(std::string file, std::string delimiter,std::string parameter);
86std::string getValue(
const std::string& s,
char delimiter);
87std::string getValueBefore(
const std::string& s,
char del );
88std::string getValueBeforeLast(
const std::string& s,
char del );
90std::string itos(
unsigned int value);
91std::string ultos(
unsigned long int value);
93std::string mtos(mode_t mode);
94std::string trimFileName(
const std::string& filename);
95std::string sizeHumanRead(
int value);
99std::string getFirstValueOfKeyAfterDelim(
const std::string& s,
char delimiter);
102std::string stripWhiteSpace(
const std::string& s);
105std::vector<std::string> parseDelimitedVectorList
106(
const std::string& s,
const char *delimiter);
109std::set<std::string> parseDelimitedSetList
110(
const std::string& s,
const char *delimiter);
113bool startsWith(
const std::string& s,
const std::string& with);
119bool startsWithNoCase(
const std::string& s1,
const std::string& s2);
121std::string convertToLowerCase(
const std::string& s);
122std::string convertToUpperCase(
const std::string& s);
124std::string replaceAll
125( std::string& in,
const std::string& oldString,
const std::string& newString );
137void split(
const std::string& s,
char del,
139 int startPos,
bool useEmpty )
141 std::string line = s;
143 std::string::size_type pos;
144 int offset = startPos;
145 while ( ( pos = line.find( del, offset ) ) != std::string::npos ) {
147 if ( line[pos-1] ==
'\\' ) {
149 ss = ss + line.substr(0,pos);
153 std::string val = line.substr( 0, pos );
154 if ( ( useEmpty || !stripWhiteSpace( val ).empty() ) ||
155 ( ss.length() > 0 ) ) {
156 target.push_back( ss + val );
158 line.erase( 0, pos+1 );
161 if ( ( line.length() > 0 ) || ( ss.length() > 0 ) ) {
162 target.push_back( ss + line );
Definition: libcards.h:484
Definition: libcards.h:475