Exemplo n.º 1
0
// cUserVars
cUserVar* cUserVars::GetFromName(const string& varName, bool log)
{
    string VarName = Strip(varName);
    std::transform(VarName.begin(), VarName.end(), VarName.begin(), tolower);

    std::map<string, cInternalVar*>::iterator ivar = internalVars.find(VarName);
    if (ivar != internalVars.end())
        return ivar->second;

    std::set<cUserVar*>::iterator uvar;
    for (uvar = userVars.begin(); uvar != userVars.end(); ++uvar)
        if (EqualsNoCase((*uvar)->Name(), VarName))
            return (*uvar);

    std::map<string, cExtEPGVar*>::iterator evar = extEPGVars.find(VarName);
    if (evar != extEPGVars.end())
        return evar->second;

    if (log)
        LogFile.eSysLog("var '%s' not defined!", VarName.c_str());
    return NULL;
}
Exemplo n.º 2
0
void cPluginEpgsearch::CheckUTF8()
{
  std::string CodeSet = GetCodeset();
  isUTF8 = EqualsNoCase(CodeSet, "UTF-8");
}
Exemplo n.º 3
0
bool StringUtils::EqualsNoCase(const std::string &str1, const char *s2)
{
  return EqualsNoCase(str1.c_str(), s2);
}