本文整理汇总了C++中std::_tstring::length方法的典型用法代码示例。如果您正苦于以下问题:C++ _tstring::length方法的具体用法?C++ _tstring::length怎么用?C++ _tstring::length使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类std::_tstring
的用法示例。
在下文中一共展示了_tstring::length方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TextCompare
// ===========================================================================
void TextCompare(const std::_tstring & base, const std::_tstring & comp, CLineVector & baseResult, CLineVector & compResult)
{
if (base.length() == 0 && comp.length() == 0)
return;
CTable baseTable(base);
CTable compTable(comp);
CAnchors compare(baseTable, compTable, 1);
compare.GetPaddedResults(baseResult, compResult);
}
示例2: ShowEcl
void ShowEcl(const std::_tstring & searchTerm, FINDMODE findmode)
{
m_tabbedChildWindow.GetTabCtrl().SetCurSel(0);
if (searchTerm.length())
{
int flags = 0;
m_dlgview.GetView().DoFind(searchTerm, flags, findmode, true);
}
}
示例3: hash_string
void CLine::hash_string(const std::_tstring & s)
{
// Calc Hash
boost::crc_32_type computer;
computer.reset();
computer.process_bytes(s.c_str(), sizeof(TCHAR) * s.length());
m_hash = computer.checksum();
// Calc Anchor Hash
bool prevIsGraph = true;
static boost::crc_32_type anchorComputer;
anchorComputer.reset();
for (unsigned int i = 0; i < s.length(); ++i)
{
bool isGraph = iswgraph(s[i]) != 0 || s[i] == '\r' || s[i] == '\n';
if (isGraph)
anchorComputer.process_bytes(&s[i], sizeof(TCHAR));
prevIsGraph = isGraph;
}
m_anchorHash = anchorComputer.checksum();
}
示例4: FindTag
std::_tstring CBookmarksView::FindTag(std::_tstring str, std::_tstring tag, int &index) {
std::_tstring tagEnd = _T("</") + tag + _T(">");
std::_tstring foundStr = _T("");
tag = _T("<") + tag + _T(">");
int n = static_cast<int>(str.find(tag, index));
if (n >= 0)
{
int tagLen = tag.length();
int indexEnd = static_cast<int>(str.find(tagEnd, index));
foundStr = str.substr(n + tagLen, indexEnd - n - tagLen);
index = indexEnd + tagEnd.length() + 1;
}
else
{
index = -1;
foundStr = _T("");
}
return foundStr;
}