If I have a string, char str
and a pointer to a string char *ptr
and using curses.h with direct terminal input/output #DEFINE TAB_KEY 9 ASCII
and the cursor position on the string int *curpos
How can I do the following,
orCode:ABCDEF<--cursor here & hit tab (defined 4 spaces-->GHIJKL
I know that I am going to be using a for loop, I just am struggling with with the conditions.Code:<--cursor here & hit tab (4 spaces inserted)-->ABCDEFGHIJKL
Appreciate any help as always.