Entry
R0 -> template string
R1 -> buffer to hold resulting string
R2 = number or pointer to string for %0
R3 = number or pointer to string for %1
R4 = number or pointer to string for %2
R5 = number or pointer to string for %3
R6 = number or pointer to string for %4
Exit
R0 = pointer to zero-byte terminator of substituted string
Takes a string of the form This is an %0 of the %1 of %2_%3 and substitutes the given strings when %0, %1, %2, %3 or %4 is encountered. eg :
SYS "WimpExt_SubstituteArgs","This is an %0 of the %1 of %2_%3",q%,"example","use","WimpExt","SubstituteArgs" TO ,string$
would give This is an example of the use of WimpExt_SubstituteArgs. Any strings not used in the template do not need to have sensible values in the corresponding register, although you may like to make the register -1, in which case WimpExtension will fault that strings use. To include a % in the template, use %%.
WimpExtension II now interprets 0<=Rx<&8000 as a number to be inserted into the string.
Provided by Misc
|
|
|