本文整理汇总了C++中xbox::VString::AppendPrintf方法的典型用法代码示例。如果您正苦于以下问题:C++ VString::AppendPrintf方法的具体用法?C++ VString::AppendPrintf怎么用?C++ VString::AppendPrintf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xbox::VString
的用法示例。
在下文中一共展示了VString::AppendPrintf方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _GetRFC1123DateString
BEGIN_TOOLBOX_NAMESPACE
USING_TOOLBOX_NAMESPACE
//--------------------------------------------------------------------------------------------------
static
void _GetRFC1123DateString (const XBOX::VTime& inDate, XBOX::VString& outString)
{
sWORD year, month, day, hour, minute, second, millisecond;
inDate.GetUTCTime (year, month, day, hour, minute, second, millisecond);
outString.Clear();
switch (inDate.GetWeekDay())
{
case 0: outString.AppendCString ("Sun"); break;
case 1: outString.AppendCString ("Mon"); break;
case 2: outString.AppendCString ("Tue"); break;
case 3: outString.AppendCString ("Wed"); break;
case 4: outString.AppendCString ("Thu"); break;
case 5: outString.AppendCString ("Fri"); break;
case 6: outString.AppendCString ("Sat"); break;
}
outString.AppendPrintf (", %02d-", day);
switch (month)
{
case 1: outString.AppendCString ("Jan"); break;
case 2: outString.AppendCString ("Feb"); break;
case 3: outString.AppendCString ("Mar"); break;
case 4: outString.AppendCString ("Apr"); break;
case 5: outString.AppendCString ("May"); break;
case 6: outString.AppendCString ("Jun"); break;
case 7: outString.AppendCString ("Jul"); break;
case 8: outString.AppendCString ("Aug"); break;
case 9: outString.AppendCString ("Sep"); break;
case 10: outString.AppendCString ("Oct"); break;
case 11: outString.AppendCString ("Nov"); break;
case 12: outString.AppendCString ("Dec"); break;
}
outString.AppendPrintf ("-%04d %02d:%02d:%02d GMT", year, hour, minute, second);
}