当前位置: 首页>>代码示例>>C++>>正文


C++ CStdString::MakeLower方法代码示例

本文整理汇总了C++中CStdString::MakeLower方法的典型用法代码示例。如果您正苦于以下问题:C++ CStdString::MakeLower方法的具体用法?C++ CStdString::MakeLower怎么用?C++ CStdString::MakeLower使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CStdString的用法示例。


在下文中一共展示了CStdString::MakeLower方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: GetRegKeyForDocNum

bool OfflineDataStore::GetRegKeyForDocNum(const CStdString& sDocID, CRegKey& rkResult) 
{
	CStdString sNoVersionDocID = RemoveVersionLabel(sDocID);
	sNoVersionDocID.MakeLower();

	CRegKey rk;
	long lResult = rk.Open(HKEY_CURRENT_USER, GetRegistryKeyName());

	DWORD dwIndex = 0;
	while(lResult == ERROR_SUCCESS)
	{
		CStdString sResult;
		DWORD dwLength = MAX_PATH;
		lResult = rk.EnumKey(dwIndex, sResult.GetBuffer(MAX_PATH), &dwLength);
		sResult.ReleaseBuffer();
		sResult.MakeLower();

		dwIndex++;
		if(sResult.Find(sNoVersionDocID) != -1)
		{
			return (rkResult.Open(HKEY_CURRENT_USER, GetKeyNameForDocID(sResult)) == ERROR_SUCCESS);
		}
	}
	return false;
}
开发者ID:killbug2004,项目名称:WSProf,代码行数:25,代码来源:OfflineDataStore.cpp

示例2: GetOnlineLibrary

CStdString OfflineDocIDResolver::GetOnlineLibrary( const CStdString& sDocID, const CStdString &sOfflineLibrary) const
{
    CStdString sOfflineLib = _T("_") + sOfflineLibrary;
    CStdString sLib = GetLibrary(sDocID);
    sLib.MakeLower();
    sOfflineLib.MakeLower();
    sLib.Replace(sOfflineLib, _T(""));

    return sLib;
}
开发者ID:killbug2004,项目名称:WSProf,代码行数:10,代码来源:OfflineDocIDResolver.cpp

示例3: Init

bool ASAPCodec::Init(const CStdString &strFile, unsigned int filecache)
{
  if (!m_dll.Load())
    return false;

  CStdString strFileToLoad = strFile;
  int song = -1;
  CStdString strExtension;
  CUtil::GetExtension(strFile, strExtension);
  strExtension.MakeLower();
  if (strExtension == ".asapstream")
  {
    CStdString strFileName = CUtil::GetFileName(strFile);
    int iStart = strFileName.ReverseFind('-') + 1;
    song = atoi(strFileName.substr(iStart, strFileName.size() - iStart - 11).c_str()) - 1;
    CStdString strPath = strFile;
    CUtil::GetDirectory(strPath, strFileToLoad);
    CUtil::RemoveSlashAtEnd(strFileToLoad);
  }

  int duration;
  if (!m_dll.asapLoad(strFileToLoad.c_str(), song, &m_Channels, &duration))
    return false;
  m_TotalTime = duration;
  m_SampleRate = 44100;
  m_BitsPerSample = 16;
  return true;
}
开发者ID:Bobbin007,项目名称:xbmc,代码行数:28,代码来源:ASAPCodec.cpp

示例4: IsValidFile

bool CFileCDDA::IsValidFile(const CURL& url)
{
  // Only .cdda files are supported
  CStdString strExtension;
  CUtil::GetExtension(url.Get(), strExtension);
  strExtension.MakeLower();

  return (strExtension == ".cdda");
}
开发者ID:Bobbin007,项目名称:xbmc,代码行数:9,代码来源:FileCDDA.cpp

示例5: Convert

BOOL CPermissions::Convert(CMarkupSTL *pXML)
{
	if (!m_UsersList.size())
		return FALSE;

	if (!pXML->FindChildElem(_T("Users")))
		pXML->AddChildElem(_T("Users"));
	pXML->IntoElem();
		
	//Save the changed user details
	for (t_UsersList::const_iterator iter=m_UsersList.begin(); iter!=m_UsersList.end(); iter++)
	{
		pXML->ResetChildPos();
		CStdString newname = iter->user;
		newname.MakeLower();
		while (pXML->FindChildElem("User"))
		{
			CStdString name = pXML->GetChildAttrib(_T("Name"));
			name.MakeLower();
			if (name == newname)
				pXML->RemoveChildElem();
		}
		pXML->AddChildElem(_T("User"));
		pXML->AddChildAttrib(_T("Name"), iter->user);
		pXML->IntoElem();
		SetKey(pXML, "Pass", iter->password);
		SetKey(pXML, "Resolve Shortcuts", iter->bLnk?"1":"0");
		SetKey(pXML, "Relative", iter->bRelative?"1":"0");
		SetKey(pXML, "Bypass server userlimit", iter->bBypassUserLimit?"1":"0");
		CStdString str;
		str.Format(_T("%d"), iter->nUserLimit);
		SetKey(pXML, "User Limit", str);
		str.Format(_T("%d"), iter->nIpLimit);
		SetKey(pXML, "IP Limit", str);

		SavePermissions(pXML, *iter);
		pXML->OutOfElem();
	}
	return TRUE;
}
开发者ID:Avoidnf8,项目名称:xbmc-fork,代码行数:40,代码来源:Permissions.cpp

示例6: GetStreamCodecName

CStdString OMXReader::GetStreamCodecName(AVStream *stream)
{
  CStdString strStreamName = "";

  if(!stream)
    return strStreamName;

  unsigned int in = stream->codec->codec_tag;
  // FourCC codes are only valid on video streams, audio codecs in AVI/WAV
  // are 2 bytes and audio codecs in transport streams have subtle variation
  // e.g AC-3 instead of ac3
  if (stream->codec->codec_type == AVMEDIA_TYPE_VIDEO && in != 0)
  {
    char fourcc[5];
    memcpy(fourcc, &in, 4);
    fourcc[4] = 0;
    // fourccs have to be 4 characters
    if (strlen(fourcc) == 4)
    {
      strStreamName = fourcc;
      strStreamName.MakeLower();
      return strStreamName;
    }
  }

#ifdef FF_PROFILE_DTS_HD_MA
  /* use profile to determine the DTS type */
  if (stream->codec->codec_id == CODEC_ID_DTS)
  {
    if (stream->codec->profile == FF_PROFILE_DTS_HD_MA)
      strStreamName = "dtshd_ma";
    else if (stream->codec->profile == FF_PROFILE_DTS_HD_HRA)
      strStreamName = "dtshd_hra";
    else
      strStreamName = "dca";
    return strStreamName;
  }
#endif

  AVCodec *codec = m_dllAvCodec.avcodec_find_decoder(stream->codec->codec_id);

  if (codec)
    strStreamName = codec->name;

  return strStreamName;
}
开发者ID:dirty-d,项目名称:omxplayer,代码行数:46,代码来源:OMXReader.cpp

示例7: Load

bool CMusicInfoTagLoaderASAP::Load(const CStdString &strFile, CMusicInfoTag &tag, EmbeddedArt *art)
{
    tag.SetLoaded(false);

    if (!m_dll.Load())
        return false;

    CStdString strFileToLoad = strFile;
    int song = -1;
    CStdString strExtension;
    URIUtils::GetExtension(strFile, strExtension);
    strExtension.MakeLower();
    if (strExtension == ".asapstream")
    {
        CStdString strFileName = URIUtils::GetFileName(strFile);
        int iStart = strFileName.ReverseFind('-') + 1;
        song = atoi(strFileName.substr(iStart, strFileName.size() - iStart - 11).c_str()) - 1;
        CStdString strPath = strFile;
        URIUtils::GetDirectory(strPath, strFileToLoad);
        URIUtils::RemoveSlashAtEnd(strFileToLoad);
    }

    ASAP_SongInfo songInfo;
    if (!m_dll.asapGetInfo(strFileToLoad.c_str(), song, &songInfo))
        return false;

    tag.SetURL(strFileToLoad);
    if (songInfo.name[0] != '\0')
        tag.SetTitle(songInfo.name);
    if (songInfo.author[0] != '\0')
        tag.SetArtist(songInfo.author);
    if (song >= 0)
        tag.SetTrackNumber(song + 1);
    if (songInfo.duration >= 0)
        tag.SetDuration(songInfo.duration / 1000);
    if (songInfo.year > 0)
    {
        SYSTEMTIME dateTime = { (WORD)songInfo.year, (WORD)songInfo.month, 0,
                                (WORD)songInfo.day, 0, 0, 0, 0
                              };
        tag.SetReleaseDate(dateTime);
    }
    tag.SetLoaded(true);
    return true;
}
开发者ID:nikkpap,项目名称:SPMC,代码行数:45,代码来源:MusicInfoTagLoaderASAP.cpp

示例8: IsDVD

bool URIUtils::IsDVD(const CStdString& strFile)
{
#if defined(_WIN32)
  if(strFile.Mid(1) != ":\\"
  && strFile.Mid(1) != ":")
    return false;

  if((GetDriveType(strFile.c_str()) == DRIVE_CDROM) || strFile.Left(6).Equals("dvd://"))
    return true;
#else
  CStdString strFileLow = strFile;
  strFileLow.MakeLower();
  if (strFileLow == "d:/"  || strFileLow == "d:\\"  || strFileLow == "d:" || strFileLow == "iso9660://" || strFileLow == "udf://" || strFileLow == "dvd://1" )
    return true;
#endif

  return false;
}
开发者ID:mbolhuis,项目名称:xbmc,代码行数:18,代码来源:URIUtils.cpp

示例9: GetCustomTVRegexps

void CAdvancedSettings::GetCustomTVRegexps(TiXmlElement *pRootElement, SETTINGS_TVSHOWLIST& settings)
{
  int iAction = 0; // overwrite
  // for backward compatibility
  const char* szAppend = pRootElement->Attribute("append");
  if ((szAppend && stricmp(szAppend, "yes") == 0))
    iAction = 1;
  // action takes precedence if both attributes exist
  const char* szAction = pRootElement->Attribute("action");
  if (szAction)
  {
    iAction = 0; // overwrite
    if (stricmp(szAction, "append") == 0)
      iAction = 1; // append
    else if (stricmp(szAction, "prepend") == 0)
      iAction = 2; // prepend
  }
  if (iAction == 0)
    settings.clear();
  TiXmlNode* pRegExp = pRootElement->FirstChild("regexp");
  int i = 0;
  while (pRegExp)
  {
    if (pRegExp->FirstChild())
    {
      bool bByDate = false;
      if (pRegExp->ToElement())
      {
        CStdString byDate = pRegExp->ToElement()->Attribute("bydate");
        if(byDate && stricmp(byDate, "true") == 0)
        {
          bByDate = true;
        }
      }
      CStdString regExp = pRegExp->FirstChild()->Value();
      regExp.MakeLower();
      if (iAction == 2)
        settings.insert(settings.begin() + i++, 1, TVShowRegexp(bByDate,regExp));
      else
        settings.push_back(TVShowRegexp(bByDate,regExp));
    }
    pRegExp = pRegExp->NextSibling("regexp");
  }
}
开发者ID:Rocky5,项目名称:XBMC4Kids,代码行数:44,代码来源:AdvancedSettings.cpp

示例10: IsPlaylist

bool CPlayListFactory::IsPlaylist(const CFileItem& item, bool bAllowQuery)
{
  CStdString extension = CUtil::GetExtension(item.m_strPath);
  extension.ToLower();

  if (extension == ".m3u") return true;
  if (extension == ".m3u8") return true;
  if (extension == ".b4s") return true;
  if (extension == ".pls") return true;
  if (extension == ".strm") return true;
  if (extension == ".wpl") return true;
  if (extension == ".asx") return true;
  if (extension == ".ram") return true;
  
  if (item.IsLastFM())
    return false;

  if (extension == ".url") return true;
  if (extension == ".pxml") return true;

  if (item.IsShoutCast())
    return false;

  if( item.IsInternetStream() )
  {
    CStdString strContentType = item.GetContentType(bAllowQuery);
    strContentType.MakeLower();

    if (strContentType == "video/x-ms-asf"
    || strContentType == "video/x-ms-asx"
    || strContentType == "video/x-ms-wfs"
    || strContentType == "video/x-ms-wvx"
    || strContentType == "video/x-ms-wax"
    || strContentType == "audio/x-pn-realaudio"
    || strContentType == "audio/x-scpls"
    || strContentType == "playlist"
    || strContentType == "audio/x-mpegurl"
    || strContentType == "application/vnd.ms-wpl")
      return true;
  }
  
  return false;
}
开发者ID:Kr0nZ,项目名称:boxee,代码行数:43,代码来源:PlayListFactory.cpp

示例11: GetAccessType

BOOL CObjectEntry::GetAccessType(CStdString& strAccessType, bool p_oLowerCase)
{
    BOOL oResult(FALSE);

    switch(m_AccessType)
    {
        case AT_READ_WRITE: strAccessType = "RW"; oResult = TRUE; break;
        case AT_READ_WRITE_READ: strAccessType =  "RW"; oResult = TRUE; break;
        case AT_READ_WRITE_WRITE: strAccessType =  "RW"; oResult = TRUE; break;
        case AT_WRITE_ONLY: strAccessType =  "WO"; oResult = TRUE; break;
        case AT_READ_ONLY: strAccessType =  "RO"; oResult = TRUE; break;
        case AT_READ_ONLY_CONST: strAccessType =  "Const"; oResult = TRUE; break;
        default: strAccessType =  ""; oResult = FALSE; break;
    }
    if(p_oLowerCase)
	{
		strAccessType.MakeLower();
	}
    return oResult;
}
开发者ID:RIVeR-Lab,项目名称:eposcmd,代码行数:20,代码来源:ObjectEntry.cpp

示例12: GetCustomRegexps

void CAdvancedSettings::GetCustomRegexps(TiXmlElement *pRootElement, CStdStringArray& settings)
{
  TiXmlElement *pElement = pRootElement;
  while (pElement)
  {
    int iAction = 0; // overwrite
    // for backward compatibility
    const char* szAppend = pElement->Attribute("append");
    if ((szAppend && stricmp(szAppend, "yes") == 0))
      iAction = 1;
    // action takes precedence if both attributes exist
    const char* szAction = pElement->Attribute("action");
    if (szAction)
    {
      iAction = 0; // overwrite
      if (stricmp(szAction, "append") == 0)
        iAction = 1; // append
      else if (stricmp(szAction, "prepend") == 0)
        iAction = 2; // prepend
    }
    if (iAction == 0)
      settings.clear();
    TiXmlNode* pRegExp = pElement->FirstChild("regexp");
    int i = 0;
    while (pRegExp)
    {
      if (pRegExp->FirstChild())
      {
        CStdString regExp = pRegExp->FirstChild()->Value();
        regExp.MakeLower();
        if (iAction == 2)
          settings.insert(settings.begin() + i++, 1, regExp);
        else
          settings.push_back(regExp);
      }
      pRegExp = pRegExp->NextSibling("regexp");
    }

    pElement = pElement->NextSiblingElement(pRootElement->Value());
  }
}
开发者ID:Rocky5,项目名称:XBMC4Kids,代码行数:41,代码来源:AdvancedSettings.cpp

示例13: Init

bool NSFCodec::Init(const CStdString &strFile, unsigned int filecache)
{
    DeInit();

    if (!m_dll.Load())
        return false; // error logged previously

    CStdString strFileToLoad = strFile;
    m_iTrack = 0;
    CStdString strExtension;
    URIUtils::GetExtension(strFile,strExtension);
    strExtension.MakeLower();
    if (strExtension==".nsfstream")
    {
        //  Extract the track to play
        CStdString strFileName=URIUtils::GetFileName(strFile);
        int iStart=strFileName.ReverseFind('-')+1;
        m_iTrack = atoi(strFileName.substr(iStart, strFileName.size()-iStart-10).c_str());
        //  The directory we are in, is the file
        //  that contains the bitstream to play,
        //  so extract it
        CStdString strPath=strFile;
        URIUtils::GetDirectory(strPath, strFileToLoad);
        URIUtils::RemoveSlashAtEnd(strFileToLoad); // we want the filename
    }

    m_nsf = m_dll.LoadNSF(strFileToLoad.c_str());
    if (!m_nsf)
    {
        CLog::Log(LOGERROR,"NSFCodec: error opening file %s!",strFile.c_str());
        return false;
    }
    m_Channels = 1;
    m_SampleRate = 48000;
    m_BitsPerSample = 16;
    m_DataFormat = AE_FMT_S16NE;
    m_TotalTime = 4*60*1000; // fixme?
    m_iDataPos = 0;

    return true;
}
开发者ID:nikkpap,项目名称:SPMC,代码行数:41,代码来源:NSFCodec.cpp

示例14: IsDVD

bool URIUtils::IsDVD(const CStdString& strFile)
{
  CStdString strFileLow = strFile;
  strFileLow.MakeLower();
  if (strFileLow.Find("video_ts.ifo") != -1 && IsOnDVD(strFile))
    return true;

#if defined(TARGET_WINDOWS)
  if (StringUtils::StartsWithNoCase(strFile, "dvd://"))
    return true;

  if(strFile.Mid(1) != ":\\"
  && strFile.Mid(1) != ":")
    return false;

  if(GetDriveType(strFile.c_str()) == DRIVE_CDROM)
    return true;
#else
  if (strFileLow == "iso9660://" || strFileLow == "udf://" || strFileLow == "dvd://1" )
    return true;
#endif

  return false;
}
开发者ID:alltech,项目名称:xbmc,代码行数:24,代码来源:URIUtils.cpp

示例15: Create

CPlayList* CPlayListFactory::Create(const CFileItem& item)
{
  if(item.IsLastFM()) //lastfm is always a stream, and just silly to check content
    return NULL;

  if( item.IsInternetStream() )
  {
    CStdString strContentType = item.GetContentType();
    strContentType.MakeLower();

    if (strContentType == "video/x-ms-asf"
    || strContentType == "video/x-ms-asx"
    || strContentType == "video/x-ms-wmv"
    || strContentType == "video/x-ms-wma"
    || strContentType == "video/x-ms-wfs"
    || strContentType == "video/x-ms-wvx"
    || strContentType == "video/x-ms-wax"
      )
      return new CPlayListASX();

    if (strContentType == "audio/x-pn-realaudio")
      return new CPlayListRAM();

    if (strContentType == "audio/x-scpls"
    || strContentType == "playlist")
      return new CPlayListPLS();

    if (strContentType == "audio/x-mpegurl"
    || strContentType == "application/vnd.apple.mpegurl")
      return new CPlayListM3U();

    if (strContentType == "application/vnd.ms-wpl")
      return new CPlayListWPL();
  }

  CStdString extension = CUtil::GetExtension(item.m_strPath);
  extension.MakeLower();

  if (extension == ".m3u" || extension == ".m3u8" || extension == ".strm")
    return new CPlayListM3U();

  if (extension == ".pls")
    return new CPlayListPLS();

  if (extension == ".b4s")
    return new CPlayListB4S();

  if (extension == ".wpl")
    return new CPlayListWPL();

  if (extension == ".asx")
    return new CPlayListASX();

  if (extension == ".ram")
    return new CPlayListRAM();

  if (extension == ".url")
    return new CPlayListURL();

  if (extension == ".pxml")
    return new CPlayListXML();

  return NULL;

}
开发者ID:Kr0nZ,项目名称:boxee,代码行数:65,代码来源:PlayListFactory.cpp


注:本文中的CStdString::MakeLower方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。