gstream-set_input_string - Man Page

set_input_string

Synopsis

#include <gstream.h>

void set_input_string(char const *s);

Description

This function provides a way to specify an editable default string  when inputting. Consider the following example:

   char buf[100];
   gs << "What's your opinion about gstream?\n";
   
   gs.set_input_string("I think it is incredible wonderful!");
   gs.getline(buf, 100);

The user will see the following

   What's your opinion about gstream?
   I think it is incredible wonderful!|

where the '|' represents the cursor, and (s)he can edit the string,  for example

   What's your opinion about gstream?
   I think it is superior, fantastic and| wonderful!

resulting in 'buf' containing the string "I think it is superior, fantastic and wonderful!"

Referenced By

gstream-set_input_approver(3), gstream-set_max_input_length(3).

version 1.6 gstream manual