1.Qt Helper
const QChar QString::at(int position) const
Returns the character at the given index position in the string.
The position must be a valid index position in the string (i.e., 0 <= position < size()).
2.示例
最后一个字符位置即字符串长度-1
QString str = "hello world";
qDebug() << "string at end: " << str.at(str.size() - 1);
暂无评论