() , Smalltalk. cr, tab .. .
, , ( "streamContents:" "withCRs" newLine). , () . , VisualWorks Smalltalk/X ( ):
'someString with newline<n>and<t>tabs' expandMacros
or even with a printf-like slice of other printStrings objects:
'anotherString<n><t>with newlines<n>and<t>tabs and<p>' expandMacrosWith:(Float pi)
I think there is something similar in Squeak and V'Age.
But keep in mind: these extensions are executed at runtime. Thus, you may encounter a penalty by heavily using them in many lines.
source
share