Is there a sprintf() command (some command that takes a printf-style format string and a list of values to insert into the string) or something very much like it (preferably with a similar style of format specifiers)? Or, alternately, how would I implement sprintf() in Mathematica?
|
|
||||
|
|
|
I've had a need for such a function several times, and I found this implementation of C-style Here's an example once you've installed it:
Also note the following caveat in the README
|
||||
|
|
|
Not as such. The closest equivalent is Example:
Note that |
|||||||||
|
|
Mathematica does not have a built-in equivalent to
It is not pretty, but we could use JLink to access Java's printf-like formatting syntax:
|
|||
|
|
|
The simple (e.g. non-tabular, no-formatting) case would look something like this.
Message has a syntax similar to
|
|||
|
|

