当前位置: 首页>>代码示例>>C++>>正文


C++ _tstring::length方法代码示例

本文整理汇总了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);
}
开发者ID:GordonSmith,项目名称:eclide,代码行数:11,代码来源:TextCompare.cpp

示例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);
     }
 }
开发者ID:dehilsterlexis,项目名称:eclide,代码行数:9,代码来源:ChildAttributeFrame.cpp

示例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();
}
开发者ID:GordonSmith,项目名称:eclide,代码行数:21,代码来源:TextCompare.cpp

示例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;
}
开发者ID:drealeed,项目名称:eclide,代码行数:20,代码来源:BookmarksView.cpp


注:本文中的std::_tstring::length方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。