This got forwarded to the list since there seems to be a fatal routing
and/or DNS problem between me (Mike) and abiword.com right now.
---
Thanks Martin,
/Mike
Von: Mike Nordell [mailto:[EMAIL PROTECTED]]
Gesendet am: Donnerstag, 18. Oktober 2001 13:11
An: Gansser, Martin
Betreff: Re: The snprintf problems...
Hi Martin,
I did send off a post to the dev list but there seems to be a mail feed
problem. The last posts apparently needed over 24 hrs to get to the list.
Below is a copy of what I wrote.
Cheers,
/Mike
-------------
Martin Sevior wrote:
> >
> Mike,
> Since you're interested in this, is is possible to implement
> a way to snprintf into a UT_String?
Possible? Yes. Would I do it, or would I even like it if something as
type-unsafe as sprintf was added to it? No. There is a reason for me
opposing this; locales.
The only data-type that could be allowed in that format specification would
be "%d". Not very useful, eh?
"%s" format specification would be redundant, we already can concatenate
strings into UT_String. "%f" would be unusable since it would require the
process-wide C library locale (not to be confused with the "C" locale :-) )
to be used.
Should there be popular demand for string formatting except snprintf, I
suggest we have another look at the level of conformance of C++ compilers
and libraries instead. std::string already got all this, and more, not to
mention locales can be imbued on a per-object basis, which would benefit AW
performance in regards to writing and parsing strings to/from float.
/Mike
