extend string format a bit to support window replacements