本文整理汇总了C++中StrPtrLen::TrimTrailingWhitespace方法的典型用法代码示例。如果您正苦于以下问题:C++ StrPtrLen::TrimTrailingWhitespace方法的具体用法?C++ StrPtrLen::TrimTrailingWhitespace怎么用?C++ StrPtrLen::TrimTrailingWhitespace使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类StrPtrLen
的用法示例。
在下文中一共展示了StrPtrLen::TrimTrailingWhitespace方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ParseRetransmitHeader
void RTSPRequest::ParseRetransmitHeader()
{
StringParser theRetransmitParser(fHeaderDictionary.GetValue(qtssXRetransmitHeader));
StrPtrLen theProtName;
Bool16 foundRetransmitProt = false;
do
{
theRetransmitParser.ConsumeWhitespace();
theRetransmitParser.ConsumeWord(&theProtName);
theProtName.TrimTrailingWhitespace();
foundRetransmitProt = theProtName.EqualIgnoreCase(RTSPProtocol::GetRetransmitProtocolName());
}
while ( (!foundRetransmitProt) &&
(theRetransmitParser.GetThru(NULL, ',')) );
if (!foundRetransmitProt)
return;
//
// We are using Reliable RTP as the transport for this stream,
// but if there was a previous transport header that indicated TCP,
// do not set the transport to be reliable UDP
if (fTransportType == qtssRTPTransportTypeUDP)
fTransportType = qtssRTPTransportTypeReliableUDP;
StrPtrLen theProtArg;
while (theRetransmitParser.GetThru(&theProtArg, '='))
{
//
// Parse out params
static const StrPtrLen kWindow("window");
theProtArg.TrimWhitespace();
if (theProtArg.EqualIgnoreCase(kWindow))
{
theRetransmitParser.ConsumeWhitespace();
fWindowSize = theRetransmitParser.ConsumeInteger(NULL);
// Save out the window size argument as a string so we
// can easily put it into the response
// (we never muck with this header)
fWindowSizeStr.Ptr = theProtArg.Ptr;
fWindowSizeStr.Len = theRetransmitParser.GetCurrentPosition() - theProtArg.Ptr;
}
theRetransmitParser.GetThru(NULL, ';'); //Skip past ';'
}
}