Coding with TA3D::String
Posted: Thu Jul 10, 2008 8:34 am
The project now uses our own implementation for strings (TA3D::String). In fact, it is only a descendant of the std::string, but with additional features.
For example, you can do this :
This class can make convertion too :
You may refer to src/misc/string.h for more information.
For example, you can do this :
Code: Select all
String s;
s << "Total : " << 42 << " (" << 3.65f << " sec.)";
Code: Select all
String s("On");
if (s.toBool())
std::cout << "Enabled." << std::endl;
String t(42);
switch (t.toInt32())
{
case 42: ; // do something
default : ; // do something
}