set_input_string(3)
π NAME π
set_input_string β bestie, it's the glow-up for your input prompts: it hands the user a pre-filled, editable default string before they even start typing. β¨
π SYNOPSIS π
#include <gstream.h>
void set_input_string(char const *s);
π¦ DESCRIPTION π¦
Okay so picture this: you're asking someone for input, but you don't want them staring at a blank void. Rude, honestly. set_input_string gives you a way to specify an editable default string when inputting. It shows up already typed out, cursor parked at the end, just waiting for vibes. πΈ
Lowkey 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. Iconic. And then they can edit the string, for example:
What's your opinion about gstream?
I think it is superior, fantastic and| wonderful!
which results in buf containing the string "I think it is superior, fantastic and wonderful!" β no cap, that's the whole thing. π
This page is from the gstream manual, section 3, and it's documenting gstream version 1.6. That's the whole tea. π«Ά Thanks for reading bestie, go forth and make your input prompts cute! π β¨
π¦ where this page comes from
- fedora 43: gstream-devel 1.6-35.fc43 Β· Giftware
- fedora 43: gstream-devel 1.6-35.fc43 Β· Giftware
- fedora 44: gstream-devel 1.6-36.fc44 Β· Giftware
- fedora 44: gstream-devel 1.6-36.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms