Possibility of standardized sprintf() in ES4?

Dan Scott denials at gmail.com
Mon Oct 15 05:27:01 PDT 2007


I've been working on a project requiring i18n support in ES
(http://open-ils.org), and it's become clear that a standard sprintf()
implementation in ES would have been very useful. There are currently
some open-source sprintf() implementations written in ES, but all of
the ones I've looked at so far seem to either have unusual licenses or
incomplete implementations (positional specifier support is absolutely
necessary for i18n, for example.)
http://hexmen.com/blog/2007/03/printf-sprintf/ is probably the closest
thing I've found to a solution yet.

For something as basic as string formatting, it would be great to be
able to count on a core implementation of sprintf() (or something
equivalent) in a future version of ES. Jon Udell made a comment to the
effect that string formatting was a part of the TG1 wiki at
but I've been unable to find that section in the wiki (unless that is
limited strictly to String.replace()).

Is there any other interest in adding a native sprintf() (probably as
String.sprintf()) to the ES4 specs?

Dan Scott
Laurentian University

More information about the Es4-discuss mailing list