Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

innstr(3x) [osx man page]

curs_instr(3X)															    curs_instr(3X)

NAME
instr, innstr, winstr, winnstr, mvinstr, mvinnstr, mvwinstr, mvwinnstr - get a string of characters from a curses window SYNOPSIS
#include <curses.h> int instr(char *str); int innstr(char *str, int n); int winstr(WINDOW *win, char *str); int winnstr(WINDOW *win, char *str, int n); int mvinstr(int y, int x, char *str); int mvinnstr(int y, int x, char *str, int n); int mvwinstr(WINDOW *win, int y, int x, char *str); int mvwinnstr(WINDOW *win, int y, int x, char *str, int n); DESCRIPTION
These routines return a string of characters in str, extracted starting at the current cursor position in the named window. Attributes are stripped from the characters. The four functions with n as the last argument return a leading substring at most n characters long (exclu- sive of the trailing NUL). RETURN VALUE
All of the functions return ERR upon failure, or the number of characters actually read into the string. X/Open defines no error conditions. In this implementation, if the window parameter is null or the str parameter is null, a zero is returned. NOTES
Note that all routines except winnstr may be macros. PORTABILITY
SVr4 does not document whether a length limit includes or excludes the trailing NUL. The ncurses library extends the XSI description by allowing a negative value for n. In this case, the functions return the string ending at the right margin. SEE ALSO
curses(3X). curs_instr(3X)

Check Out this Related Man Page

curs_instr(3X)															    curs_instr(3X)

NAME
instr, innstr, winstr, winnstr, mvinstr, mvinnstr, mvwinstr, mvwinnstr - get a string of characters from a curses window SYNOPSIS
#include <curses.h> int instr(char *str); int innstr(char *str, int n); int winstr(WINDOW *win, char *str); int winnstr(WINDOW *win, char *str, int n); int mvinstr(int y, int x, char *str); int mvinnstr(int y, int x, char *str, int n); int mvwinstr(WINDOW *win, int y, int x, char *str); int mvwinnstr(WINDOW *win, int y, int x, char *str, int n); DESCRIPTION
These routines return a string of characters in str, extracted starting at the current cursor position in the named window. Attributes are stripped from the characters. The four functions with n as the last argument return a leading substring at most n characters long (exclu- sive of the trailing NUL). RETURN VALUE
All of the functions return ERR upon failure, or the number of characters actually read into the string. X/Open defines no error conditions. In this implementation, if the window parameter is null or the str parameter is null, a zero is returned. NOTES
Note that all routines except winnstr may be macros. PORTABILITY
SVr4 does not document whether a length limit includes or excludes the trailing NUL. The ncurses library extends the XSI description by allowing a negative value for n. In this case, the functions return the string ending at the right margin. SEE ALSO
curses(3X). curs_instr(3X)
Man Page

9 More Discussions You Might Find Interesting

1. Programming

parsing string in c

how can i remove the special characters hi iam print the string variable . suppse: while(str!=NULL) printf("******* %s ********** %d ",str,strlen(str)); output as: ****srinu ******** 5 **** phani******** 63 ****srinu ******** 5 **** phani******** 63 so my problem is how can i... (3 Replies)
Discussion started by: phani_sree
3 Replies

2. Shell Programming and Scripting

Filter NOT words

Hi, I have string like this (for example) $str="orange AND grapes NOT pineapple"; $str="orange AND grapes NOT pineapple AND papaya"; $str="orange AND grapes NOT pineapple AND jackfruit NOT "fruit juice""; I have to filter out NOT terms. How can i do that? I used this... (3 Replies)
Discussion started by: vanitham
3 Replies

3. Shell Programming and Scripting

How to change a segment in a particular position

I need help in removing a leading zero in a particular position. For eg.: XYZ*04567472*0099*020091231*0123*0.12 In the above line, I want to replace "*0123" with "123" and "0.12" with ".12". I want to remove the leading zero only in position number 4 and 5 (the bolded segments) I was able... (10 Replies)
Discussion started by: ananthmm
10 Replies

4. Shell Programming and Scripting

string revering fails

Consider the following code #!\bib\bash echo -n "Enter string : " read str l=`expr length "$str"` while do echo -e `echo $str | cut -c"$l"`"\c" l=`expr "$l" - 1` done echo the above code works perfect for string with no space in between. but fails when there is a... (2 Replies)
Discussion started by: lipun4u
2 Replies

5. Shell Programming and Scripting

Delete lines after semicolon

char str; char str ; char *ptr; char * ptr; int CASE; int CASE; double temp; double temp; Output should be: char str; char *ptr; int CASE; double temp; How can i do this with awk,sed,perl? (5 Replies)
Discussion started by: cola
5 Replies

6. Programming

How to check if something exists in linked list in C?

i have a linked list set up like typedef struct client_list { char *client_name; int client_socket_fd; struct client_list *next; } client; client *client_list=NULL; before adding to the list i check if it already exists, only if it does not then i add if (client_list==NULL... (1 Reply)
Discussion started by: omega666
1 Replies

7. Shell Programming and Scripting

How to replace the string with "*" in Perl?

Hi, I have a string like this: $str = "hello worlds"; The string should be replaced by "*". For example if the word is "Hello" it should be replaced by 5 stars in vertical way as mentioned in the below output. Similarly for worlds should be replaced by 6 stars. The output should be... (6 Replies)
Discussion started by: vanitham
6 Replies

8. Programming

C++ Removing = from char*

I have a char* str. Suppose str="medium"; I want to check if str has "=" as first non blank position, if it exists, I want to remove it Currently I am checking using if (optarg == '=') cout << "Found =" << endl; (2 Replies)
Discussion started by: kristinu
2 Replies

9. Shell Programming and Scripting

String variable concatenation through loop problem

Hi Team!! Please can anyone tell me why the following line does not work properly? str3+=$str2 it seems that str3 variable does not keep its value in order to be concatenated in the next iteration! Thus when i print the result of the line above it returns the str2 value What i want to do is to... (8 Replies)
Discussion started by: paladinaeon
8 Replies