curs_inchstr(3x) on macOS
The text 47ae66b00f62, as macOS 13.5, macOS 13.4, macOS 13.3, macOS 13.2, macOS 13.1, macOS 13.0, macOS 12.5, macOS 12.4, macOS 12.3, macOS 12.2, macOS 12.1, macOS 12.0.1 shipped it.
get a string of characters (and attributes) from a curses window