QCString str = "Hello, world!"; int len = str.length(); // len is 13
QCString str; if (str.length() == 0) { // str is empty }
QCString str = "abcd"; for (int i = 0; i < str.length(); i++) { char c = str[i]; // c is 'a', then 'b', etc. }The QCString class is part of the Qt Core library.