What would be most efficient way to compare QString and char*
if( mystring == mycharstar ) {}
will perform malloc,
and
if(strcmp(mystring.toLocal8Bit().constData(),mycharstar ) == 0) {}
Will allocate a QByteArray
I would like to not have any allocation happening, would would you guys recommend?
What about
if(mystring == QLatin1String(mycharstar))
Would it be any better?