33 int getDirectoryFiles(std::string dir, std::vector<std::string> &files,
bool appendDir =
false);
34 bool stringEndsWith(std::string text, std::string end, std::string sep =
"_");
35 bool stringStartsWith(std::string text, std::string end, std::string sep =
"_");
36 std::string
strtrim(std::string& s,
const std::string& drop =
" ");
37 std::string
strreplace(
const std::string &stringSearchString,
const std::string &stringReplaceString, std::string stringStringToReplace);
38 void strreplaceWithCondition(
const std::string &stringSearchString,
const std::string &stringReplaceString, std::string &stringStringToReplace, std::string condition =
"");
39 void strreplace(
char* text,
char what =
'.',
char with =
',');
40 double strToDouble(
const char* text,
double value = 0.0);
41 void strToArray(std::string text, std::vector<double> &result, std::string delimiter =
" ");
43 std::string
combineStrings(std::vector<std::string> &input, std::string delimiter =
" ");
46 std::vector<std::string>& tokens,
47 const std::string& delimiters);
49 void matrixToArray(
const CMatrix &matrix, std::vector<double> &values);
50 void arrayToMatrix(CMatrix &matrix, std::vector<double> &values);
52 void vectorToMatrix(CMatrix &matrix,
const std::vector<double> &values);
54 void matrixToVector(
const CMatrix &matrix, std::vector<double> &values);
57 void getConvexHullXY(std::vector<CVec> &points, std::vector<CVec> &hull);
63 template<
typename T >
64 bool inRange(std::vector<T> &array, T min, T max)
66 for (
unsigned int i=0; i<array.size(); i++)
67 if ((array[i] < min) || (array[i] > max))
73 template<
typename T >
76 for (
unsigned int i=0; i<array.size(); i++)
77 if (array[i] == value)
83 template<
typename T >
87 for (
unsigned int i=0; i<array.size(); i++)
93 template<
typename T,
typename S >
94 bool comparePairs(
const std::pair<T, S> &first,
const std::pair<T, S> &second)
96 return first.first < second.first;
99 template<
typename T,
typename S >
102 for (
unsigned int i=0; i<first.first.size(); i++)
103 if (first.first[i] < second.first[i])
105 else if (first.first[i] > second.first[i])
114 std::string
waitForReturn(std::string msg =
"Press any key.\n");
void strtokenize(const std::string &str, std::vector< std::string > &tokens, const std::string &delimiters)
double strToDouble(const char *text, double value=0.0)
bool comparePairsVector(const std::pair< T, S > &first, const std::pair< T, S > &second)
std::string printToString(const char *format,...)
std::string waitForReturn(std::string msg="Press any key.\n")
bool inRange(std::vector< T > &array, T min, T max)
std::string combineStrings(std::vector< std::string > &input, std::string delimiter=" ")
std::string strtrim(std::string &s, const std::string &drop=" ")
void vectorToMatrix6(CMatrix &matrix, const double *values)
std::string strreplace(const std::string &stringSearchString, const std::string &stringReplaceString, std::string stringStringToReplace)
int getDirectoryFiles(std::string dir, std::vector< std::string > &files, bool appendDir=false)
std::string arrayToString(std::vector< T > &array)
bool stringEndsWith(std::string text, std::string end, std::string sep="_")
std::string boolToString(bool value)
void matrixToVector6(const CMatrix &matrix, double *values)
void vectorToMatrix(CMatrix &matrix, const std::vector< double > &values)
bool comparePairs(const std::pair< T, S > &first, const std::pair< T, S > &second)
bool isIncluded(std::vector< T > &array, T &value)
void strToArray(std::string text, std::vector< double > &result, std::string delimiter=" ")
bool stringStartsWith(std::string text, std::string end, std::string sep="_")
void getConvexHullXY(std::vector< CVec > &points, std::vector< CVec > &hull)
void matrixToArray(const CMatrix &matrix, std::vector< double > &values)
void matrixToVector(const CMatrix &matrix, std::vector< double > &values)
void arrayToMatrix(CMatrix &matrix, std::vector< double > &values)
unsigned long getTickCount()
void strreplaceWithCondition(const std::string &stringSearchString, const std::string &stringReplaceString, std::string &stringStringToReplace, std::string condition="")