rvm 1.08
|
An extended string class. More...
#include <estring.h>
Public Types | |
enum | alignment { left, right, center } |
Alignment values for formatted strings. More... | |
enum | set_from_type { type_string, type_unsigned_int, type_int, type_unsigned_short, type_short, type_unsigned_long, type_long, type_unsigned_long_long, type_long_long, type_float, type_double, type_char_ptr, type_void_ptr, type_unknown } |
The type last assigned. More... | |
typedef std::string | value_type |
The type from which estring inherits, std::string. | |
typedef value_type::size_type | size_type |
The size type. | |
Public Member Functions | |
void | init (void) |
Initialize the estring object. | |
void | clear (void) |
Erase the string value. | |
void | reset (void) |
Erase and reinitialize. | |
estring () | |
Default constructor. | |
size_type | width (const size_type a_l) |
Set the width of a formatted string. | |
size_type | width (void) const |
Retrieve the set width for formatted strings. | |
alignment | align (const alignment a_alignment) |
Set the alignment used for formatted strings. | |
alignment | align (void) const |
Retrieve the set alignment for formatted strings. | |
char | left_fillchar (const char a_char) |
Set the fill character used to padd the left side of a formatted string. | |
char | left_fillchar (void) const |
Retrieve the fill character used to padd the left side of a formatted string. | |
char | right_fillchar (const char a_char) |
Set the fill character used to padd the right side of a formatted string. | |
char | right_fillchar (void) const |
Retrieve the fill character used to padd the right side of a formatted string. | |
void | fillchar (const char a_char) |
Set the fill character used for padding both the left and right side of a formatted string. | |
value_type | fmt_str (void) |
Generate a formatted string. | |
value_type | fmt_str (const size_type a_width, const alignment a_alignment, const char a_left_fill, const char a_right_fill) |
Set all the formatting options. | |
size_type | precision (size_type a_p) |
Set the precision used in converting to/from fractional types. | |
size_type | precision (void) const |
Retrieve the set precision used in fractional conversions. | |
const unsigned int | base (const unsigned int a_base) |
Set the base used in numeric conversions. | |
const unsigned int | base (void) const |
Retrieve the base used in numeric conversions. | |
const set_from_type & | get_from_type (void) const |
Retrieve the type of value being held by this estring. | |
const estring_value & | get_from_value (void) const |
Retrieve the typeless_value being held by this estring. | |
estring (const estring &a_estr) | |
Copy constructor for estring objects. | |
estring & | assign (const estring &a_estr) |
Assignment for estring objects. | |
estring & | operator= (const estring &a_estr) |
Assignment operator for estring objects. | |
estring & | lower (void) |
Convert all characters to lowercase. | |
estring & | upper (void) |
Convert all characters to uppercase. | |
estring (const char a_char) | |
Copy constructor for chars. | |
estring & | assign (const char a_char) |
Assignment for chars. | |
estring & | operator= (const char a_char) |
Assignment operator for chars. | |
estring (const value_type &a_string) | |
Copy constructor for std::string objects. | |
estring & | assign (const value_type &a_string) |
Assignment for std::string objects. | |
estring & | operator= (const value_type &a_string) |
Assignment operator for std::string objects. | |
estring (const unsigned int a_int) | |
Copy constructor for unsigned ints. | |
estring & | assign (const unsigned int a_int) |
Assignment for unsigned ints. | |
estring & | operator= (const unsigned int a_int) |
Assignment operator for unsigned ints. | |
operator unsigned int () const | |
Implicit conversion operator to an unsigned int. | |
estring (const int a_int) | |
estring & | assign (const int a_int) |
estring & | operator= (const int a_int) |
operator int () const | |
estring (const unsigned short a_short) | |
estring & | assign (const unsigned short a_short) |
estring & | operator= (const unsigned short a_short) |
operator unsigned short () const | |
estring (const short a_short) | |
estring & | assign (const short a_short) |
estring & | operator= (const short a_short) |
operator short () const | |
estring (const unsigned long a_long) | |
estring & | assign (const unsigned long a_long) |
estring & | operator= (const unsigned long a_long) |
operator unsigned long () const | |
estring (const long a_long) | |
estring & | assign (const long a_long) |
estring & | operator= (const long a_long) |
operator long () const | |
estring (const unsigned long long a_long) | |
estring & | assign (const unsigned long long a_long) |
estring & | operator= (const unsigned long long a_long) |
operator unsigned long long () const | |
estring (const long long a_long) | |
estring & | assign (const long long a_long) |
estring & | operator= (const long long a_long) |
operator long long () const | |
estring (char const *a_ptr) | |
estring & | assign (char const *a_ptr) |
estring & | operator= (char const *a_ptr) |
operator char const * () const | |
estring (void *const a_ptr) | |
estring & | assign (void *const a_ptr) |
estring & | operator= (void *const a_ptr) |
operator void * () const | |
estring (const float a_float) | |
estring & | assign (const float a_float) |
estring & | operator= (const float a_float) |
estring (const float a_float, unsigned a_precision, unsigned int a_base=10) | |
estring & | assign (const float a_float, unsigned a_precision, unsigned int a_base=10) |
operator float () const | |
estring (const double a_double) | |
estring & | assign (const double a_double) |
estring & | operator= (const double a_double) |
estring (const double a_double, unsigned a_precision, unsigned int a_base=10) | |
estring & | assign (const double a_double, unsigned a_precision, unsigned int a_base=10) |
operator double () const | |
Private Member Functions | |
template<class T > | |
void | T_fraction_to_strings (const T &a_t, value_type &a_ws, value_type &a_fs) |
Helper member template function to convert a fractional type to an estring. | |
template<class T > | |
void | T_integral_to_string (const T &a_t, value_type &a_str) |
Helper member template function to convert an integral type to an estring. | |
template<class T > | |
void | T_string_to_integral (const value_type &a_str, T &a_t) const |
Helper member template function to convert a string to an integral type. | |
template<class T > | |
void | T_string_to_signed_integral (const value_type &a_str, T &a_t) const |
Helper member template function to convert a string to a signed integral. | |
template<class T > | |
void | T_string_to_fractional (const value_type &a_str, T &a_t) const |
Helper member template function to convert a string to a fractional. | |
Private Attributes | |
size_type | m_precision |
The current fractional number precision. | |
unsigned int | m_base |
The current numerical base. | |
size_type | m_width |
The current formatting width. | |
alignment | m_alignment |
The current formatting alignment. | |
char | m_left_fillchar |
The current left-hand fill character. | |
char | m_right_fillchar |
The current right-hand fill character. | |
set_from_type | m_type |
The current value type. | |
estring_value | m_value |
The current value. | |
Static Private Attributes | |
static const char * | m_alphabet = "0123456789abcdefghijklmnopqrstuvwxyz" |
The alphabet used for any base from 2 to 36. | |
static const size_t | m_alphabet_len = 36 |
The length of the alphabet. |
An extended string class.
Estring is a derivative of std::string with extra functionality added in order to fascilitate (a) the conversion to strings from other types, (b) special formatting of those converted strings, and (c) the conversion back from a string to some other type.
typedef value_type::size_type estring::size_type |
typedef std::string estring::value_type |
enum estring::alignment |
The type last assigned.
estring::estring | ( | ) |
Default constructor.
Definition at line 417 of file estring.cc.
References init().
estring::estring | ( | const estring & | a_estr | ) |
Copy constructor for estring objects.
Variables:
Exceptions:
Definition at line 820 of file estring.cc.
References assign(), and init().
estring::estring | ( | const char | a_char | ) |
Copy constructor for chars.
Exceptions:
Definition at line 912 of file estring.cc.
References assign(), and init().
estring::estring | ( | const value_type & | a_string | ) |
Copy constructor for std::string objects.
Variables:
Exceptions:
Definition at line 968 of file estring.cc.
References assign(), and init().
estring::estring | ( | const unsigned int | a_int | ) |
Copy constructor for unsigned ints.
Variables:
Exceptions:
Definition at line 1021 of file estring.cc.
References assign(), and init().
estring::estring | ( | const int | a_int | ) |
Definition at line 1077 of file estring.cc.
References assign(), and init().
estring::estring | ( | const unsigned short | a_short | ) |
Definition at line 1120 of file estring.cc.
References assign(), and init().
estring::estring | ( | const short | a_short | ) |
Definition at line 1159 of file estring.cc.
References assign(), and init().
estring::estring | ( | const unsigned long | a_long | ) |
Definition at line 1202 of file estring.cc.
References assign(), and init().
estring::estring | ( | const long | a_long | ) |
Definition at line 1241 of file estring.cc.
References assign(), and init().
estring::estring | ( | const unsigned long long | a_long | ) |
Definition at line 1284 of file estring.cc.
References assign(), and init().
estring::estring | ( | const long long | a_long | ) |
Definition at line 1323 of file estring.cc.
References assign(), and init().
estring::estring | ( | char const * | a_ptr | ) |
Definition at line 1366 of file estring.cc.
References assign(), and init().
estring::estring | ( | void *const | a_ptr | ) |
Definition at line 1407 of file estring.cc.
References assign(), and init().
estring::estring | ( | const float | a_float | ) |
Definition at line 1449 of file estring.cc.
References assign(), and init().
estring::estring | ( | const float | a_float, |
unsigned | a_precision, | ||
unsigned int | a_base = 10 |
||
) |
Definition at line 1483 of file estring.cc.
References assign(), and init().
estring::estring | ( | const double | a_double | ) |
Definition at line 1516 of file estring.cc.
References assign(), and init().
estring::estring | ( | const double | a_double, |
unsigned | a_precision, | ||
unsigned int | a_base = 10 |
||
) |
Definition at line 1550 of file estring.cc.
References assign(), and init().
estring::alignment estring::align | ( | const alignment | a_alignment | ) |
Set the alignment used for formatted strings.
Vaiables:
Definition at line 457 of file estring.cc.
References m_alignment.
Referenced by report_manager::format_synopsis(), jobs_report::format_synopsis(), vault_report::format_synopsis(), timestamp::make_str_(), num_to_string(), percent_string(), test1(), test4(), jobs_report::write_report(), and vault_report::write_report().
estring::alignment estring::align | ( | void | ) | const |
Retrieve the set alignment for formatted strings.
Returns:
Definition at line 472 of file estring.cc.
References m_alignment.
Referenced by fmt_str().
Assignment for estring objects.
Variables:
Returns:
Exceptions:
Definition at line 839 of file estring.cc.
References m_alignment, m_left_fillchar, m_precision, m_right_fillchar, m_type, m_value, m_width, and TRY_nomem.
Referenced by assign(), base(), estring(), operator=(), precision(), and test2().
estring & estring::assign | ( | const int | a_int | ) |
Definition at line 1083 of file estring.cc.
References assign(), estring_value::clear(), m_type, m_value, TRY, TRY_nomem, type_int, and estring_value::value.
estring & estring::assign | ( | const unsigned short | a_short | ) |
Definition at line 1126 of file estring.cc.
References estring_value::clear(), m_type, m_value, T_integral_to_string(), TRY, TRY_nomem, type_unsigned_short, and estring_value::value.
estring & estring::assign | ( | const double | a_double, |
unsigned | a_precision, | ||
unsigned int | a_base = 10 |
||
) |
Definition at line 1557 of file estring.cc.
References assign(), and precision().
estring & estring::assign | ( | const short | a_short | ) |
Definition at line 1165 of file estring.cc.
References assign(), estring_value::clear(), m_type, m_value, TRY, TRY_nomem, type_short, and estring_value::value.
estring & estring::assign | ( | const unsigned long | a_long | ) |
Definition at line 1208 of file estring.cc.
References estring_value::clear(), m_type, m_value, T_integral_to_string(), TRY, TRY_nomem, type_unsigned_long, and estring_value::value.
estring & estring::assign | ( | const long | a_long | ) |
Definition at line 1247 of file estring.cc.
References assign(), estring_value::clear(), m_type, m_value, TRY, TRY_nomem, type_long, and estring_value::value.
estring & estring::assign | ( | const unsigned long long | a_long | ) |
Definition at line 1290 of file estring.cc.
References estring_value::clear(), m_type, m_value, T_integral_to_string(), TRY, TRY_nomem, type_unsigned_long_long, and estring_value::value.
estring & estring::assign | ( | const char | a_char | ) |
Assignment for chars.
Variables:
Returns:
Exceptions:
Definition at line 929 of file estring.cc.
References m_type, TRY_nomem, and type_string.
estring & estring::assign | ( | const long long | a_long | ) |
Definition at line 1329 of file estring.cc.
References assign(), estring_value::clear(), m_type, m_value, TRY, TRY_nomem, type_long_long, and estring_value::value.
estring & estring::assign | ( | const value_type & | a_string | ) |
Assignment for std::string objects.
Variables:
Returns:
Exceptions:
Definition at line 985 of file estring.cc.
References m_type, TRY_nomem, and type_string.
estring & estring::assign | ( | char const * | a_ptr | ) |
Definition at line 1372 of file estring.cc.
References assign(), estring_value::clear(), m_type, m_value, TRY_nomem, type_char_ptr, and estring_value::value.
estring & estring::assign | ( | const unsigned int | a_int | ) |
Assignment for unsigned ints.
Variables:
Returns:
Exceptions:
Definition at line 1040 of file estring.cc.
References estring_value::clear(), m_type, m_value, T_integral_to_string(), TRY, TRY_nomem, type_unsigned_int, and estring_value::value.
estring & estring::assign | ( | void *const | a_ptr | ) |
Definition at line 1413 of file estring.cc.
References estring_value::clear(), m_type, m_value, TRY_nomem, type_void_ptr, and estring_value::value.
estring & estring::assign | ( | const float | a_float | ) |
Definition at line 1455 of file estring.cc.
References estring_value::clear(), m_type, m_value, T_fraction_to_strings(), TRY, TRY_nomem, type_float, and estring_value::value.
estring & estring::assign | ( | const float | a_float, |
unsigned | a_precision, | ||
unsigned int | a_base = 10 |
||
) |
Definition at line 1490 of file estring.cc.
References assign(), base(), and precision().
estring & estring::assign | ( | const double | a_double | ) |
Definition at line 1522 of file estring.cc.
References estring_value::clear(), m_type, m_value, T_fraction_to_strings(), TRY, TRY_nomem, type_double, and estring_value::value.
const unsigned int estring::base | ( | void | ) | const |
Retrieve the base used in numeric conversions.
Returns:
Definition at line 575 of file estring.cc.
References m_base.
Referenced by assign().
const unsigned int estring::base | ( | const unsigned int | a_base | ) |
Set the base used in numeric conversions.
Variables:
Return:
Exceptions:
Definition at line 526 of file estring.cc.
References assign(), ERROR, m_alphabet_len, m_base, m_type, m_value, TRY_nomem, type_double, type_float, type_int, type_long, type_long_long, type_short, type_unsigned_int, type_unsigned_long, type_unsigned_long_long, type_unsigned_short, and estring_value::value.
Referenced by test3(), and test4().
void estring::clear | ( | void | ) |
Erase the string value.
Definition at line 400 of file estring.cc.
Referenced by archive_manager::archive(), and reset().
void estring::fillchar | ( | const char | a_char | ) |
Set the fill character used for padding both the left and right side of a formatted string.
Variables:
Definition at line 648 of file estring.cc.
References left_fillchar(), and right_fillchar().
Referenced by report_manager::mf_write_header(), percent_string(), jobs_report::write_report(), and vault_report::write_report().
estring::value_type estring::fmt_str | ( | void | ) |
Generate a formatted string.
Returns:
If the string being printed is wider than the assigned width then as many as three periods are used ("...") to denote that the contents of the string have been truncated. For strings that use left alignment these three periods are printed on the right-hand side of the string, while showing as many characters on the left as possible beginning with the left-most character. For strings that use right alignment these three periods are printed on the left-hand side of the string, while showing as many characters on the right as possible includingn the right-most character. For strings that are center-aligned as many characters on both the left and the right are printed, including the left-most and the right-most characters, while characters in the center of the string are replaced with the three periods.
Definition at line 674 of file estring.cc.
References left, m_alignment, m_left_fillchar, m_right_fillchar, m_width, right, and TRY_nomem.
Referenced by fmt_str(), timestamp::make_str_(), make_time_string_(), timer::mf_make_timer_string(), num_to_string(), percent_string(), test1(), test2(), table::write(), table_cell_table::write(), and table_cell_estring::write().
estring::value_type estring::fmt_str | ( | const size_type | a_width, |
const alignment | a_alignment, | ||
const char | a_left_fill, | ||
const char | a_right_fill | ||
) |
Set all the formatting options.
Variables:
Returns:
Definition at line 770 of file estring.cc.
References align(), fmt_str(), left_fillchar(), right_fillchar(), and width().
const estring::set_from_type & estring::get_from_type | ( | void | ) | const |
Retrieve the type of value being held by this estring.
Returns:
Definition at line 796 of file estring.cc.
References m_type.
Referenced by test4().
const estring_value & estring::get_from_value | ( | void | ) | const |
Retrieve the typeless_value being held by this estring.
Returns:
Definition at line 807 of file estring.cc.
References m_value.
void estring::init | ( | void | ) |
Initialize the estring object.
Defaults:
Definition at line 387 of file estring.cc.
References left, m_alignment, m_base, m_left_fillchar, m_precision, m_right_fillchar, m_type, m_width, and type_unknown.
char estring::left_fillchar | ( | const char | a_char | ) |
Set the fill character used to padd the left side of a formatted string.
Variables:
Returns:
Definition at line 589 of file estring.cc.
References m_left_fillchar.
Referenced by timestamp::make_str_(), and test1().
char estring::left_fillchar | ( | void | ) | const |
Retrieve the fill character used to padd the left side of a formatted string.
Returns:
Definition at line 606 of file estring.cc.
References m_left_fillchar.
Referenced by fillchar(), and fmt_str().
estring & estring::lower | ( | void | ) |
Convert all characters to lowercase.
Returns:
Definition at line 877 of file estring.cc.
Referenced by archive_path_element::assign(), parse_line(), and test5().
estring::operator char const * | ( | ) | const |
Definition at line 1392 of file estring.cc.
References ERROR, m_type, m_value, type_char_ptr, type_void_ptr, and estring_value::value.
estring::operator double | ( | ) | const |
Definition at line 1571 of file estring.cc.
References T_string_to_fractional(), and TRY.
estring::operator float | ( | ) | const |
Definition at line 1504 of file estring.cc.
References T_string_to_fractional(), and TRY.
estring::operator int | ( | ) | const |
Definition at line 1108 of file estring.cc.
References T_string_to_signed_integral(), and TRY.
estring::operator long | ( | ) | const |
Definition at line 1272 of file estring.cc.
References T_string_to_signed_integral(), and TRY.
estring::operator long long | ( | ) | const |
Definition at line 1354 of file estring.cc.
References T_string_to_signed_integral(), and TRY.
estring::operator short | ( | ) | const |
Definition at line 1190 of file estring.cc.
References T_string_to_signed_integral(), and TRY.
estring::operator unsigned int | ( | ) | const |
Implicit conversion operator to an unsigned int.
Definition at line 1065 of file estring.cc.
References T_string_to_integral(), and TRY.
estring::operator unsigned long | ( | ) | const |
Definition at line 1229 of file estring.cc.
References T_string_to_integral(), and TRY.
estring::operator unsigned long long | ( | ) | const |
Definition at line 1311 of file estring.cc.
References T_string_to_integral(), and TRY.
estring::operator unsigned short | ( | ) | const |
Definition at line 1147 of file estring.cc.
References T_string_to_integral(), and TRY.
estring::operator void * | ( | ) | const |
Definition at line 1434 of file estring.cc.
References ERROR, m_type, m_value, type_char_ptr, type_void_ptr, and estring_value::value.
estring & estring::operator= | ( | void *const | a_ptr | ) |
Definition at line 1427 of file estring.cc.
References assign().
estring & estring::operator= | ( | const double | a_double | ) |
Definition at line 1543 of file estring.cc.
References assign().
estring & estring::operator= | ( | const int | a_int | ) |
Definition at line 1101 of file estring.cc.
References assign().
estring & estring::operator= | ( | const unsigned short | a_short | ) |
Definition at line 1140 of file estring.cc.
References assign().
estring & estring::operator= | ( | const char | a_char | ) |
Assignment operator for chars.
Variables:
Returns:
Exceptions:
Definition at line 951 of file estring.cc.
References assign().
estring & estring::operator= | ( | const short | a_short | ) |
Definition at line 1183 of file estring.cc.
References assign().
Assignment operator for estring objects.
Variables:
Returns:
Exceptions:
Definition at line 864 of file estring.cc.
References assign().
estring & estring::operator= | ( | const unsigned int | a_int | ) |
Assignment operator for unsigned ints.
Definition at line 1056 of file estring.cc.
References assign().
estring & estring::operator= | ( | const unsigned long | a_long | ) |
Definition at line 1222 of file estring.cc.
References assign().
estring & estring::operator= | ( | const long | a_long | ) |
Definition at line 1265 of file estring.cc.
References assign().
estring & estring::operator= | ( | const unsigned long long | a_long | ) |
Definition at line 1304 of file estring.cc.
References assign().
estring & estring::operator= | ( | const long long | a_long | ) |
Definition at line 1347 of file estring.cc.
References assign().
estring & estring::operator= | ( | char const * | a_ptr | ) |
Definition at line 1385 of file estring.cc.
References assign().
estring & estring::operator= | ( | const float | a_float | ) |
Definition at line 1476 of file estring.cc.
References assign().
estring & estring::operator= | ( | const value_type & | a_string | ) |
Assignment operator for std::string objects.
Variables:
Returns:
Exceptions:
Definition at line 1004 of file estring.cc.
References assign().
estring::size_type estring::precision | ( | void | ) | const |
Retrieve the set precision used in fractional conversions.
Returns:
Definition at line 507 of file estring.cc.
References m_precision.
Referenced by assign().
estring::size_type estring::precision | ( | size_type | a_p | ) |
Set the precision used in converting to/from fractional types.
Variables:
Returns:
Definition at line 487 of file estring.cc.
References assign(), m_precision, m_type, m_value, type_double, type_float, and estring_value::value.
Referenced by percent_string(), test2(), and test3().
void estring::reset | ( | void | ) |
Erase and reinitialize.
Definition at line 407 of file estring.cc.
References clear(), and init().
Referenced by timestamp::make_str_(), and test3().
char estring::right_fillchar | ( | void | ) | const |
Retrieve the fill character used to padd the right side of a formatted string.
Returns:
Definition at line 637 of file estring.cc.
References m_right_fillchar.
Referenced by fillchar(), and fmt_str().
char estring::right_fillchar | ( | const char | a_char | ) |
Set the fill character used to padd the right side of a formatted string.
Variables:
Returns:
Definition at line 620 of file estring.cc.
References m_right_fillchar.
void estring::T_fraction_to_strings | ( | const T & | a_t, |
value_type & | a_ws, | ||
value_type & | a_fs | ||
) | [private] |
Helper member template function to convert a fractional type to an estring.
Fractions are converted to string form using a default base of 10 unless specified otherwise through the base() member function. For bases greater than ten the letters of the alphabet are used, starting with 'a' for eleven, 'b' for twelve, etc.
By default a precision of 1 digit to the right of the decimal point is used unless specified otherwise by the precision() member function.
Variables:
Exceptions:
Definition at line 101 of file estring.cc.
References ASSERT, m_alphabet, m_alphabet_len, m_base, m_precision, and TRY_nomem.
Referenced by assign().
void estring::T_integral_to_string | ( | const T & | a_t, |
value_type & | a_str | ||
) | [private] |
Helper member template function to convert an integral type to an estring.
Integrals are converted to string form using a default base of 10 unless specified otherwise through the base() member function. For bases greater than ten the letters of the alphabet are used, starting with 'a' for eleven, 'b' for twelve, etc.
Variables:
Exceptions:
Definition at line 59 of file estring.cc.
References ASSERT, m_alphabet, m_alphabet_len, m_base, and TRY_nomem.
Referenced by assign().
void estring::T_string_to_fractional | ( | const value_type & | a_str, |
T & | a_t | ||
) | const [private] |
Helper member template function to convert a string to a fractional.
Variables:
Exceptions:
Definition at line 299 of file estring.cc.
References ASSERT, ERROR, m_alphabet_len, m_base, T_string_to_integral(), TRY, and TRY_nomem.
Referenced by operator double(), and operator float().
void estring::T_string_to_integral | ( | const value_type & | a_str, |
T & | a_t | ||
) | const [private] |
Helper member template function to convert a string to an integral type.
Characters in the string are converted using a default base of 10 unless specified otherwise through the base() member function. For bases greater than ten the letters of the alphabet will be assumed, starting with 'a' for eleven, 'b' for twelve, etc.
Variables:
Exceptions:
Definition at line 183 of file estring.cc.
References ASSERT, ERROR, m_alphabet, m_alphabet_len, m_base, and TRY_nomem.
Referenced by operator unsigned int(), operator unsigned long(), operator unsigned long long(), operator unsigned short(), T_string_to_fractional(), and T_string_to_signed_integral().
void estring::T_string_to_signed_integral | ( | const value_type & | a_str, |
T & | a_t | ||
) | const [private] |
Helper member template function to convert a string to a signed integral.
Variables:
Exceptions:
Definition at line 263 of file estring.cc.
References T_string_to_integral(), and TRY_nomem.
Referenced by operator int(), operator long(), operator long long(), and operator short().
estring & estring::upper | ( | void | ) |
Convert all characters to uppercase.
Returns:
Definition at line 894 of file estring.cc.
Referenced by test5().
estring::size_type estring::width | ( | void | ) | const |
Retrieve the set width for formatted strings.
Returns:
Definition at line 447 of file estring.cc.
References m_width.
Referenced by fmt_str().
estring::size_type estring::width | ( | const size_type | a_l | ) |
Set the width of a formatted string.
Variables:
Returns:
Definition at line 432 of file estring.cc.
References m_width.
Referenced by timestamp::make_str_(), num_to_string(), percent_string(), test1(), table::write(), table_cell_table::write(), and table_cell_estring::write().
alignment estring::m_alignment [private] |
const char * estring::m_alphabet = "0123456789abcdefghijklmnopqrstuvwxyz" [static, private] |
The alphabet used for any base from 2 to 36.
Alphabet used for base number conversions.
Definition at line 241 of file estring.h.
Referenced by T_fraction_to_strings(), T_integral_to_string(), and T_string_to_integral().
const size_t estring::m_alphabet_len = 36 [static, private] |
The length of the alphabet.
The length of the alphabet used for base number conversions.
Definition at line 243 of file estring.h.
Referenced by base(), T_fraction_to_strings(), T_integral_to_string(), T_string_to_fractional(), and T_string_to_integral().
unsigned int estring::m_base [private] |
The current numerical base.
Definition at line 239 of file estring.h.
Referenced by base(), init(), T_fraction_to_strings(), T_integral_to_string(), T_string_to_fractional(), and T_string_to_integral().
char estring::m_left_fillchar [private] |
size_type estring::m_precision [private] |
The current fractional number precision.
Definition at line 237 of file estring.h.
Referenced by assign(), init(), precision(), and T_fraction_to_strings().
char estring::m_right_fillchar [private] |
set_from_type estring::m_type [private] |
The current value type.
Definition at line 253 of file estring.h.
Referenced by assign(), base(), get_from_type(), init(), operator char const *(), operator void *(), and precision().
estring_value estring::m_value [private] |
The current value.
Definition at line 255 of file estring.h.
Referenced by assign(), base(), get_from_value(), operator char const *(), operator void *(), and precision().
size_type estring::m_width [private] |