本文整理汇总了C++中Q3CString::upper方法的典型用法代码示例。如果您正苦于以下问题:C++ Q3CString::upper方法的具体用法?C++ Q3CString::upper怎么用?C++ Q3CString::upper使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Q3CString
的用法示例。
在下文中一共展示了Q3CString::upper方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: compute_name
Q3CString UmlOperation::compute_name() {
Q3CString get_set_spec = pythonNameSpec();
if (! get_set_spec.isEmpty()) {
UmlClassMember * it;
if ((it = getOf()) == 0)
it = setOf();
int index;
Q3CString s = (it->kind() == aRelation)
? ((UmlRelation *) it)->roleName()
: it->name();
if ((index = get_set_spec.find("${name}")) != -1)
get_set_spec.replace(index, 7, s);
else if ((index = get_set_spec.find("${Name}")) != -1)
get_set_spec.replace(index, 7, capitalize(s));
else if ((index = s.find("${NAME}")) != -1)
get_set_spec.replace(index, 7, s.upper());
else if ((index = s.find("${nAME}")) != -1)
get_set_spec.replace(index, 7, s.lower());
return get_set_spec;
}
else
return name();
}
示例2: compute_name
Q3CString UmlOperation::compute_name(Q3CString s)
{
if (!s.isEmpty()) {
UmlClassMember * m = getOf();
if ((m != 0) || ((m = setOf()) != 0)) {
Q3CString n = (m->kind() == aRelation)
? ((UmlRelation *) m)->roleName()
: m->name();
int index;
if ((index = s.find("${name}")) != -1)
return s.left(index) + n + s.mid(index + 7);
else if ((index = s.find("${Name}")) != -1)
return s.left(index) + n.left(1).upper() + n.mid(1) + s.mid(index + 7);
else if ((index = s.find("${NAME}")) != -1)
return s.left(index) + n.upper() + s.mid(index + 7);
else
return s;
}
}
return name();
}
示例3: generate
//.........这里部分代码省略.........
const char * p = def;
const char * pp = 0;
for (;;) {
if (*p == 0) {
if (pp == 0)
break;
// comment management done
p = pp;
pp = 0;
if (*p == 0)
break;
}
if (*p == '@')
manage_alias(p, f);
else if (*p != '$')
f << *p++;
else if (!strncmp(p, "${comment}", 10))
manage_comment(p, pp);
else if (!strncmp(p, "${description}", 14))
manage_description(p, pp);
else if (!strncmp(p, "${name}", 7)) {
p += 7;
f << name;
}
else if (!strncmp(p, "${Name}", 7)) {
p += 7;
f << capitalize(name);
}
else if (!strncmp(p, "${NAME}", 7)) {
p += 7;
f << name.upper();
}
else if (!strncmp(p, "${nAME}", 7)) {
p += 7;
f << name.lower();
}
else if (!strncmp(p, "${module}", 9)) {
p += 9;
f << mod;
}
else if (!strncmp(p, "${MODULE}", 9)) {
p += 9;
f << mod.upper();
}
else if (!strncmp(p, "${includes}", 11)) {
p += 11;
/*if (!incl_computed) {
incl_computed = TRUE;
CppRefType::compute(dependencies, hdef, srcdef, h_incl, decl, incl, this);
}
if (!incl.isEmpty()) {
f << incl;
if (*p != '\n')
f << '\n';
}
else*/ if (*p == '\n')
p += 1;
}
else if (!strncmp(p, "${definition}", 13)) {
p += 13;
for (index = 0; index != n; index += 1)
cls[index]->generate(f);
if (*p == '\n')
示例4: QCOMPARE
void tst_Q3CString::upper()
{
Q3CString a;
a="Text";
QCOMPARE(a.upper(),(Q3CString)"TEXT");
}