StringFormat

Summary: An extensible and customizable utility for string formatting
Author: Stéphane Rollandin
Owner: Stéphane Rollandin (spfa)
Co-maintainers: <None>
Categories:
Homepage:
PackageInfo name: <Not entered>
RSS feed:

Description:

An extensible and customizable utility for string formatting

a few simple examples:

simple replacements (no arguments)
'line one&rline two' sformat
==
'line one
line two'

replacements with arguments
'%s+%s=%s (or not)' sformat: {7. 2. 8}
== '7+2=8 (or not)'

replacements with inlined arguments
'%s[6+1]+%s[2] indeed is %s[4*2]' sformat
== '7+2 indeed is 8'

single replacement with argument (and numeric parameter)
'e is about %5p' sformat: Float e
== 'e is about 2.71828'

single replacements with inlined argument
'e is about %7p[Float e]' sformat
== 'e is about 2.7182818'

{{...}} macro
'it is now {{Time now}}' sformat
== 'it is now 9:24:18 pm'


.. there is much more.
see the comment in class StringFormat for documentation

Releases


Back