2#ifndef __CXSTRINGUTILS_H__
3#define __CXSTRINGUTILS_H__
37 std::vector<std::string>& resultContainer);
50 bool Find(
const std::string& input,
const std::string& regex,
bool useBasicRegex =
false);
58 void Find(
const std::string& input,
const std::string& regex, std::string& output);
71 bool Replace(std::string& srcStr,
const std::string& regexStr,
const std::string& replacementStr);
79 std::string
replace(
const std::string& input,
const std::string& search,
const std::string&
replace);
107 std::string
toString(
const long& x);
108 std::string
toString(
const double& x);
109 std::string
toString(
const long double& x);
110 std::string
toString(
const unsigned& x);
111 std::string
toString(
const unsigned long& x);
115 std::string
toString(
const void* x);
195 std::string
removeChar(
const std::string& pString,
const int pPos);
String utility functions.
std::string strToLower(const std::string &theString)
conver the string to lower case
std::string stripNewlines(const std::string &pStr)
Strips newlines characters from a string and returns.
bool startsWithNumber(const std::string &pStr)
bool isPrintable(const int &pKey)
Returns whether or not a key is printable. This should be used.
Definition cxStringUtils.cpp:463
long stringToLong(const std::string &s)
Definition cxStringUtils.cpp:261
void test_toString()
Definition cxStringUtils.cpp:395
std::string strToUpper(const std::string &theString)
conver the string to upper case
std::string removeChar(const std::string &pString, const int pPos)
Removes a character from a string.
void insertUnderline(std::string &pStr, char pChar, bool pAll=false)
Inserts an underline character into.
void test_stringTo()
Definition cxStringUtils.cpp:298
void toUpper(std::string &theString)
Converts a string to upper-case.
bool Replace(std::string &srcStr, const std::string ®exStr, const std::string &replacementStr)
std::string replaceNewlines(const std::string &pStr, const char &pChar)
Replaces newlines in a string with another character.
void TrimSpaces(std::string &str)
Trims leading & trailing spaces from a string.
int indexOfLastCap(const std::string &pStr)
Returns the index of the last capital letter in a string. Returns -1 if there are no capital letters.
std::string toString(const int &x)
Converts an object to a string, i.e.:
Definition cxStringUtils.cpp:325
long double stringToLongDouble(const std::string &s)
Definition cxStringUtils.cpp:285
double stringToDouble(const std::string &s)
Definition cxStringUtils.cpp:277
std::string stringToString(const std::string &s)
Definition cxStringUtils.cpp:293
void SplitStringRegex(const std::string &input, const std::string ®ex, std::vector< std::string > &resultContainer)
unsigned stringToUnsigned(const std::string &s)
Definition cxStringUtils.cpp:269
std::string replace(const std::string &input, const std::string &search, const std::string &replace)
Replaces substrings of a string with another string.
bool Find(const std::string &input, const std::string ®ex, bool useBasicRegex=false)
void splitStringOnNewlines(const std::string &pStr, std::list< std::string > &pStrings)
Splits a string on newlines.
int stringTo(const std::string &s)
Converts a string to another type.
Definition cxStringUtils.cpp:253
eInputOptions
Definition cxInputOptions.h:20
eBorderStyle
Definition cxBorderStyles.h:26
eReturnCode
Definition cxReturnCodes.h:27