From b22c20c4db8c35eaee99075d055f74697c5805b8 Mon Sep 17 00:00:00 2001 From: Oleg Morozenkov Date: Sun, 15 Jan 2017 02:33:59 +0300 Subject: Docs --- docs/d5/d13/namespace_string_tools.html | 362 ++++++++++++++++++++++++++++++++ 1 file changed, 362 insertions(+) create mode 100644 docs/d5/d13/namespace_string_tools.html (limited to 'docs/d5/d13') diff --git a/docs/d5/d13/namespace_string_tools.html b/docs/d5/d13/namespace_string_tools.html new file mode 100644 index 0000000..58a871a --- /dev/null +++ b/docs/d5/d13/namespace_string_tools.html @@ -0,0 +1,362 @@ + + + + + + + +tgbot-cpp: StringTools Namespace Reference + + + + + + + + + + + + + + +
+
+ + + + + + +
+
tgbot-cpp +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
StringTools Namespace Reference
+
+
+ + + + + + + + + + + + + + + + +

+Functions

bool startsWith (const std::string &str1, const std::string &str2)
 
bool endsWith (const std::string &str1, const std::string &str2)
 
void split (const std::string &str, char delimiter, std::vector< std::string > &dest)
 
std::string generateRandomString (size_t length)
 
std::string urlEncode (const std::string &value, const std::string &additionalLegitChars="")
 
std::string urlDecode (const std::string &value)
 
std::vector< std::string > split (const std::string &str, char delimiter)
 
+

Function Documentation

+ +

◆ endsWith()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool StringTools::endsWith (const std::string & str1,
const std::string & str2 
)
+
+

Checks if first string is ending with second string

Parameters
+ + + +
str1First string
str2Second string
+
+
+ +
+
+ +

◆ generateRandomString()

+ +
+
+ + + + + + + + +
std::string StringTools::generateRandomString (size_t length)
+
+

Generates pseudo random string. It's recommended to call srand before this method.

Parameters
+ + +
lengthLength of resulting string.
+
+
+ +
+
+ +

◆ split() [1/2]

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
void StringTools::split (const std::string & str,
char delimiter,
std::vector< std::string > & dest 
)
+
+

Splits string to smaller substrings which have between them a delimiter. Resulting substrings won't have delimiter.

Parameters
+ + + + +
strSource string
delimiterDelimiter
destArray to which substrings will be saved.
+
+
+ +
+
+ +

◆ split() [2/2]

+ +
+
+ + + + + +
+ + + + + + + + + + + + + + + + + + +
std::vector<std::string> StringTools::split (const std::string & str,
char delimiter 
)
+
+inline
+
+

Splits string to smaller substrings which have between them a delimiter. Resulting substrings won't have delimiter.

Parameters
+ + + +
strSource string
delimiterDelimiter
+
+
+
Returns
Array of substrings
+ +

Definition at line 84 of file StringTools.h.

+ +
+
+ +

◆ startsWith()

+ +
+
+ + + + + + + + + + + + + + + + + + +
bool StringTools::startsWith (const std::string & str1,
const std::string & str2 
)
+
+

Checks if first string is starting with second string

Parameters
+ + + +
str1First string
str2Second string
+
+
+ +
+
+ +

◆ urlDecode()

+ +
+
+ + + + + + + + +
std::string StringTools::urlDecode (const std::string & value)
+
+

Performs url decode.

Parameters
+ + +
valueEncoded url string
+
+
+
Returns
Decoded url string
+ +
+
+ +

◆ urlEncode()

+ +
+
+ + + + + + + + + + + + + + + + + + +
std::string StringTools::urlEncode (const std::string & value,
const std::string & additionalLegitChars = "" 
)
+
+

Performs url encode.

Parameters
+ + + +
valueSource url string
additionalLegitCharsOptional. String of chars which will be not encoded in source url string.
+
+
+
Returns
Encoded url string
+ +
+
+
+
+ + + + -- cgit v1.2.3