1
是否有一個函數可以從字符串流獲取位置n
中的字符串,而不需要先複製到字符串,也不需要從緩衝區中刪除字符?在文檔中,我只看到一個get
函數來檢索下一個字符,但沒有訪問特定位置字符的函數。從std :: stringstream檢索字符
例如爲:
std::stringstream s;
s << "abcdefg";
char c = s.getCharAt(3); // I am looking for this method
// c should be 'd' now