本文整理汇总了C++中core::stringw::equals_ignore_case方法的典型用法代码示例。如果您正苦于以下问题:C++ stringw::equals_ignore_case方法的具体用法?C++ stringw::equals_ignore_case怎么用?C++ stringw::equals_ignore_case使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core::stringw
的用法示例。
在下文中一共展示了stringw::equals_ignore_case方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: load
bool PlayerManager::load()
{
std::cout << "Load XML file" << std::endl;
if (!NullDevice)
{
std::cout << "Any device !" << std::endl;
return false;
}
io::IXMLReader* xml = NullDevice->getFileSystem()->createXMLReader(playerFilePath);
if (!xml)
{
std::cout << "Can't create XMLReader !" << std::endl;
return false;
}
const core::stringw statTag(L"stat");
core::stringw currentSection;
const core::stringw playerTag(L"player");
while (xml->read())
{
switch (xml->getNodeType())
{
case io::EXN_ELEMENT:
{
if (currentSection.empty() && playerTag.equals_ignore_case(xml->getNodeName()))
currentSection = playerTag;
else if (currentSection.equals_ignore_case(playerTag) && statTag.equals_ignore_case(xml->getNodeName() ))
{
core::stringw key = xml->getAttributeValueSafe(L"name");
if(!key.empty())
PlayerMap[key] = xml->getAttributeValueSafe(L"value");
}
}break;
case io::EXN_ELEMENT_END:
currentSection = L"";
break;
default:
break;
}
}
xml->drop();
std::cout << "File loaded" << std::endl;
return true;
}
示例2: doesRowStartWith
bool GUITable::doesRowStartWith(const Row *row, const core::stringw &str) const
{
if (row == NULL)
return false;
for (s32 j = 0; j < row->cellcount; ++j) {
Cell *cell = &row->cells[j];
if (cell->content_type == COLUMN_TYPE_TEXT) {
const core::stringw &cellstr = m_strings[cell->content_index];
if (cellstr.size() >= str.size() &&
str.equals_ignore_case(cellstr.subString(0, str.size())))
return true;
}
}
return false;
}