2012-04-19 220 views

回答

4
+0

謝謝!我完全忘了看QChar – castors33 2012-04-19 16:00:01

2

你可以使用at()從QString中獲取QChar,而QChar具有isLetter()函數。因此,你想是這樣的:

QString myString; 
if (myString.at(3).isLetter()) { 
    qDebug() << "letter number 4 in the string is a letter"; 
} 
+0

謝謝!更有用的那樣 – castors33 2012-04-19 16:00:27

相關問題