How do I trim leading/trailing whitespace in a standard way?
Is there a clean, preferably standard method of trimming leading and trailing whitespace from a string in C? I’d roll my own, but I would think this is a common problem with an equally common solution. 40 Answers 40 If you can modify the string: // Note: This function returns a pointer to a substring … Read more