---
name: "curs_in_wchstr"
section: "3x"
platform: "macos"
package: "ncurses"
version: "79"
release: "macOS 26.5"
platforms: ["linux", "macos"]
url: "https://new.carta.tech/curs_in_wchstr/3x"
---

# curs\_in\_wchstr(3x)

get an array of complex characters and renditions from a curses window

## NAME

**in\_wchstr**, **in\_wchnstr**, **win\_wchstr**, **win\_wchnstr**, **mvin\_wchstr**, **mvin\_wchnstr**, **mvwin\_wchstr**, **mvwin\_wchnstr** - get an array of complex characters and renditions from a curses window

## SYNOPSIS

```
#include <curses.h>

int in_wchstr(cchar_t *wchstr);
int in_wchnstr(cchar_t *wchstr, int n);
int win_wchstr(WINDOW *win, cchar_t *wchstr);
int win_wchnstr(WINDOW *win, cchar_t *wchstr, int n);
int mvin_wchstr(int y, int x, cchar_t *wchstr);
int mvin_wchnstr(int y, int x, cchar_t *wchstr, int n);
int mvwin_wchstr(WINDOW *win, int y, int x, cchar_t *wchstr);
int mvwin_wchnstr(WINDOW *win, int y, int x, cchar_t *wchstr, int n);
```

## DESCRIPTION

These functions return an array of complex characters in *wchstr*, starting at the current cursor position in the named window. Attributes (rendition) are stored with the characters.

The **in\_wchnstr**, **mvin\_wchnstr**, **mvwin\_wchnstr** and **win\_wchnstr** fill the array with at most *n* **cchar\_t** elements.\

## NOTES

Note that all routines except **win\_wchnstr** may be macros.

Reading a line that overflows the array pointed to by *wchstr* with **in\_wchstr**, **mvin\_wchstr**, **mvwin\_wchstr** or **win\_wchstr** causes undefined results. Therefore, the use of **in\_wchnstr**, **mvin\_wchnstr**, **mvwin\_wchnstr**, or **win\_wchnstr** is recommended.

## RETURN VALUE

Upon successful completion, these functions return **OK**. Otherwise, they return **ERR**.

Functions with a "mv" prefix first perform a cursor movement using **wmove**, and return an error if the position is outside the window, or if the window pointer is null.

## PORTABILITY

The XSI Curses defines no error conditions. This implementation checks for null pointers, returning ERR in that case.

## SEE ALSO

Functions: **curses**(3X), **curs\_in\_wch**(3X), **curs\_instr**(3X), **curs\_inwstr**(3X) **curs\_inchstr**(3X)
