Note: Added in G-Cows version 1.9
Fills template-string
with one or more variables
. Every occurrency of %s inside
template-string
is replaced by one of the variables.
fill ("Meat %s murder --The Smiths", "is")
replaces %s with is and returns Meat is murder.
fill ("Flesh eating is unprovoked murder. --%s %s", "Benjamin", "Franklin")
replaces first %s with Benjamin, the second %s with Franklin and returns Flesh eating is unprovoked murder. --Benjamin Franklin.
generic_link = '<a href="%s/%s.html">%s</a>'; section = 'vegetarianism'; subsection = 'health'; descr = 'Vegetarianism & health'; link = fill (generic_link, section, subsection, descr); print (link);
displays <a href="vegetarianism/health.html">Vegetarianism & health</a>
This manual can be downloaded from http://www.g-cows.org/.