void ReplaceString( std::string & strCallId, const char * pszBefore, const char * pszAfter )
{
size_t iPos = strCallId.find( pszBefore );
size_t iBeforeLen = strlen( pszBefore );
while( iPos < std::string::npos )
{
strCallId.replace( iPos, iBeforeLen, pszAfter );
iPos = strCallId.find( pszBefore, iPos );
}
함수 추가
ReplaceString(t_value1," ","\n");
( 문자열, 찾는 글자, 바꿀 글자);
끝!
댓글