String.format function tweaks

1. Clearer comments
2. Putting the tristate onto one line