1insnstr(3XCURSES) X/Open Curses Library Functions insnstr(3XCURSES)
2
3
4
6 insnstr, insstr, mvinsnstr, mvinsstr, mvwinsnstr, mvwinsstr, winsnstr,
7 winsstr - insert a multibyte character string
8
10 cc [ flag... ] file... -I /usr/xpg4/include -L /usr/xpg4/lib \
11 -R /usr/xpg4/lib -lcurses [ library... ]
12
13 c89 [ flag... ] file... -lcurses [ library... ]
14
15 #include <curses.h>
16
17 int insnstr(const char *str, int n);
18
19
20 int insstr(const char *str);
21
22
23 int mvinsnstr(int y, int x, const char *str, int n);
24
25
26 int mvinsstr(int y, int x, const char *str);
27
28
29 int mvwinsnstr(WINDOW *win, int y, int x, const char *str, int n);
30
31
32 int mvwinsstr(WINDOW *win, int y, int x, const char *str);
33
34
35 int winsnstr(WINDOW *win, const char *str, int n);
36
37
38 int winsstr(WINDOW *win, const char *str);
39
40
42 str Is a pointer to the string to be inserted.
43
44
45 n Is the number of characters not to exceed when inserting str.
46 If n is less than 1, the entire string is inserted.
47
48
49 y Is the y (row) coordinate of the starting position of the
50 string.
51
52
53 x Is the x (column) coordinate of the starting position of the
54 string.
55
56
57 win Is a pointer to the window in which the string is to be
58 inserted.
59
60
62 The insstr() function inserts str at the current cursor position of
63 the stdscr window. The winsstr() function performs the identical
64 action, but in window win. The mvinsstr() and mvwinsstr() functions
65 insert the character string at the starting position indicated by the
66 x (column) and y (row) parameters (the former to the stdscr window;
67 the latter to window win).
68
69
70 The insnstr(), winsnstr(), mvinsnstr(), and mvwinsnstr() functions
71 insert n characters to the window or as many as will fit on the line.
72 If n is less than 1, the entire string is inserted or as much of it as
73 fits on the line. The former two functions place the string at the
74 current cursor position; the latter two commands use the position
75 specified by the x and y parameters.
76
77
78 All characters to the right of inserted characters are moved to the
79 right. Characters that don't fit on the current line are discarded.
80 The cursor is left at the point of insertion.
81
82
83 If a character in str is a newline, carriage return, backspace, or tab,
84 the cursor is moved appropriately. The cursor is moved to the next tab
85 stop for each tab character (by default, tabs are eight characters
86 apart). If the character is a control character other than those previ‐
87 ously mentioned, the character is inserted using ^x notation, where x
88 is a printable character. clrtoeol(3XCURSES) is automatically done
89 before a newline.
90
92 On success, these functions return OK. Otherwise, they return ERR.
93
95 None.
96
98 See attributes(5) for descriptions of the following attributes:
99
100
101
102
103 ┌─────────────────────────────┬─────────────────────────────┐
104 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
105 ├─────────────────────────────┼─────────────────────────────┤
106 │Interface Stability │Standard │
107 ├─────────────────────────────┼─────────────────────────────┤
108 │MT-Level │Unsafe │
109 └─────────────────────────────┴─────────────────────────────┘
110
112 addchstr(3XCURSES), addstr(3XCURSES), clrtoeol(3XCURSES),
113 ins_nwstr(3XCURSES), insch(3XCURSES), libcurses(3XCURSES),
114 attributes(5), standards(5)
115
116
117
118SunOS 5.11 5 Jun 2002 insnstr(3XCURSES)