本文整理汇总了C++中String8::toUpper方法的典型用法代码示例。如果您正苦于以下问题:C++ String8::toUpper方法的具体用法?C++ String8::toUpper怎么用?C++ String8::toUpper使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类String8
的用法示例。
在下文中一共展示了String8::toUpper方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: val
bool
AaptGroupEntry::initFromDirName(const char* dir, String8* resType)
{
Vector<String8> parts;
String8 mcc, mnc, loc, orient, den, touch, key, keysHidden, nav, size, vers;
const char *p = dir;
const char *q;
while (NULL != (q = strchr(p, '-'))) {
String8 val(p, q-p);
val.toLower();
parts.add(val);
//printf("part: %s\n", parts[parts.size()-1].string());
p = q+1;
}
String8 val(p);
val.toLower();
parts.add(val);
//printf("part: %s\n", parts[parts.size()-1].string());
const int N = parts.size();
int index = 0;
String8 part = parts[index];
// resource type
if (!isValidResourceType(part)) {
return false;
}
*resType = part;
index++;
if (index == N) {
goto success;
}
part = parts[index];
// imsi - mcc
if (getMccName(part.string())) {
mcc = part;
index++;
if (index == N) {
goto success;
}
part = parts[index];
} else {
//printf("not mcc: %s\n", part.string());
}
// imsi - mnc
if (getMncName(part.string())) {
mnc = part;
index++;
if (index == N) {
goto success;
}
part = parts[index];
} else {
//printf("not mcc: %s\n", part.string());
}
// locale - language
if (part.length() == 2 && isalpha(part[0]) && isalpha(part[1])) {
loc = part;
index++;
if (index == N) {
goto success;
}
part = parts[index];
} else {
//printf("not language: %s\n", part.string());
}
// locale - region
if (loc.length() > 0
&& part.length() == 3 && part[0] == 'r' && part[0] && part[1]) {
loc += "-";
part.toUpper();
loc += part.string() + 1;
index++;
if (index == N) {
goto success;
}
part = parts[index];
} else {
//printf("not region: %s\n", part.string());
}
// orientation
if (getOrientationName(part.string())) {
orient = part;
index++;
if (index == N) {
goto success;
}
//.........这里部分代码省略.........