Hi Tommi! I'm glad to hear that Tntnet/cxxtools now has some string operator function. But I see two things, that we can do better.
If you look in the official API Doku (http://www.tntnet.org/classes.html) than you can't find any of cxxtools::split(), cxxtools::join() and cxxtools::convert<>(). Could we make it easier to find? > Tommi Mäkitalo <[email protected]> hat am 21. Juni 2013 um 14:51 geschrieben: > And std::string is not so poor as you and others think. It just has a > different philosophy. Algorithms do not need to be members of the string > class. It is much simpler to add algorithms when they are not members. > And there is no good reason to implement split or join as members into a > string class. Use that: But you have given an example for contrary: > For lowercase the string there are solutions in the standard library: > > |std::string data= "Abc"; > std::transform(data.begin(), data.end(), data.begin(), ::tolower);| > > Often they do not look just like you expect but if you understand the > flexibility, you can see, why they are free functions. I'm not sure, but I thin "transform" is static and a member function. Okay, let's have a look at other frameworks. Qt is a good example. Specialy the QString class: qt-project.org/doc/qt-5.0/qtcore/qstring.html The class is clear an intuitively to use. That's what programmers love. And of course, the doku is fine too! Typically web programming has many string operations so the string handling is very impotent, I think. > You see - we have chosen a great programming language ;-) Absolutely that's not the point! Best regards, Olaf ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev _______________________________________________ Tntnet-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/tntnet-general
