Hi All,

Is there any function in C++ 's standard library or in STL which gives the number of consecutive characters in a stringstream object ?

std::count() and strspn() do not seem to be what I am looking for.

In my case, the sequence of consecutive characters may begin at any location in string stream as opposed to what is checked by strspn(), which returns the length of the "initial" portion of a string containing the consecutive characters.

Performance is my first priority while implementing this task.

Thanks.