本文整理汇总了C++中wyString::CompareI方法的典型用法代码示例。如果您正苦于以下问题:C++ wyString::CompareI方法的具体用法?C++ wyString::CompareI怎么用?C++ wyString::CompareI使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wyString
的用法示例。
在下文中一共展示了wyString::CompareI方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
void
BlobMgmt::ProcessComboSelection(wyString& comboselparam)
{
wyChar *ansistr = NULL;
wyChar *utf8str = NULL;
wyWChar *ucs2str = NULL;
wyInt32 lenucs2 = 0, i;
if(comboselparam.CompareI("US-ascii/Ansi ") == 0 && m_isutf8 == wyTrue)
{
ansistr = Utf8toAnsi(m_blobdata.GetString(), m_blobdata.GetLength());
m_piub->m_data = ansistr;
m_piub->m_datasize = strlen(ansistr);
m_piub->m_isnull = wyFalse;
m_piub->m_ischanged = wyTrue;
}
else if(comboselparam.CompareI("UTF-8") == 0 && m_isansi == wyTrue)
{
utf8str = AnsitoUtf8(m_blobdata.GetString(), m_blobdata.GetLength());
m_piub->m_data = utf8str;
m_piub->m_datasize = strlen(utf8str);
m_piub->m_isnull = wyFalse;
m_piub->m_ischanged = wyTrue;
}
else if(comboselparam.CompareI("ucs2") == 0 && m_isutf8 == wyTrue)
{
ucs2str = Utf8toUcs2(m_blobdata.GetString(), m_blobdata.GetLength());
lenucs2 = wcslen(ucs2str);
memset(m_piub->m_data, 0, strlen(m_piub->m_data));
for(i=0; i < lenucs2; i++)
memcpy(m_piub->m_data + i, ucs2str + i, 1);
m_piub->m_datasize = lenucs2;
m_piub->m_isnull = wyFalse;
m_piub->m_ischanged = wyTrue;
}
else if(comboselparam.CompareI("US-ascii/Ansi ") == 0 && m_isucs2 == wyTrue)
{
ansistr = Ucs2toAnsi(m_blobdata.GetString(), m_blobdata.GetLength());
m_piub->m_data = ansistr;
m_piub->m_datasize = strlen(ansistr);
m_piub->m_isnull = wyFalse;
m_piub->m_ischanged = wyTrue;
}
else if(comboselparam.CompareI("UTF-8") == 0 && m_isucs2 == wyTrue)
{
utf8str = Ucs2toUtf8(m_blobdata.GetString(), m_blobdata.GetLength());
m_piub->m_data = utf8str;
m_piub->m_datasize = strlen(utf8str);
m_piub->m_isnull = wyFalse;
m_piub->m_ischanged = wyTrue;
}
else if(comboselparam.CompareI("ucs2") == 0 && m_isansi == wyTrue)
{
ucs2str = AnsitoUcs2(m_blobdata.GetString(), m_blobdata.GetLength());
lenucs2 = wcslen(ucs2str);
memcpy(m_piub->m_data, ucs2str, lenucs2);
for(i=0; i < lenucs2; i++)
memcpy(m_piub->m_data + i, ucs2str + i, 1);
m_piub->m_datasize = lenucs2;
m_piub->m_isnull = wyFalse;
m_piub->m_ischanged = wyTrue;
}
}