本文整理汇总了C++中SafeBuf::replaceChar方法的典型用法代码示例。如果您正苦于以下问题:C++ SafeBuf::replaceChar方法的具体用法?C++ SafeBuf::replaceChar怎么用?C++ SafeBuf::replaceChar使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SafeBuf
的用法示例。
在下文中一共展示了SafeBuf::replaceChar方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sendPageBasicStatus
//.........这里部分代码省略.........
sb.safePrintf ("%%22>"
"%s"
"</a>"
"</b></td>"
"<td>%" PRId64"</td>"
"</tr>\n" ,
mstrerror(i),
g_stats.m_allErrorsNew[i] +
g_stats.m_allErrorsOld[i] );
}
//
// end status code breakdown
//
char tmp3[64];
struct tm *timeStruct;
time_t tt = (time_t)cr->m_diffbotCrawlStartTime;
timeStruct = localtime(&tt);
// Jan 01 1970 at 10:30:00
strftime ( tmp3,64 , "%b %d %Y at %H:%M:%S",timeStruct);
sb.safePrintf("<tr><td><b>Collection Created</b></td>"
"<td>%s (local time)</td></tr>",tmp3);
// print link to embed the code in their own site
SafeBuf embed;
embed.htmlEncode(sb.getBufStart()+savedLen1,
savedLen2-savedLen1,
false); // encodePoundSign #?
// convert all ''s to "'s for php's echo ''; cmd
embed.replaceChar('\'','\"');
sb.safePrintf("<tr>"
"<td valign=top>"
"<a onclick=\""
"var dd=document.getElementById('hcode');"
"if ( dd.style.display=='none' ) "
"dd.style.display=''; "
"else "
"dd.style.display='none';"
"\" style=color:blue;>"
"<u>"
"show Widget HTML code"
"</u>"
"</a>"
"</td><td>"
"<div id=hcode style=display:none;"
"max-width:800px;>"
"%s"
"</div>"
"</td></tr>"
, embed.getBufStart() );
sb.safePrintf("<tr>"
"<td valign=top>"
"<a onclick=\""
"var dd=document.getElementById('pcode');"
"if ( dd.style.display=='none' ) "
"dd.style.display=''; "
"else "
"dd.style.display='none';"
"\" style=color:blue;>"
"<u>"