VisPro  1.0
Project of Visualisierung 2
StringHelpers.hpp
1 #ifndef STRINGHELPERS
2 #define STRINGHELPERS
3 
8 #include <vector>
9 #include <string>
10 
11 namespace Helper
12 {
13  std::vector<std::string> splitString(std::string s, std::string delimiter);
14 
15  char *replace(char *st, char *orig, char *repl);
16 
17  std::string ArgumentString(int argc, char *argv[], int argNo, std::string &str);
18 
19  std::string ArgumentPath(int argc, char *argv[], int argNo, std::string &path);
20 
21  int str_hash(const std::string &key, int tableSize = USHRT_MAX);
22 
26  std::string ExecutionPath();
27 
33  std::string RelativeFileName(std::string fileName, bool withExtension = false);
34 
39  std::string AbsoluteFileName(std::string relativeFileName);
40 
41  std::string CleanString(std::string str, bool numbers = true, bool specialCharacters = true);
42 
43  wchar_t *convertCharArrayToLPCWSTR(const char* charArray);
44 
45  std::string itos(int i);
46 
47  unsigned short *convertWCharStrToUnsignedShortStr(const wchar_t *wcharArray);
48 
49 }
50 
51 #endif
Definition: FileHelpers.cpp:18