"Thore Karlsen"
On Tue, 11 Oct 2005 15:59:23 -0400, "Gennadiy Rozental"
wrote: Well, one thing I use it for is parsing HTTP directly in the read buffer, which is a vector. If the interfaces weren't generic, I'd either have to write my own functions to duplicate the functionality, or I'd have to copy the incoming data to a string. The first seems silly, and the latter would have unacceptable overhead in my case. The HTTP I'm parsing is streaming video from several dozen cameras at once, so I have to work with the buffers directly.
I also use this library on plain old C strings, which wouldn't be possible if it were locked to basic_string.
Some changes may make sense, but I really like the way it is now.
The way I see it all string algorithms should be using class like const_string in their interfaces.
Maybe I'm misunderstanding you, but are you suggesting that no string algorithms should modify a string in-place? That would be unacceptable to me. I wouldn't use such a library.
Actually what I had in mind is similar to basic_cstring class I am using in Boost.Test, which supports both const and mutating versions. But most/many of string algorithms would use const version. Gennadiy