Monero
Loading...
Searching...
No Matches
epee::string_tools Namespace Reference

Functions

std::string buff_to_hex_nodelimer (const std::string &src)
bool parse_hexstr_to_binbuff (const boost::string_ref s, std::string &res)
std::string get_ip_string_from_int32 (uint32_t ip)
bool get_ip_int32_from_string (uint32_t &ip, const std::string &ip_str)
bool parse_peer_from_string (uint32_t &ip, uint16_t &port, const std::string &addres)
std::string num_to_string_fast (int64_t val)
bool compare_no_case (const std::string &str1, const std::string &str2)
std::string & get_current_module_name ()
std::string & get_current_module_folder ()
void set_module_name_and_folder (const std::string &path_to_process_)
std::string & trim (std::string &str)
std::string trim (const std::string &str)
std::string pad_string (std::string s, size_t n, char c=' ', bool prepend=false)
template<class t_pod_type>
std::string pod_to_hex (const t_pod_type &s)
template<class t_pod_type>
bool hex_to_pod (const boost::string_ref hex_str, t_pod_type &s)
template<class t_pod_type>
bool hex_to_pod (const boost::string_ref hex_str, tools::scrubbed< t_pod_type > &s)
template<class t_pod_type>
bool hex_to_pod (const boost::string_ref hex_str, epee::mlocked< t_pod_type > &s)
template<typename T>
std::string to_string_hex (const T &val)
bool validate_hex (uint64_t length, const std::string &str)
std::string get_extension (const std::string &str)
std::string cut_off_extension (const std::string &str)
template<class XType>
PUSH_WARNINGS bool get_xtype_from_string (OUT XType &val, const std::string &str_id)
template<class XType>
POP_WARNINGS bool xtype_to_string (const XType &val, std::string &str)

Function Documentation

◆ buff_to_hex_nodelimer()

std::string epee::string_tools::buff_to_hex_nodelimer ( const std::string & src)
inline

◆ compare_no_case()

bool epee::string_tools::compare_no_case ( const std::string & str1,
const std::string & str2 )

◆ cut_off_extension()

std::string epee::string_tools::cut_off_extension ( const std::string & str)

◆ get_current_module_folder()

std::string & epee::string_tools::get_current_module_folder ( )

◆ get_current_module_name()

std::string & epee::string_tools::get_current_module_name ( )

◆ get_extension()

std::string epee::string_tools::get_extension ( const std::string & str)

◆ get_ip_int32_from_string()

bool epee::string_tools::get_ip_int32_from_string ( uint32_t & ip,
const std::string & ip_str )

◆ get_ip_string_from_int32()

std::string epee::string_tools::get_ip_string_from_int32 ( uint32_t ip)

◆ get_xtype_from_string()

template<class XType>
PUSH_WARNINGS bool epee::string_tools::get_xtype_from_string ( OUT XType & val,
const std::string & str_id )
inline

◆ hex_to_pod() [1/3]

template<class t_pod_type>
bool epee::string_tools::hex_to_pod ( const boost::string_ref hex_str,
epee::mlocked< t_pod_type > & s )

◆ hex_to_pod() [2/3]

template<class t_pod_type>
bool epee::string_tools::hex_to_pod ( const boost::string_ref hex_str,
t_pod_type & s )

◆ hex_to_pod() [3/3]

template<class t_pod_type>
bool epee::string_tools::hex_to_pod ( const boost::string_ref hex_str,
tools::scrubbed< t_pod_type > & s )

◆ num_to_string_fast()

std::string epee::string_tools::num_to_string_fast ( int64_t val)

◆ pad_string()

std::string epee::string_tools::pad_string ( std::string s,
size_t n,
char c = ' ',
bool prepend = false )

◆ parse_hexstr_to_binbuff()

bool epee::string_tools::parse_hexstr_to_binbuff ( const boost::string_ref s,
std::string & res )
inline

◆ parse_peer_from_string()

bool epee::string_tools::parse_peer_from_string ( uint32_t & ip,
uint16_t & port,
const std::string & addres )

◆ pod_to_hex()

template<class t_pod_type>
std::string epee::string_tools::pod_to_hex ( const t_pod_type & s)

◆ set_module_name_and_folder()

void epee::string_tools::set_module_name_and_folder ( const std::string & path_to_process_)

◆ to_string_hex()

template<typename T>
std::string epee::string_tools::to_string_hex ( const T & val)
inline

◆ trim() [1/2]

std::string epee::string_tools::trim ( const std::string & str)
inline

◆ trim() [2/2]

std::string & epee::string_tools::trim ( std::string & str)
inline

◆ validate_hex()

bool epee::string_tools::validate_hex ( uint64_t length,
const std::string & str )

◆ xtype_to_string()

template<class XType>
POP_WARNINGS bool epee::string_tools::xtype_to_string ( const XType & val,
std::string & str )
inline