OMW
0.1.0
|
Public Member Functions | |
string (const char *str) | |
string (const std::string &str) | |
string (const char *first, const char *last) | |
bool | isInteger () const |
bool | isUInteger () const |
omw::string & | replaceFirst (const omw::string &search, const omw::string &replace, size_type startPos=0) |
omw::string & | replaceFirst (const omw::StringReplacePair &pair, size_type startPos=0) |
omw::string & | replaceAll (const omw::string &search, const omw::string &replace, size_type startPos=0, size_type *nReplacements=nullptr) |
omw::string & | replaceAll (const omw::StringReplacePair &pair, size_type startPos=0, size_type *nReplacements=nullptr) |
omw::string & | replaceAll (const std::vector< omw::StringReplacePair > &pairs, size_type startPos=0, size_type *nReplacementsTotal=nullptr, std::vector< size_type > *nReplacements=nullptr) |
omw::string & | replaceAll (const omw::StringReplacePair *pairsBegin, const omw::StringReplacePair *pairsEnd, size_type startPos=0, size_type *nReplacementsTotal=nullptr, std::vector< size_type > *nReplacements=nullptr) |
omw::string & | makeUrlEncoded () |
omw::string | toUrlEncoded () const |
Case Conversion | |
Methods named | |
omw::string & | makeLower_ascii () |
omw::string & | makeLower_asciiExt () |
omw::string & | makeUpper_ascii () |
omw::string & | makeUpper_asciiExt () |
omw::string | toLower_ascii () const |
omw::string | toLower_asciiExt () const |
omw::string | toUpper_ascii () const |
omw::string | toUpper_asciiExt () const |
A with std::string
interchangeable class to add more functionalities. This class does not override/implement any virtual methods of the base class and has no attributes. It's basically a std::string
with some more methods.
omw::string & omw::string::replaceAll | ( | const omw::string & | search, |
const omw::string & | replace, | ||
size_type | startPos = 0 , |
||
size_type * | nReplacements = nullptr |
||
) |
search | Substring to be replaced | |
replace | String for replacement | |
startPos | From where to start searching | |
[out] | nReplacements | Number of occurrences |
*this
omw::string & omw::string::replaceAll | ( | const omw::StringReplacePair & | pair, |
size_type | startPos = 0 , |
||
size_type * | nReplacements = nullptr |
||
) |
pair | Search and replace string pair | |
startPos | From where to start searching | |
[out] | nReplacements | Number of occurrences |
*this
omw::string & omw::string::replaceAll | ( | const omw::StringReplacePair * | pairsBegin, |
const omw::StringReplacePair * | pairsEnd, | ||
size_type | startPos = 0 , |
||
size_type * | nReplacementsTotal = nullptr , |
||
std::vector< size_type > * | nReplacements = nullptr |
||
) |
pairsBegin | Pointer to first replace pair in array | |
pairsEnd | Pointer to first replace pair behind the array | |
startPos | From where to start searching | |
[out] | nReplacementsTotal | Total number of occurrences |
[out] | nReplacements | Number of occurrences of specific replace pair |
*this
Processes all replace pairs in range [pairsBegin
, pairsEnd
).
omw::string & omw::string::replaceAll | ( | const std::vector< omw::StringReplacePair > & | pairs, |
size_type | startPos = 0 , |
||
size_type * | nReplacementsTotal = nullptr , |
||
std::vector< size_type > * | nReplacements = nullptr |
||
) |
pairs | Search and replace string pair vector | |
startPos | From where to start searching | |
[out] | nReplacementsTotal | Total number of occurrences |
[out] | nReplacements | Number of occurrences of specific replace pair |
*this
omw::string & omw::string::replaceFirst | ( | const omw::string & | search, |
const omw::string & | replace, | ||
size_type | startPos = 0 |
||
) |
search | Substring to be replaced |
replace | String for replacement |
startPos | From where to start searching |
*this
omw::string & omw::string::replaceFirst | ( | const omw::StringReplacePair & | pair, |
size_type | startPos = 0 |
||
) |
pair | Search and replace string pair |
startPos | From where to start searching |
*this