Add formatting to `rt.util.string`.

Note it also adds some template bloat.