本文整理汇总了C++中CFSWString::Empty方法的典型用法代码示例。如果您正苦于以下问题:C++ CFSWString::Empty方法的具体用法?C++ CFSWString::Empty怎么用?C++ CFSWString::Empty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CFSWString
的用法示例。
在下文中一共展示了CFSWString::Empty方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: VEAD
void CONV_HTML_UC2::ConvToUc(
CFSWString& wStr,
const CFSAString& aStr,
const PFSCODEPAGE koodiTabel
)
{
wStr.Empty();
if(koodiTabel!=PFSCP_HTMLEXT) // Krutime Renee algoritmi j�rgi
{
wStr = FSStrAtoW(aStr, koodiTabel); // Kui teisendus k�ib Rene tabelite j�rgi, siis teeme �ra ja valmis
return;
}
assert(koodiTabel==PFSCP_HTMLEXT); // Kasutame teisendamiseks failist loetud tabelit
if(sgml2uc.idxLast<=0)
throw VEAD(ERR_X_TYKK, ERR_ARGVAL, __FILE__,__LINE__, "$Revision: 557 $",
"SGML olemite tabel mallu lugemata");
int l, n=aStr.GetLength();
for(l=0; l < n; l++)
{
if((aStr[l] & (~0x7F))!=0) // peab olema 7bitine ascii
throw VEAD(ERR_X_TYKK, ERR_ARGVAL, __FILE__,__LINE__, "$Revision: 557 $",
"String peab koosnema ASCII (7bitistest) koodidest", (const char*)aStr+l);
if(aStr[l]!='&') // ei alusta SGML olemit...
{
tryki:
wStr += ((FSWCHAR)(aStr[l])) & 0x7F; // ...l�heb niisama
continue;
}
// V�ib alustada mingit SGML olemit - &blah;
int lSemiPos=(int)aStr.Find(";", l+1);
if(lSemiPos<0) // see ampersand ilma l�petava semita
{
if(ignoramp==true)
goto tryki;
throw VEAD(ERR_X_TYKK, ERR_ARGVAL, __FILE__,__LINE__, "$Revision: 557 $",
"Ampersandi tagant semi puudu", (const char*)aStr+l);
}
if(autosgml==true && aStr[l+1]=='#') // teisenda &#[{x|X}]12345; s�mbolid
{
int tmp=0, j=l+2;
if(aStr[j]=='x' || aStr[j]=='X') // teisenda 𒍅 ja 𒍅 hexakoodid
{
j++;
//if(sscanf(((const char*)aStr)+j, "%x", &tmp)!=1)
// throw VEAD(ERR_X_TYKK, ERR_ARGVAL, __FILE__,__LINE__, "$Revision: 557 $",
// "Vigane SGML olem", (const char*)aStr+l);
//for(; j<lSemiPos; j++)
// {
// if(strchr("0123456789aAbBcCdDeEfF", aStr[j])==NULL)
// throw VEAD(ERR_X_TYKK, ERR_ARGVAL, __FILE__,__LINE__, "$Revision: 557 $",
// "Vigane SGML olem", (const char*)aStr+l);
// }
j+=STRSOUP::UnsignedStr2Hex<int, char>(&tmp, ((const char*)aStr)+j);
if(j<=0 || aStr[j]!=';')
throw VEAD(ERR_X_TYKK, ERR_ARGVAL, __FILE__,__LINE__, "$Revision: 557 $",
"Vigane SGML olem", (const char*)aStr+l);
if(tmp>0xFFFF)
throw VEAD(ERR_X_TYKK, ERR_ARGVAL, __FILE__,__LINE__, "$Revision: 557 $",
"Vigane SGML olem (peab mahtuma 2 baidi peale)", (const char*)aStr+l);
}
else // teisenda 〹 ja 〹 k�mnendkoodid
{
//for(; j<lSemiPos; j++)
// {
// if(aStr[j]<'0' || aStr[j]>'9')
// throw VEAD(ERR_X_TYKK, ERR_ARGVAL, __FILE__,__LINE__, "$Revision: 557 $",
// "Vigane SGML olem (lubatud 0-9)", (const char*)aStr+l);
// if((tmp=10*tmp+aStr[j]-'0')>0xFFFF)
// throw VEAD(ERR_X_TYKK, ERR_ARGVAL, __FILE__,__LINE__, "$Revision: 557 $",
// "Vigane SGML olem (peab mahtuma 2 baidi peale)", (const char*)aStr+l);
// }
j+=STRSOUP::UnsignedStr2Num<int, char>(&tmp, ((const char*)aStr)+j);
if(j<=0 || aStr[j]!=';')
throw VEAD(ERR_X_TYKK, ERR_ARGVAL, __FILE__,__LINE__, "$Revision: 557 $",
"Vigane SGML olem", (const char*)aStr+l);
if(tmp>0xFFFF)
throw VEAD(ERR_X_TYKK, ERR_ARGVAL, __FILE__,__LINE__, "$Revision: 557 $",
"Vigane SGML olem (peab mahtuma 2 baidi peale)", (const char*)aStr+l);
}
wStr += (WCHAR)tmp;
l=lSemiPos;
continue;
}
if(lSemiPos-l+1 > sgml_stringi_max_pikkus) // nii pikk ei saa olla tabelis
{
if(ignoramp==true)
goto tryki;
throw VEAD(ERR_X_TYKK, ERR_ARGVAL, __FILE__,__LINE__, "$Revision: 557 $",
"Puudub SGML olemite tabelist", (const char*)aStr+l);
}
CFSAString szSymbol=aStr.Mid(l, lSemiPos-l+1); // l�ikame &bla; sisendstringist v�lja
SGML_UC* rec;
if((rec=sgml2uc.Get(&szSymbol))==NULL) // ei leidnud kahendtabelist - jama lahti
{
if(ignoramp==true)
goto tryki;
throw VEAD(ERR_X_TYKK, ERR_ARGVAL, __FILE__,__LINE__, "$Revision: 557 $",
"Puudub SGML olemite tabelist", (const char*)szSymbol);
}
wStr += rec->uc;
//.........这里部分代码省略.........