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
}