What's the cleanest way of getting the effect of `istream::getline(string, 256, '\n' OR ';')`?

I know it's quite straightforward to write a loop, but I feel that I might be missing something. Am I?

What I used:

```
while ((is.peek() != '\n') && (is.peek() != ';'))
    stringstream.put(is.get());

```