本文整理汇总了C++中FX_BSTR::GetLength方法的典型用法代码示例。如果您正苦于以下问题:C++ FX_BSTR::GetLength方法的具体用法?C++ FX_BSTR::GetLength怎么用?C++ FX_BSTR::GetLength使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FX_BSTR
的用法示例。
在下文中一共展示了FX_BSTR::GetLength方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SkipLiterals
void CXML_Parser::SkipLiterals(FX_BSTR str)
{
m_nOffset = m_nBufferOffset + (FX_FILESIZE)m_dwIndex;
if (IsEOF()) {
return;
}
FX_INT32 i = 0, iLen = str.GetLength();
do {
while (m_dwIndex < m_dwBufferSize) {
if (str.GetAt(i) != m_pBuffer[m_dwIndex ++]) {
i = 0;
} else {
i ++;
if (i == iLen) {
break;
}
}
}
m_nOffset = m_nBufferOffset + (FX_FILESIZE)m_dwIndex;
if (i == iLen) {
return;
}
if (m_dwIndex < m_dwBufferSize || IsEOF()) {
break;
}
} while (ReadNextBlock());
while (!m_pDataAcc->IsEOF()) {
ReadNextBlock();
m_nOffset = m_nBufferOffset + (FX_FILESIZE)m_dwBufferSize;
}
m_dwIndex = m_dwBufferSize;
}
示例2: FPF_SKIANormalizeFontName
static FX_DWORD FPF_SKIANormalizeFontName(FX_BSTR bsfamily)
{
FX_DWORD dwHash = 0;
FX_INT32 iLength = bsfamily.GetLength();
FX_LPCSTR pBuffer = bsfamily.GetCStr();
for (FX_INT32 i = 0; i < iLength; i++) {
FX_CHAR ch = pBuffer[i];
if (ch == ' ' || ch == '-' || ch == ',') {
continue;
}
dwHash = 31 * dwHash + FXSYS_tolower(ch);
}
return dwHash;
}