Is there such a function or does one have to write it himself using getchar() and appending the chars into a buffer in a loop?
Is there such a function or does one have to write it himself using getchar() and appending the chars into a buffer in a loop?
You already asked this here. Also, did you read the FAQ, as Dave suggested in that thread? If you did, you would already know that command line input is in a buffer already, and you can do whatever you need to with it.
It could be just me, but I think that by "command line" he means stdin. In which case this FAQ entry holds the answer.