I don't know of a library method that does this, but then I've never looked for one. I guess you'll have to search for %s that aren't followed by two digits - probably a regexp search - then replace with %. (Assuming this code is correct, I found it
here).
--Tim