Why not?

```
std::string& str = *format; 
for (size_t i = 0, sz = str.size(); i < sz; ++i) {
    // use str[i]
}
```