various utilities
More...
|
| http |
| HTTP utilities, meant for project internal usage.
|
|
void tgbot::utils::encode |
( |
std::stringstream & |
stream, |
|
|
const std::string & |
target |
|
) |
| |
Encode URL paramter using a stringstream.
- Parameters
-
std::string tgbot::utils::encode |
( |
const std::string & |
target | ) |
|
Encode URL paramter and return a new std::string object.
- Parameters
-
- Returns
- encoded std::string
std::string tgbot::utils::get_current_time |
( |
const std::string & |
fmt | ) |
|
get current localtime, with specific formatting
- Parameters
-
fmt | format string for time |
- Returns
- current localtime with "fmt" formatting
template<typename PtrType , typename... TypeArgs>
types::Ptr<PtrType> tgbot::utils::makePtr |
( |
TypeArgs &&... |
args_fwd | ) |
|
|
inline |
Make a new tgbot::types::Ptr.
- Template Parameters
-
- Parameters
-
args_fwd | : argument to be forwarded to constructor |
- Returns
- a new tgbot::types::Ptr holding your pointer
bool tgbot::utils::whenContains |
( |
const std::string & |
target, |
|
|
const char * |
what |
|
) |
| |
|
inline |
bool tgbot::utils::whenStarts |
( |
const std::string & |
target, |
|
|
const char * |
what |
|
) |
| |
|
inline |