StringFormat

Description

An extensible and customizable utility for string formatting a few simple examples: simple replacements (no arguments)'line one&rline two' sformat=='line oneline 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

Details

Source
SqueakMap
Dialect
squeak (65% confidence)

Categories

Education / Howto System / OS Math
← Back to results