R
Richard Herring
For smarmy++, there should be no explicit use of for, while, if, etc.,Neil Cerutti said:Well, it's hard to think of anything better.
It looks slower to me, as at least two copies of the input string
have to be made, whereas the string member function version
doesn't necessarily make any copies. Moreover, iostreams are
heavy duty iron for such a simple task.
I'd call the idea clever but impractical. I'm not sure if it's
smarmy. ;-)
which should all be hidden within an appropriate STL algorithm. Some of
the other competitors don't seem to have absorbed this principle ;-)