Home > Mobile >  QString QChar array in internal storage is to ensure that the final storage QChar is 0, so you can d
QString QChar array in internal storage is to ensure that the final storage QChar is 0, so you can d

Time:10-02

QString in the case of strings are initialized to Chinese and English in the internal storage of data stored in arrays is to ensure that the final QChar is zero, so it can directly convert would * type?
I know a QString itself is to support store contains 0 "string", but we are initialized to does not contain the string 0

For example:
QString STR="123 computer";//there is no initialization string containing 0
Would be * pUnicode=(would be *) STR. Unicode ();

This is to ensure that pUnicode is the basic of C language to 0 as the end of the string,
I after many tests are 0 as the terminator, but this is only test, so don't know if I can make sure?
  •  Tags:  
  • Qt
  • Related