Patch level : 10.0 no patch
Files correlati : Ricompilazione Demo : [ ] Commento : Aggiunti alle Token_string i metodi add per reali e date. git-svn-id: svn://10.65.10.50/branches/R_10_00@23216 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
56b71aea8e
commit
9661bf8dda
@ -1052,7 +1052,11 @@ TString& TFixed_string::format(
|
|||||||
{
|
{
|
||||||
va_list pars;
|
va_list pars;
|
||||||
va_start(pars, fmt);
|
va_start(pars, fmt);
|
||||||
|
#ifdef WIN32
|
||||||
const int tot = _vsnprintf(_str, size()+1, fmt, pars);
|
const int tot = _vsnprintf(_str, size()+1, fmt, pars);
|
||||||
|
#else
|
||||||
|
const int tot = vsprintf(_str, fmt, pars);
|
||||||
|
#endif
|
||||||
va_end(pars);
|
va_end(pars);
|
||||||
CHECK(tot >= 0 && tot <= size(), "Ue'! Quanto scrivi con 'sta format?");
|
CHECK(tot >= 0 && tot <= size(), "Ue'! Quanto scrivi con 'sta format?");
|
||||||
return *this;
|
return *this;
|
||||||
@ -1840,6 +1844,22 @@ void TToken_string::add(int n, int pos)
|
|||||||
add(s, pos);
|
add(s, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Adds a real value to the token string
|
||||||
|
// Certified 100%
|
||||||
|
void TToken_string::add(const real r, int pos)
|
||||||
|
{
|
||||||
|
const TString s = r.string();
|
||||||
|
add(s, pos);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Adds a date to the token string
|
||||||
|
// Certified 100%
|
||||||
|
void TToken_string::add(const TDate d, int pos)
|
||||||
|
{
|
||||||
|
const TString s = d.string();
|
||||||
|
add(s, pos);
|
||||||
|
}
|
||||||
|
|
||||||
void TToken_string::insert_at(const char* s, int pos)
|
void TToken_string::insert_at(const char* s, int pos)
|
||||||
{
|
{
|
||||||
if (pos >= 0 && not_empty())
|
if (pos >= 0 && not_empty())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user