NAME |SYNOPSIS |DESCRIPTION |NOTES |RETURN VALUE |SEE ALSO |COLOPHON | |
curs_inwstr(3X)curs_inwstr(3X)inwstr,innwstr,winwstr,winnwstr,mvinwstr,mvinnwstr,mvwinwstr,mvwinnwstr- get a string ofwchar_tcharacters from a curses window
#include <curses.h>int inwstr(wchar_t *wstr);int innwstr(wchar_t *wstr, intn);int winwstr(WINDOW *win, wchar_t *wstr);int winnwstr(WINDOW *win, wchar_t *wstr, intn);int mvinwstr(inty, intx, wchar_t *wstr);int mvinnwstr(inty, intx, wchar_t *wstr, intn);int mvwinwstr(WINDOW *win, inty, intx, wchar_t *wstr);int mvwinnwstr(WINDOW *win, inty, intx, wchar_t *wstr, intn);
These routines return a string ofwchar_twide characters inwstr, extracted starting at the current cursor position in the named window. The four functions withn as the last argument return a leading substring at mostn characters long (exclusive of the trailing NUL). Transfer stops at the end of the current line, or whenn characters have been stored at the location referenced bywstr. If the sizen is not large enough to store a complete complex character, an error is generated.
All routines exceptwinnwstrmay be macros. Each cell in the window holds a complex character (i.e., base- and combining-characters) together with attributes and color. These functions store only the wide characters, ignoring attributes and color. Usein_wchstrto return the complex characters from a window.
All routines returnERRupon failure. Upon successful completion, the *inwstrroutines returnOK, and the *innwstrroutines return the number of characters read into the string. Functions with a “mv” prefix first perform a cursor movement usingwmove, and return an error if the position is outside the window, or if the window pointer is null.
curses(3X),curs_instr(3X),curs_in_wchstr(3X)
This page is part of thencurses (new curses) project. Information about the project can be found at ⟨https://www.gnu.org/software/ncurses/ncurses.html⟩. If you have a bug report for this manual page, send it to bug-ncurses-request@gnu.org. This page was obtained from the project's upstream Git mirror of the CVS repository ⟨https://github.com/mirror/ncurses.git⟩ on 2025-08-11. (At that time, the date of the most recent commit that was found in the repository was 2023-03-12.) If you discover any rendering problems in this HTML version of the page, or you believe there is a better or more up-to-date source for the page, or you have corrections or improvements to the information in this COLOPHON (which isnot part of the original manual page), send a mail to man-pages@man7.orgcurs_inwstr(3X)HTML rendering created 2025-09-06 byMichael Kerrisk, author ofThe Linux Programming Interface. For details of in-depthLinux/UNIX system programming training courses that I teach, lookhere. Hosting byjambit GmbH. | ![]() |