Otclient  14/8/2020
string.h File Reference
#include <string>
#include <cstring>
#include <vector>
#include "types.h"
#include "cast.h"
Include dependency graph for string.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 stdext
 

Functions

template<typename T >
std::string stdext::to_string (const T &t)
 
template<typename T >
stdext::from_string (const std::string &str, T def=T())
 
std::string stdext::resolve_path (const std::string &filePath, std::string sourcePath)
 Resolve a file path by combining sourcePath with filePath. More...
 
std::string stdext::date_time_string ()
 Get current date and time in a std::string. More...
 
std::string stdext::dec_to_hex (uint64_t num)
 
uint64_t stdext::hex_to_dec (const std::string &str)
 
void stdext::tolower (std::string &str)
 
void stdext::toupper (std::string &str)
 
void stdext::trim (std::string &str)
 
void stdext::ucwords (std::string &str)
 
char stdext::upchar (char c)
 
char stdext::lochar (char c)
 
bool stdext::ends_with (const std::string &str, const std::string &test)
 
bool stdext::starts_with (const std::string &str, const std::string &test)
 
void stdext::replace_all (std::string &str, const std::string &search, const std::string &replacement)
 
bool stdext::is_valid_utf8 (const std::string &src)
 
std::string stdext::utf8_to_latin1 (const std::string &src)
 
std::string stdext::latin1_to_utf8 (const std::string &src)
 
std::vector< std::string > stdext::split (const std::string &str, const std::string &separators)