D++ (DPP)  10.0.30
C++ Discord API Bot Library
stringops.h File Reference
#include <string>
#include <iomanip>
#include <locale>
#include <algorithm>
#include <sstream>
#include <iostream>
#include <charconv>
Include dependency graph for stringops.h:

Namespaces

 dpp
 The main namespace for D++ functions.
 

Functions

template<class T >
std::string dpp::comma (T value)
 Add commas to a string (or dots) based on current locale server-side. More...
 
template<typename T >
dpp::from_string (const std::string &s)
 Convert any value from a string to another type using stringstream. More...
 
template<uint64_t >
uint64_t dpp::from_string (const std::string &s)
 Specialised conversion of uint64_t from string. More...
 
template<uint32_t >
uint32_t dpp::from_string (const std::string &s)
 Specialised conversion of uint32_t from string. More...
 
template<int >
int dpp::from_string (const std::string &s)
 Specialised conversion of int from string. More...
 
template<typename T >
dpp::from_string (const std::string &s, std::ios_base &(*f)(std::ios_base &))
 Convert any value from a string to another type using stringstream. More...
 
template<typename T >
std::string dpp::leading_zeroes (T i, size_t width)
 Format a numeric type as a string with leading zeroes. More...
 
template<typename T >
std::basic_string< T > dpp::lowercase (const std::basic_string< T > &s)
 Convert a string to lowercase using tolower() More...
 
std::string dpp::ltrim (std::string s)
 trim from beginning of string (left) More...
 
std::string dpp::rtrim (std::string s)
 trim from end of string (right) More...
 
template<typename T >
std::string dpp::to_hex (T i, bool leading_zeroes=true)
 Convert a numeric value to hex. More...
 
std::string dpp::trim (std::string s)
 Trim from both ends of string (right then left) More...
 
template<typename T >
std::basic_string< T > dpp::uppercase (const std::basic_string< T > &s)
 Convert a string to uppercase using toupper() More...