本文整理汇总了C++中StringBuilder::AppendCStr方法的典型用法代码示例。如果您正苦于以下问题:C++ StringBuilder::AppendCStr方法的具体用法?C++ StringBuilder::AppendCStr怎么用?C++ StringBuilder::AppendCStr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringBuilder
的用法示例。
在下文中一共展示了StringBuilder::AppendCStr方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
ECode CX509CRLSelector::ToString(
/* [out] */ String *str)
{
StringBuilder result;
result.AppendCStr("X509CRLSelector:\n[");
if (mIssuerNames) {
result.AppendCStr("\n IssuerNames:\n [");
Int32 size;
mIssuerNames->GetSize(&size);
for (Int32 i = 0; i < size; i++) {
result.AppendCStr("\n ");
AutoPtr<IInterface> elem;
mIssuerNames->Get(i, (IInterface**)&elem);
String name;
ICharSequence::Probe(elem)->ToString(&name);
result.AppendString(name);
}
result.AppendCStr("\n ]");
}
if (mMinCRL != NULL) {
result.AppendCStr("\n minCRL: ");
result.AppendObject(mMinCRL.Get());
}
if (mMaxCRL != NULL) {
result.AppendCStr("\n mMaxCRL: ");
result.AppendObject(mMaxCRL.Get());
}
if (mDateAndTime != -1) {
result.AppendCStr("\n dateAndTime: ");
AutoPtr<IDate> dt;
CDate::New(mDateAndTime, (IDate**)&dt);
result.AppendObject(dt.Get());
}
if (mCertificateChecking != NULL) {
result.AppendCStr("\n certificateChecking: ");
result.AppendObject(mCertificateChecking.Get());
}
result.AppendCStr("\n]");
return result.ToString(str);
}
示例2: ShowUsage
/**
* Print how to use this command.
*/
void Monkey::ShowUsage()
{
StringBuilder usage;
usage.AppendCStr("usage: monkey [-p ALLOWED_PACKAGE [-p ALLOWED_PACKAGE] ...]\n");
usage.AppendCStr(" [-c MAIN_CATEGORY [-c MAIN_CATEGORY] ...]\n");
usage.AppendCStr(" [--ignore-crashes] [--ignore-timeouts]\n");
usage.AppendCStr(" [--ignore-security-exceptions]\n");
usage.AppendCStr(" [--monitor-native-crashes] [--ignore-native-crashes]\n");
usage.AppendCStr(" [--kill-process-after-error] [--hprof]\n");
usage.AppendCStr(" [--pct-touch PERCENT] [--pct-motion PERCENT]\n");
usage.AppendCStr(" [--pct-trackball PERCENT] [--pct-syskeys PERCENT]\n");
usage.AppendCStr(" [--pct-nav PERCENT] [--pct-majornav PERCENT]\n");
usage.AppendCStr(" [--pct-appswitch PERCENT] [--pct-flip PERCENT]\n");
usage.AppendCStr(" [--pct-anyevent PERCENT] [--pct-pinchzoom PERCENT]\n");
usage.AppendCStr(" [--pkg-blacklist-file PACKAGE_BLACKLIST_FILE]\n");
usage.AppendCStr(" [--pkg-whitelist-file PACKAGE_WHITELIST_FILE]\n");
usage.AppendCStr(" [--wait-dbg] [--dbg-no-events]\n");
usage.AppendCStr(" [--setup scriptfile] [-f scriptfile [-f scriptfile] ...]\n");
usage.AppendCStr(" [--port port]\n");
usage.AppendCStr(" [-s SEED] [-v [-v] ...]\n");
usage.AppendCStr(" [--throttle MILLISEC] [--randomize-throttle]\n");
usage.AppendCStr(" [--profile-wait MILLISEC]\n");
usage.AppendCStr(" [--device-sleep-time MILLISEC]\n");
usage.AppendCStr(" [--randomize-script]\n");
usage.AppendCStr(" [--script-log]\n");
usage.AppendCStr(" [--bugreport]\n");
usage.AppendCStr(" [--periodic-bugreport]\n");
usage.AppendCStr(" COUNT\n");
PFL_EX(usage.ToString().string());
}