5291 "return a copy of the receiver, where all %i escapes are |
5291 "return a copy of the receiver, where all %i escapes are |
5292 replaced by corresponding arguments' printStrings from the argArrayOrDictionary. |
5292 replaced by corresponding arguments' printStrings from the argArrayOrDictionary. |
5293 I.e. 'hello %1; how is %2' expandPlaceholdersWith:#('world' 'this') results |
5293 I.e. 'hello %1; how is %2' expandPlaceholdersWith:#('world' 'this') results |
5294 in the new string 'hello world; how is this'. |
5294 in the new string 'hello world; how is this'. |
5295 As an extension, the argument may also be a dictionary, providing |
5295 As an extension, the argument may also be a dictionary, providing |
5296 values for character keys. |
5296 values for symbolic keys. |
5297 In this case, %a .. %z and %(...) are also allowed. |
5297 In this case, %a .. %z and %(...) are also allowed. |
5298 (%1..%9 require a numeric key in the dictionary, however) |
5298 (%1..%9 require a numeric key in the dictionary, however) |
5299 To get a '%' character, use a '%%'-escape. |
5299 To get a '%' character, use a '%%'-escape. |
|
5300 To get an integer-indexed placeHolder followed by another digit, |
|
5301 or an index > 9, you must use %(digit). |
5300 See also bindWith:... for VisualAge compatibility." |
5302 See also bindWith:... for VisualAge compatibility." |
5301 |
5303 |
5302 |expandedString next v key |
5304 |expandedString next v key |
5303 idx "{ SmallInteger }" |
5305 idx "{ SmallInteger }" |
5304 idx2 "{ SmallInteger }" |
5306 idx2 "{ SmallInteger }" |
5355 " |
5357 " |
5356 'hello %1' expandPlaceholdersWith:#('world') |
5358 'hello %1' expandPlaceholdersWith:#('world') |
5357 'hello %1; how is %2' expandPlaceholdersWith:#('world' 'this') |
5359 'hello %1; how is %2' expandPlaceholdersWith:#('world' 'this') |
5358 'hello %2; how is %1' expandPlaceholdersWith:#('world' 'this') |
5360 'hello %2; how is %1' expandPlaceholdersWith:#('world' 'this') |
5359 '%1 plus %2 gives %3 ' expandPlaceholdersWith:#(4 5 9) |
5361 '%1 plus %2 gives %3 ' expandPlaceholdersWith:#(4 5 9) |
|
5362 '%%(1)0 gives %(1)0' expandPlaceholdersWith:#(123) |
|
5363 '%%10 gives %10' expandPlaceholdersWith:#(123) |
|
5364 '%%(10) gives %(10)' expandPlaceholdersWith:#(123) |
5360 " |
5365 " |
5361 |
5366 |
5362 " |
5367 " |
5363 |dict| |
5368 |dict| |
5364 |
5369 |