本文整理汇总了C++中common::UString::makeLower方法的典型用法代码示例。如果您正苦于以下问题:C++ UString::makeLower方法的具体用法?C++ UString::makeLower怎么用?C++ UString::makeLower使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common::UString
的用法示例。
在下文中一共展示了UString::makeLower方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: hasResource
bool NDSFile::hasResource(Common::UString name) const {
name.makeLower();
for (ResourceList::const_iterator r = _resources.begin(); r != _resources.end(); ++r)
if (TypeMan.setFileType(r->name, r->type) == name)
return true;
return false;
}
示例2: parseEncoding
Encoding parseEncoding(Common::UString str) {
if (str.empty())
return kEncodingInvalid;
str.makeLower();
for (size_t i = 0; i < ARRAYSIZE(kEncodingStrings); i++) {
for (size_t j = 0; j < ARRAYSIZE(kEncodingStrings[i].strings); j++) {
if (!kEncodingStrings[i].strings[j])
break;
if (str == kEncodingStrings[i].strings[j])
return kEncodingStrings[i].encoding;
}
}
return kEncodingInvalid;
}
示例3: parseLanguage
Language LanguageManager::parseLanguage(Common::UString str) {
if (str.empty())
return kLanguageInvalid;
str.makeLower();
for (size_t i = 0; i < ARRAYSIZE(kLanguageStrings); i++) {
for (size_t j = 0; j < ARRAYSIZE(kLanguageStrings[i].strings); j++) {
if (!kLanguageStrings[i].strings[j])
break;
if (str == kLanguageStrings[i].strings[j])
return kLanguageStrings[i].language;
}
}
return kLanguageInvalid;
}
示例4: load
void XMLNode::load(_xmlNode &node, bool makeLower) {
_name = node.name ? (const char *) node.name : "";
_content = node.content ? (const char *) node.content : "";
if (makeLower)
_name.makeLower();
for (xmlAttrPtr attrib = node.properties; attrib; attrib = attrib->next) {
Common::UString name (attrib->name ? (const char *) attrib->name : "");
Common::UString value(attrib->children ? (const char *) attrib->children->content : "");
if (makeLower)
name.makeLower();
_properties.insert(std::make_pair(name, value));
}
for (xmlNodePtr child = node.children; child; child = child->next) {
_children.push_back(new XMLNode(*child, makeLower, this));
_childMap.insert(std::make_pair(_children.back()->getName(), _children.back()));
}
}