3 ms·
a better way to convert a string to upper case, not an arbitrary collection of chars just a sidenote - this is exactly the opposite of the way of thinking the
by stinos 12y ago
a better way to convert a string to upper case, not an arbitrary collection of chars
just a sidenote - this is exactly the opposite of the way of thinking the STL promotes: in STL terms, you do want a generic operation on an arbitrary collection of anything that happens be compatible with toupper. Shouldn't even be a char, let the compiler figure that out. And as it turns out, std::string happens to fit in nicely.
- vilya 12y agoI think that sums up nicely why I don't particularly like the STL: it's that mindset. It's all well and good having a generic operation over an arbitrary collection of anything, but sometimes you just want to get stuff done. All that generality adds distance between your code and the problem you're trying to solve with it. It's obfuscation. Edit: I hope that doesn't sound too combative - I'm just trying to explain myself, not saying that you're wrong.