 |
PhoenixMock
1.8.7
Tools to split/merge/print mock used in Phoenix
|
Go to the documentation of this file.
7 #ifndef __STRING_FUNCTION_H__
8 #define __STRING_FUNCTION_H__
25 std::vector<std::string>
eraseFirstLastChars(
const std::vector<std::string> & vecStr,
const std::string & chars);
31 std::string
replaceCharInStr(
const std::string&
str,
char find,
const std::string& replace);
32 std::string
replaceCharsInStr(
const std::string &
str,
const std::string & strFind,
char replace);
33 size_t countStrInStr(
const std::string & src,
const std::string & patern);
34 void replaceStrInStr(std::string & out,
const std::string & src,
const std::string & patern,
const std::string & replace);
35 std::string
replaceStrInStr(
const std::string & src,
const std::string & patern,
const std::string & replace);
36 std::vector<std::string>
replaceStrInStr(
const std::vector<std::string> & vecSrc,
const std::string & patern,
const std::string & replace);
38 void replaceStrInStr(std::string & out,
const std::string & src,
const std::map<std::string, std::string> & mapReplace);
39 std::string
replaceStrInStr(
const std::string & src,
const std::map<std::string, std::string> & mapReplace);
41 void replaceVectorStrInStr(std::string & srcDest,
const std::vector<std::string> & vecPatern,
const std::string & replace);
42 void replaceListStrInStr(std::string & srcDest,
const std::list<std::string> & listPatern,
const std::string & replace);
43 std::string
replaceVectorStrInStr(
const std::string & src,
const std::vector<std::string> & vecPatern,
const std::string & replace);
44 std::string
replaceListStrInStr(
const std::string & src,
const std::list<std::string> & vecPatern,
const std::string & replace);
46 std::string
phoenix_escapeStr(
const std::string & src,
const std::string & strCharToEscape,
const std::string & escapeStr);
48 std::list<std::string>
cutStringList(
const std::string &
str,
char separator);
54 std::string
copyStr(
const std::string&
str,
long unsigned int begin,
long unsigned int nbCh);
std::string phoenix_escapeStr(const std::string &src, const std::string &strCharToEscape, const std::string &escapeStr)
Escape given string with passed characters.
void replaceListStrInStr(std::string &srcDest, const std::list< std::string > &listPatern, const std::string &replace)
Replace all the list patern in the string srcDest by the replace string.
size_t countNbChar(const std::string &str, char ch)
Count number of chararacters ch in string.
bool findCharsInString(const std::string &str, const std::string &chars)
Find multiple chars in a string.
std::string replaceCharsInStr(const std::string &str, const std::string &strFind, char replace)
Replace all char in the strFind by char replace.
size_t countStrInStr(const std::string &src, const std::string &patern)
Count the number of patern in string.
std::vector< std::string > cutStringOnSpacesVector(const std::string &str)
Cut a string on white characters ('\t' ou ' ')
std::string eraseCharInStr(const std::string &str, char ch)
copie la string str en effaçant le caractère ch
std::string copyStr(const std::string &str, long unsigned int begin, long unsigned int nbCh)
Copy a string of nbCh starting from begin char.
std::string phoenix_getCommonBegining(const std::string &str1, const std::string &str2)
Get the common begining between str1 and str2.
std::string eraseLastCharsInStr(const std::string &str, const std::string &chars)
Erase first and last char in a string.
std::vector< std::string > cutStringVector(const std::string &str, char separator)
Cut a string the the given separator char.
bool findInString(const std::string &str, char ch)
Find a char in a string.
std::string replaceCharInStr(const std::string &str, char find, const std::string &replace)
fonction qui remplace un caractère par un autre dans une string
std::string eraseFirstLastChars(const std::string &str, const std::string &chars)
Erase first and last char in a string.
std::string eraseCharsInStr(const std::string &str, const std::string &rmchs)
copie la string str en effaçant les caractères rmchs
bool findInVectorString(const std::vector< std::string > &vecStr, const std::string &str)
Find a string in a vector of string.
bool findInListString(const std::list< std::string > &listStr, const std::string &str)
Find a string in a list of string.
void replaceStrInStr(std::string &out, const std::string &src, const std::string &patern, const std::string &replace)
Replace a patern by an other in the input string.
void replaceVectorStrInStr(std::string &srcDest, const std::vector< std::string > &vecPatern, const std::string &replace)
Replace all the vector patern in the string srcDest by the replace string.
std::list< std::string > cutStringList(const std::string &str, char separator)
Cut a string the the given separator char.
std::list< std::string > cutStringOnSpacesList(const std::string &str)
Cut a string on white characters ('\t' ou ' ')
std::string eraseFirstCharsInStr(const std::string &str, const std::string &chars)
Erase first char in a string.
bool isSameBegining(const std::string &str, const std::string &beginig)
Check if two string start the same way.
std::string phoenix_charToString(const char *ch)
Convert a char pointer into a string (event if the char pointer is NULL)