Adds a string of multi-byte characters without rendition to a window and advances the cursor.
#include <curses.h>
int addnstr(const char *str, int n);
int addstr(const char *str);
int mvaddnstr(int y, int x, const char *str, int n);
int mvaddstr(int y, int x, const char *str);
int mvwaddnstr(WINDOW *win, int y, int x, const char *str, int n);
int mvwaddstr(WINDOW *win, int y, int x, const char *str);
int waddnstr(WINDOW *win, const char *str, int n);
int waddstr(WINDOW *win, const char *str);
These subroutines write the characters of the string str on the current or specified window starting at the current or specified position using the background rendition.
These subroutines advance the cursor position, perform special character processing, and perform wrapping.
The addstr, mvaddstr, mvwaddstr and waddstr subroutines are similar to calling mbstowcs on str, and then calling addwstr, mvaddwstr, mvwaddwstr, and waddwstr, respectively.
The addnstr, mvaddnstr, mvwaddnstr and waddnstr subroutines use at most, n bytes from str. These subroutines add the entire string when n is -1.
Upon successful completion, these subroutines return OK. Otherwise, they return ERR.
char *xyz; xyz="Hello!"; addstr(xyz);
mvaddstr(10, 5, "Hit a Key");
mvwaddstr(my_window, 10, 5, "xyz");
waddstr(my_window, "xyz");
These subroutines are part of Base Operating System (BOS) Runtime.
The addch, add_wch, and add_wchstr subroutines.
Curses Overview for Programming in AIX General Programming Concepts: Writing and Debugging Programs.
List of Curses Subroutines in AIX General Programming Concepts: Writing and Debugging Programs.
Manipulating Characters with Curses in AIX General Programming Concepts: Writing and Debugging Programs.