Improve string.format to handle more options