标签:char let sch ring str string void pst delete
bool IsCharBelongString( IN const char* szIn, IN char ch ) { if (szIn) { while (*szIn) { if (ch == *szIn) { return true; } szIn++; } } return false; } void DeleteChar( IN char* szIn, IN const char* szDelete ) { if (szIn) { char* pStep1 = szIn; char* pStep2 = szIn; while (*pStep1) { if (!DIYIsCharBelongString(szDelete, *pStep1)) { *pStep2++ = *pStep1; } pStep1++; } *pStep2 = 0; } }
Algorithm delete some charactors from string
标签:char let sch ring str string void pst delete
原文地址:http://www.cnblogs.com/nonebutnow/p/6008758.html