- #1
magnifik
- 360
- 0
I am trying to remove excess white space using the isspace function. For example, I am reading text from a txt file that says:
I am super sleepy.
------------------------------
but I want it to say:
I am super sleepy.
------------------------------
I was thinking I could use the isspace(c), where c is each character being read and try to make a statement that somehow erases all but one space. Any suggestions??
I am super sleepy.
------------------------------
but I want it to say:
I am super sleepy.
------------------------------
I was thinking I could use the isspace(c), where c is each character being read and try to make a statement that somehow erases all but one space. Any suggestions??