#include <string_base.h>
Definition at line 563 of file string_base.h.
pfc::format_int::format_int |
( |
t_int64 |
p_val, |
|
|
unsigned |
p_width = 0 , |
|
|
unsigned |
p_base = 10 |
|
) |
| |
Definition at line 608 of file string_base.cpp.
612 if (p_val < 0) {neg =
true; val = (
t_uint64)(-p_val);}
615 enum {max_width = PFC_TABSIZE(
m_buffer) - 1};
617 if (p_width > max_width) p_width = max_width;
618 else if (p_width == 0) p_width = 1;
620 if (neg && p_width > 1) p_width --;
622 char temp[max_width];
625 for(n=0;n<max_width;n++)
631 for(n=0;n<max_width && temp[n] ==
'0';n++) {}
633 if (n > max_width - p_width) n = max_width - p_width;
637 if (neg) *(out++) =
'-';
639 for(;n<max_width;n++)
char format_hex_char(unsigned p_val)
pfc::format_int::format_int |
( |
const format_int & |
p_source | ) |
|
|
inline |
const char* pfc::format_int::get_ptr |
( |
| ) |
const |
|
inline |
pfc::format_int::operator const char * |
( |
| ) |
const |
|
inline |
const char* pfc::format_int::toString |
( |
| ) |
const |
|
inline |
char pfc::format_int::m_buffer[64] |
|
private |
The documentation for this class was generated from the following files: