BoosterSeat  0.1
A C++ library that includes common utilities that are used in other projects.
bst::string Namespace Reference

Functions

std::string b2s (const bool b, const bool upper=false)
 
std::string f2s (const double d, const int precision=2)
 
std::string i2s (const int i)
 
std::string intToHex (const int i, const int width=2, const bool include_0x=true, const bool uppercase=true)
 Converts an integer to a hexadecimal string. More...
 

Function Documentation

◆ b2s()

std::string bst::string::b2s ( const bool  b,
const bool  upper = false 
)
inline

◆ i2s()

std::string bst::string::i2s ( const int  i)
inline

◆ f2s()

std::string bst::string::f2s ( const double  d,
const int  precision = 2 
)

◆ intToHex()

std::string bst::string::intToHex ( const int  i,
const int  width = 2,
const bool  include_0x = true,
const bool  uppercase = true 
)

Converts an integer to a hexadecimal string.

Parameters
i- The integer to convert
width- The minimum width (default: 2)
include_0x- Whether or not to include the 0x prefix (default: true)
uppercase- Whether or not to use uppercase letters (default: true)
Returns
std::string

Referenced by TEST().

Here is the caller graph for this function: