Remove character from character array ?

Hi,
I needed function to remove some characters from character array.
As always I looked in C Run-Time library, string manipulation functions
section -
and found nothing which contains trim or even remove !
Where to find such a simple function ?
(I'm not using MFC or .NET)

thanks
Vilius

[331 byte] By [Vilius] at [2007-12-22]
# 1

search substring in reverse and update elements

eventually you should reallocate memory

Kuphryn

kuphryn at 2007-8-30 > top of Msdn Tech,Visual C++,Visual C++ General...
# 2
My intention is to shift array elements left and thats it, and I know how to do that manually.
Still hope to find function.
Vilius at 2007-8-30 > top of Msdn Tech,Visual C++,Visual C++ General...
# 3
it was StrTrim shell API function
Vilius at 2007-8-30 > top of Msdn Tech,Visual C++,Visual C++ General...
# 4

If portability is important, you can also use the STL remove algorithm as follow:

#include <algorithm>

void InPlaceRemove( char* pToModify, char toRemove )
{
char* pLast = std::remove( pToModify, pToModify + strlen(pToModify), toRemove );
*pLast = '\0';
}

Gàbor at 2007-8-30 > top of Msdn Tech,Visual C++,Visual C++ General...