My Project
SallyAPI::String::StringHelper Class Reference

String helper. More...

#include <StringHelper.h>

List of all members.

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).

Detailed Description

String helper.

Author:
Christian Knobloch
Date:
19.04.2010

Member Function Documentation

std::string StringHelper::base64_decode ( std::string const &  encoded_string) [static]

Base 64 decode.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
[in,out]encoded_stringThe encoded string.
Returns:
.
std::string StringHelper::base64_encode ( unsigned char const *  bytes_to_encode,
unsigned int  in_len 
) [static]

Base 64 encode.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
[in,out]bytes_to_encodeIf non-null, the bytes to encode.
in_lenLength of the in.
Returns:
.
std::string StringHelper::ConvertDoubleToString ( double  i) [static]

Converts the given double to a string.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
iThe.
Returns:
.
std::string StringHelper::ConvertFloatToString ( float  i) [static]

Converts the given float to a string.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
iThe.
Returns:
.
double StringHelper::ConvertToDouble ( const std::string &  sString) [static]

Converts the given string to a double.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
sStringThe string.
Returns:
.
float StringHelper::ConvertToFloat ( const std::string &  sString) [static]

Converts the given string to a float.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
sStringThe string.
Returns:
.
int StringHelper::ConvertToInt ( const std::string &  sString) [static]

Converts the given string to a integer.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
sStringThe string.
Returns:
.
std::string StringHelper::ConvertToString ( int  i) [static]

Converts the given integer to a string.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
iThe index.
Returns:
.
std::string StringHelper::ConvertToString ( double  i) [static]

Converts the given double to a string.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
iThe.
Returns:
.
std::string StringHelper::ConvertToString ( float  i) [static]

Converts the given float to a string.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
iThe.
Returns:
.
std::string StringHelper::ConvertToString ( DWORD  i) [static]

Converts the given DWORD to a string.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
iThe.
Returns:
.
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.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
searchInStringThe search in string.
firstThe first.
lastThe last.
Returns:
The string between.
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.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
searchInStringThe search in string.
startThe start.
endThe end.
Returns:
The new string.
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.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
inThe in.
replaceThisThe replace this.
replaceWithThe replace with.
Returns:
.
bool StringHelper::StringCompareCaseInsensitivity ( const std::string &  left,
const std::string &  right 
) [static]

Checks if the string is the same (case insensitivity).

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
leftThe left.
rightThe right.
Returns:
true if it succeeds, false if it fails.
bool StringHelper::StringContainsCaseInsensitivity ( const std::string &  left,
const std::string &  right 
) [static]

Checks if the left string contains the right string (case insensitivity).

Author:
Christian Knobloch
Date:
08.07.2011
Parameters:
leftThe left.
rightThe right.
Returns:
true if it succeeds, false if it fails.
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.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
strThe string.
endThe end.
Returns:
true if it succeeds, false if it fails.
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.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
strThe string.
startThe start.
Returns:
true if it succeeds, false if it fails.
std::string StringHelper::StringToLower ( const std::string &  strToConvert) [static]

Converts the String to lower characters.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
strToConvertThe string to convert.
Returns:
.
std::string StringHelper::StringToUpper ( const std::string &  strToConvert) [static]

Converts the string to upper characters.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
strToConvertThe string to convert.
Returns:
.
bool StringHelper::StripServerAddress ( const std::string &  completeURL,
std::string &  server,
int &  port,
std::string &  uri 
) [static]

Strip server address to it's singel parts.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
completeURLURL of the complete.
[in,out]serverThe server.
[in,out]portThe port.
[in,out]uriURI of the document.
Returns:
true if it succeeds, false if it fails.
std::vector< std::string > StringHelper::TokenizeString ( const std::string &  sString,
const std::string &  token 
) [static]

Splits the string by the given token.

Author:
Christian Knobloch
Date:
19.04.2010
Parameters:
sStringThe string.
tokenThe token.
Returns:
.

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines