|
how to get rid of the input beginning white spaces
Can anyone show me a quick way of getting rid of white spaces in c
for instance, user input
<space> <tab> <space> hello
and I use read () to get the entire line and store it in an array called buf[ ]
so my buff is stored wit useless white spaces, if I do a strlen(buf), it will return 3
how can I write a function that gets rid of all the while spaces and my buff just stores hello?
|