My Project
|
#include <StringHelper.h>
Static Public Member Functions | |
static std::string | RemoveStringBetween (const std::string &searchInString, const std::string &first, const std::string &last) |
Removes a string between the given start and end variable. | |
static std::string | GetStringBetween (const std::string &searchInString, const std::string &first, const std::string &last) |
Gets a string between the start and end variable. | |
static bool | StringEndsWith (const std::string &str, const std::string &end) |
Checks if the string ends with the given end string. The check is case insensitive. | |
static bool | StringStartsWith (const std::string &str, const std::string &start) |
Checks if the string starts with the given start string. The check is case insensitive. | |
static std::string | StringToUpper (const std::string &strToConvert) |
Converts the string to upper characters. | |
static std::string | StringToLower (const std::string &strToConvert) |
Converts the String to lower characters. | |
static std::vector< std::string > | TokenizeString (const std::string &sString, const std::string &token) |
Splits the string by the given token. | |
static int | ConvertToInt (const std::string &sString) |
Converts the given string to a integer. | |
static std::string | ConvertToString (int i) |
Converts the given integer to a string. | |
static std::string | ConvertToString (double i) |
Converts the given double to a string. | |
static std::string | ConvertToString (float i) |
Converts the given float to a string. | |
static std::string | ConvertToString (DWORD i) |
Converts the given DWORD to a string. | |
static double | ConvertToDouble (const std::string &sString) |
Converts the given string to a double. | |
static float | ConvertToFloat (const std::string &sString) |
Converts the given string to a float. | |
static std::string | ConvertFloatToString (float i) |
Converts the given float to a string. | |
static std::string | ConvertDoubleToString (double i) |
Converts the given double to a string. | |
static std::string | ReplaceString (const std::string &in, const std::string &replaceThis, const std::string &replaceWith) |
Replaces all occured replaceThis with replaceWith. This is done case sensitive. | |
static std::string | base64_encode (unsigned char const *, unsigned int len) |
Base 64 encode. | |
static std::string | base64_decode (std::string const &s) |
Base 64 decode. | |
static bool | StringCompareCaseInsensitivity (const std::string &left, const std::string &right) |
Checks if the string is the same (case insensitivity). | |
static bool | StripServerAddress (const std::string &completeURL, std::string &server, int &port, std::string &uri) |
Strip server address to it's singel parts. | |
static bool | StringContainsCaseInsensitivity (const std::string &left, const std::string &right) |
Checks if the left string contains the right string (case insensitivity). |
String helper.
std::string StringHelper::base64_decode | ( | std::string const & | encoded_string | ) | [static] |
Base 64 decode.
[in,out] | encoded_string | The encoded string. |
std::string StringHelper::base64_encode | ( | unsigned char const * | bytes_to_encode, |
unsigned int | in_len | ||
) | [static] |
Base 64 encode.
[in,out] | bytes_to_encode | If non-null, the bytes to encode. |
in_len | Length of the in. |
std::string StringHelper::ConvertDoubleToString | ( | double | i | ) | [static] |
Converts the given double to a string.
i | The. |
std::string StringHelper::ConvertFloatToString | ( | float | i | ) | [static] |
Converts the given float to a string.
i | The. |
double StringHelper::ConvertToDouble | ( | const std::string & | sString | ) | [static] |
Converts the given string to a double.
sString | The string. |
float StringHelper::ConvertToFloat | ( | const std::string & | sString | ) | [static] |
Converts the given string to a float.
sString | The string. |
int StringHelper::ConvertToInt | ( | const std::string & | sString | ) | [static] |
Converts the given string to a integer.
sString | The string. |
std::string StringHelper::ConvertToString | ( | int | i | ) | [static] |
Converts the given integer to a string.
i | The index. |
std::string StringHelper::ConvertToString | ( | double | i | ) | [static] |
Converts the given double to a string.
i | The. |
std::string StringHelper::ConvertToString | ( | float | i | ) | [static] |
Converts the given float to a string.
i | The. |
std::string StringHelper::ConvertToString | ( | DWORD | i | ) | [static] |
Converts the given DWORD to a string.
i | The. |
std::string StringHelper::GetStringBetween | ( | const std::string & | searchInString, |
const std::string & | first, | ||
const std::string & | last | ||
) | [static] |
Gets a string between the start and end variable.
searchInString | The search in string. |
first | The first. |
last | The last. |
std::string StringHelper::RemoveStringBetween | ( | const std::string & | searchInString, |
const std::string & | start, | ||
const std::string & | end | ||
) | [static] |
Removes a string between the given start and end variable.
searchInString | The search in string. |
start | The start. |
end | The end. |
std::string StringHelper::ReplaceString | ( | const std::string & | in, |
const std::string & | replaceThis, | ||
const std::string & | replaceWith | ||
) | [static] |
Replaces all occured replaceThis with replaceWith. This is done case sensitive.
in | The in. |
replaceThis | The replace this. |
replaceWith | The replace with. |
bool StringHelper::StringCompareCaseInsensitivity | ( | const std::string & | left, |
const std::string & | right | ||
) | [static] |
Checks if the string is the same (case insensitivity).
left | The left. |
right | The right. |
bool StringHelper::StringContainsCaseInsensitivity | ( | const std::string & | left, |
const std::string & | right | ||
) | [static] |
Checks if the left string contains the right string (case insensitivity).
left | The left. |
right | The right. |
bool StringHelper::StringEndsWith | ( | const std::string & | str, |
const std::string & | end | ||
) | [static] |
Checks if the string ends with the given end string. The check is case insensitive.
str | The string. |
end | The end. |
bool StringHelper::StringStartsWith | ( | const std::string & | str, |
const std::string & | start | ||
) | [static] |
Checks if the string starts with the given start string. The check is case insensitive.
str | The string. |
start | The start. |
std::string StringHelper::StringToLower | ( | const std::string & | strToConvert | ) | [static] |
Converts the String to lower characters.
strToConvert | The string to convert. |
std::string StringHelper::StringToUpper | ( | const std::string & | strToConvert | ) | [static] |
Converts the string to upper characters.
strToConvert | The string to convert. |
bool StringHelper::StripServerAddress | ( | const std::string & | completeURL, |
std::string & | server, | ||
int & | port, | ||
std::string & | uri | ||
) | [static] |
Strip server address to it's singel parts.
completeURL | URL of the complete. | |
[in,out] | server | The server. |
[in,out] | port | The port. |
[in,out] | uri | URI of the document. |
std::vector< std::string > StringHelper::TokenizeString | ( | const std::string & | sString, |
const std::string & | token | ||
) | [static] |
Splits the string by the given token.
sString | The string. |
token | The token. |