Export (0) Print
Expand All
1 out of 1 rated this helpful - Rate this topic


Removes all instances of the specified character from the string.

int Remove(
   XCHAR chRemove

The character to be removed from a string.

The count of characters removed from the string. Zero if the string is not changed.

Comparisons for the character are case sensitive.

// typedef CStringT<TCHAR, StrTraitATL<TCHAR, ChTraitsCRT<TCHAR>>> CAtlString;

CAtlString str(_T("This is a test."));
int n = str.Remove(_T('t'));
ASSERT(n == 2);
ASSERT(str == _T("This is a es."));   

Header: cstringt.h

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.