本文整理汇总了C++中CStdString::MakeUpper方法的典型用法代码示例。如果您正苦于以下问题:C++ CStdString::MakeUpper方法的具体用法?C++ CStdString::MakeUpper怎么用?C++ CStdString::MakeUpper使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CStdString
的用法示例。
在下文中一共展示了CStdString::MakeUpper方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetEncoding
/*!
Returns true if the encoding of the document is other then UTF-8.
/param strEncoding Returns the encoding of the document. Empty if UTF-8
*/
bool XMLUtils::GetEncoding(const CXBMCTinyXML* pDoc, CStdString& strEncoding)
{
const TiXmlNode* pNode=NULL;
while ((pNode=pDoc->IterateChildren(pNode)) && pNode->Type()!=TiXmlNode::TINYXML_DECLARATION) {}
if (!pNode) return false;
const TiXmlDeclaration* pDecl=pNode->ToDeclaration();
if (!pDecl) return false;
strEncoding=pDecl->Encoding();
if (strEncoding.Equals("UTF-8") || strEncoding.Equals("UTF8")) strEncoding.Empty();
strEncoding.MakeUpper();
return !strEncoding.IsEmpty(); // Other encoding then UTF8?
}
示例2: SupportedFileType
/*##############################################
##
## Module : CScrobbler
## Function : SupportedFileType
## Description : Checks that the file type is valid
## for sending to the server
##
## Author(s) : Spib
##
## Parameters : strPath - full file path
## Return : TRUE if file is OK
##
##############################################*/
BOOL CScrobbler::SupportedFileType(CStdString strPath)
{
BOOL bRet = TRUE;
CStdString strTemp;
CStdString strReason;
int nPos = 0;
strPath.MakeUpper();
strReason = "Unknown";
if(!strPath.IsEmpty() && (strPath.GetLength() > 3))
{
strTemp = strPath.Left(7);
if((strTemp == "HTTP://") && !m_bAllowHttpStreams)
{
bRet = FALSE;
strReason = "Cannot submit HTTP streams";
PRINTF(DEBUG_INFO, "CScrobbler::SupportedFileType",
"File '%s' not supported: %s", strPath.c_str(), strReason.c_str());
return bRet;
}
strTemp = strPath.Left(6);
if((strTemp == "MMS://") && !m_bAllowHttpStreams)
{
bRet = FALSE;
strReason = "Cannot submit MMS streams";
PRINTF(DEBUG_INFO, "CScrobbler::SupportedFileType",
"File '%s' not supported: %s", strPath.c_str(), strReason.c_str());
return bRet;
}
// Is this a file?
if (strTemp.Mid(1,2) == ":\\" ||
strTemp.Mid(0,2) == "\\\\")
{
nPos = strPath.ReverseFind('.');
if(nPos > 0)
{
strTemp = strPath.Mid(nPos+1);
if ((strTemp == "NSV") ||
(strTemp == "AVI") ||
(strTemp == "M2V") ||
(strTemp == "ASF") ||
(strTemp == "WMV") ||
(strTemp == "MPG") ||
(strTemp == "MPEG"))
{
strReason = "Cannot submit Video files";
bRet = FALSE;
PRINTF(DEBUG_INFO, "CScrobbler::SupportedFileType",
"File '%s' not supported: %s", strPath.c_str(), strReason.c_str());
return bRet;
}
}
}
}
return bRet;
}