本文整理汇总了C++中StringBuffer::getString方法的典型用法代码示例。如果您正苦于以下问题:C++ StringBuffer::getString方法的具体用法?C++ StringBuffer::getString怎么用?C++ StringBuffer::getString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StringBuffer
的用法示例。
在下文中一共展示了StringBuffer::getString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handle_a_sequence
void handle_a_sequence (FILE* output, StringBuffer& current_name, StringBuffer& current_sequence, unsigned long from, unsigned long to, double coverage, ambig_mode ambig_mode, bool is_protein) {
long covered = 0;
const unsigned char *s = (const unsigned char *)current_sequence.getString();
for (unsigned long c = from; c <= to; c++) {
double rc = resolution_count (s[c], false);
if (rc == 1.) {
covered ++;
} else if (rc > 0.) {
switch (ambig_mode) {
case nfold:
if (rc > (is_protein? 0.05 : 0.25)) {
covered ++;
}
break;
case threefold:
if (rc > 1./3.) {
covered ++;
}
break;
case any:
case gaponly:
break;
}
}
}
if (covered/ (to-from+1.0) >= coverage) {
dump_sequence_fasta (0, output, 0, NULL, is_protein, from, to);
}
}
示例2:
wstring_ptr qm::AbstractSSLSocketCallback::getSSLErrorMessage() const
{
if (nErrors_ == ERROR_NONE)
return 0;
StringBuffer<WSTRING> buf;
if (nErrors_ & ERROR_VERIFICATIONFAILED) {
buf.append(loadString(getResourceHandle(), IDS_ERROR_VERIFICATIONFAILED).get());
buf.append(L'\n');
if (wstrVerifyError_.get()) {
buf.append(L' ');
buf.append(wstrVerifyError_.get());
buf.append(L'\n');
}
}
if (nErrors_ & ERROR_HOSTNAMENOTMATCH) {
buf.append(loadString(getResourceHandle(), IDS_ERROR_HOSTNAMENOTMATCH).get());
buf.append(L'\n');
}
if (pCertificate_.get()) {
buf.append(L' ');
buf.append(loadString(getResourceHandle(), IDS_SUBJECT).get());
buf.append(L": ");
buf.append(pCertificate_->getSubject()->getText().get());
buf.append(L'\n');
buf.append(L' ');
buf.append(loadString(getResourceHandle(), IDS_ISSUER).get());
buf.append(L": ");
buf.append(pCertificate_->getIssuer()->getText().get());
buf.append(L'\n');
}
return buf.getString();
}