Guide API
Skip to main content

history_str

Function history_str 

Source
pub fn history_str(id: u8, index: usize) -> Option<String>
Expand description

Return the entry at index (oldest-first) for id, or None if out of range.

Index 0 is the oldest stored entry; index history_count(id) − 1 is the most recent. Returns None when index >= history_count(id). The HistoryViewer walks the channel this way to populate its list.

§Turbo Vision heritage

Ports historyStr (histlist.cpp); return type changed from the C-style output-parameter String to Option<String> (idiomatic out-of-range signaling).