CStringT::Remove

来源:互联网 发布:淘宝店入驻条件及费用 编辑:程序博客网 时间:2024/05/16 23:39
CStringT::RemoveVisual Studio 2012

Removes all instances of the specified character from the string.

View ColorizedCopy to Clipboard
int Remove(   XCHAR chRemove);
int Remove(   XCHAR chRemove);
Parameters

chRemove

The character to be removed from a string.

Return Value

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

Remarks

Comparisons for the character are case sensitive.

Example

JavaScript
C#
C++
F#
JScript
VB
View ColorizedCopy to Clipboard
// 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."));
// 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."));
Requirements

Header: cstringt.h

See Also

Reference

CStringT Class
原创粉丝点击