Trivially: int number_of_hashes(const QString &s) { int i, l = s.size(); for(i = 0; i < l && s[i] == '#'; ++i); return i; }.
確定! 回上一頁