Trim a string in C

Posted by Orion Edwards on Stack Overflow See other posts from Stack Overflow or by Orion Edwards
Published on 2009-03-18T00:26:45Z Indexed on 2010/04/12 6:33 UTC
Read the original article Hit count: 454

Filed under:
|
|
|

Briefly:

I'm after the equivalent of .NET's String.Trim in C using the win32 and standard C api (compiling with MSVC2008 so I have access to all the C++ stuff if needed, but I am just trying to trim a char*).

Given that there is strchr, strtok, and all manner of other string functions, surely there should be a trim function, or one that can be repurposed...

Thanks

© Stack Overflow or respective owner

Related posts about c

    Related posts about winapi