OpenMPTL - Helper Library
C++ Microprocessor Template Library
|
Classes | |
class | ostream |
Functions | |
template<typename Tp > | |
void | itoa_hex (char *buf, Tp value, int n=sizeof(Tp) *2, char padding='0') |
Prints "value" as hexadecimal number to buf, '0'-padded, zero terminated. More... | |
template<typename Tp > | |
std::enable_if< std::is_unsigned< Tp >::value >::type | itoa (char *buf, Tp value, int n, char padding='0') |
Prints n digits of "value" to buf, right aligned, "padding"-padded, zero terminated. More... | |
template<typename Tp > | |
std::enable_if< std::is_signed< Tp >::value >::type | itoa (char *buf, Tp value, int n, char padding='0') |
template<typename Tp > | |
ostream< Tp > & | flush (ostream< Tp > &st) |
manipulator, flushes the output stream More... | |
template<typename Tp > | |
ostream< Tp > & | endl (ostream< Tp > &st) |
manipulator, outputs newline and flushes the output stream More... | |
std::enable_if< std::is_unsigned< Tp >::value >::type poorman::itoa | ( | char * | buf, |
Tp | value, | ||
int | n, | ||
char | padding = '0' |
||
) |
Prints '~' as first character if "value" has more digits than n.
NOTE: sizeof(buf) must be at least n+1
std::enable_if< std::is_signed< Tp >::value >::type poorman::itoa | ( | char * | buf, |
Tp | value, | ||
int | n, | ||
char | padding = '0' |
||
) |
void poorman::itoa_hex | ( | char * | buf, |
Tp | value, | ||
int | n = sizeof(Tp)*2 , |
||
char | padding = '0' |
||
) |
Negative values are printed as two's complement.
NOTE: sizeof(buf) must be at least n+1