本文整理汇总了C++中nsString::StripWhitespace方法的典型用法代码示例。如果您正苦于以下问题:C++ nsString::StripWhitespace方法的具体用法?C++ nsString::StripWhitespace怎么用?C++ nsString::StripWhitespace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类nsString
的用法示例。
在下文中一共展示了nsString::StripWhitespace方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: switch
void
mozTXTToHTMLConv::CalculateURLBoundaries(const PRUnichar * aInString, PRInt32 aInStringLength,
const PRUint32 pos, const PRUint32 whathasbeendone,
const modetype check, const PRUint32 start, const PRUint32 end,
nsString& txtURL, nsString& desc,
PRInt32& replaceBefore, PRInt32& replaceAfter)
{
PRUint32 descstart = start;
switch(check)
{
case RFC1738:
{
descstart = start - 5;
desc.Append(&aInString[descstart], end - descstart + 2); // include "<URL:" and ">"
replaceAfter = end - pos + 1;
} break;
case RFC2396E:
{
descstart = start - 1;
desc.Append(&aInString[descstart], end - descstart + 2); // include brackets
replaceAfter = end - pos + 1;
} break;
case freetext:
case abbreviated:
{
descstart = start;
desc.Append(&aInString[descstart], end - start + 1); // don't include brackets
replaceAfter = end - pos;
} break;
default: break;
} //switch
EscapeStr(desc, false);
txtURL.Append(&aInString[start], end - start + 1);
txtURL.StripWhitespace();
// FIX ME
nsAutoString temp2;
ScanTXT(&aInString[descstart], pos - descstart, ~kURLs /*prevents loop*/ & whathasbeendone, temp2);
replaceBefore = temp2.Length();
return;
}