Exemple #1
0
HM::String _tagXMLEntitys::Ref2Entity( LPCTSTR estr )
{
	HM::String es;
	if( estr )
	{
		int len = _tcslen(estr);
		LPTSTR esbuf = es.GetBufferSetLength( len +1);
		if( esbuf )
			Ref2Entity( estr, esbuf, len );

      es.ReleaseBuffer();
	}
	return es;
}
Exemple #2
0
HM::String _tagXMLEntitys::Entity2Ref( LPCTSTR str )
{
	HM::String s;
	if( str )
	{
		int nEntityCount = GetEntityCount(str);
		if( nEntityCount == 0 )
			return HM::String(str);
		int len = _tcslen(str) + nEntityCount*10 ;
		LPTSTR sbuf = s.GetBufferSetLength( len + 1 );
		if( sbuf )
			Entity2Ref( str, sbuf, len );

      s.ReleaseBuffer();
	}
	return s;
}