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


C++ PL_strcasecmp函数代码示例

本文整理汇总了C++中PL_strcasecmp函数的典型用法代码示例。如果您正苦于以下问题:C++ PL_strcasecmp函数的具体用法?C++ PL_strcasecmp怎么用?C++ PL_strcasecmp使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: StringCompare

static bool
StringCompare(PLDHashTable *table, const PLDHashEntryHdr *entry,
              const void *testKey)
{
    const void *entryKey =
            reinterpret_cast<const PLDHashEntryStub *>(entry)->key;

    return PL_strcasecmp(reinterpret_cast<const char *>(entryKey),
                         reinterpret_cast<const char *>(testKey)) == 0;
}
开发者ID:Jar-win,项目名称:Waterfox,代码行数:10,代码来源:nsHttp.cpp

示例2: enterAttr

static void enterAttr(const char *s1, const char *s2) {
  const char *p1, *p2 = nullptr;
  p1 = lookupProp_(s1);
  if (s2) {
    VObject *a;
    p2 = lookupProp_(s2);
    a = addProp(curProp, p1);
    setVObjectStringZValue(a, p2);
  } else
    addProp(curProp, p1);
  if (PL_strcasecmp(p1, VCBase64Prop) == 0 ||
      (s2 && PL_strcasecmp(p2, VCBase64Prop) == 0))
    lexPushMode(L_BASE64);
  else if (PL_strcasecmp(p1, VCQuotedPrintableProp) == 0 ||
           (s2 && PL_strcasecmp(p2, VCQuotedPrintableProp) == 0))
    lexPushMode(L_QUOTED_PRINTABLE);
  deleteString((char *)s1);
  deleteString((char *)s2);
}
开发者ID:mozilla,项目名称:releases-comm-central,代码行数:19,代码来源:nsVCard.cpp

示例3: parse_acct_disable

static int
parse_acct_disable(const char *theval)
{
    int retval = ACCT_DISABLE_INVALID;
    if (!theval || !*theval) {
        return retval;
    }
    if (!PL_strcasecmp(theval, IPA_WINSYNC_ACCT_DISABLE_NONE)) {
        retval = ACCT_DISABLE_NONE;
    } else if (!PL_strcasecmp(theval, IPA_WINSYNC_ACCT_DISABLE_TO_AD)) {
        retval = ACCT_DISABLE_TO_AD;
    } else if (!PL_strcasecmp(theval, IPA_WINSYNC_ACCT_DISABLE_TO_DS)) {
        retval = ACCT_DISABLE_TO_DS;
    } else if (!PL_strcasecmp(theval, IPA_WINSYNC_ACCT_DISABLE_BOTH)) {
        retval = ACCT_DISABLE_BOTH;
    }

    return retval;
}
开发者ID:cajunken,项目名称:freeipa,代码行数:19,代码来源:ipa-winsync-config.c

示例4: GetKeyMechFromString

CK_MECHANISM_TYPE
GetKeyMechFromString(const char *keyString)
{
    int i;
    for (i=0; i < keyArraySize; i++) {
	if (PL_strcasecmp(keyString,keyArray[i].label) == 0) {
	    return keyArray[i].mechType;
	}
    }
    return (CK_MECHANISM_TYPE)-1;
}
开发者ID:FunkyVerb,项目名称:devtools-window,代码行数:11,代码来源:symkeyutil.c

示例5: GetKeyTypeFromString

CK_KEY_TYPE
GetKeyTypeFromString(const char *keyString)
{
    int i;
    for (i=0; i < keyArraySize; i++) {
	if (PL_strcasecmp(keyString,keyArray[i].label) == 0) {
	    return keyArray[i].keyType;
	}
    }
    return (CK_KEY_TYPE)-1;
}
开发者ID:FunkyVerb,项目名称:devtools-window,代码行数:11,代码来源:symkeyutil.c

示例6: isAPropertyOf

VObject* isAPropertyOf(VObject *o, const char *id)
{
    VObjectIterator i;
    initPropIterator(&i,o);
    while (moreIteration(&i)) {
  VObject *each = nextVObject(&i);
  if (!PL_strcasecmp(id,each->id))
      return each;
  }
    return (VObject*)0;
}
开发者ID:binoc-software,项目名称:mozilla-cvs,代码行数:11,代码来源:nsVCardObj.cpp

示例7:

PRBool
nsPaperSizePS::Find(const char *aName)
{
    for (int i = mCount; i--; ) {
        if (!PL_strcasecmp(aName, mList[i].name)) {
            mCurrent = i;
            return PR_TRUE;
        }
    }
    return PR_FALSE;
}
开发者ID:Akin-Net,项目名称:mozilla-central,代码行数:11,代码来源:nsPaperPS.cpp

示例8: eFontPrefLang

eFontPrefLang
gfxPlatform::GetFontPrefLangFor(const char* aLang)
{
    if (!aLang || !aLang[0])
        return eFontPrefLang_Others;
    for (PRUint32 i = 0; i < PRUint32(eFontPrefLang_LangCount); ++i) {
        if (!PL_strcasecmp(gPrefLangNames[i], aLang))
            return eFontPrefLang(i);
    }
    return eFontPrefLang_Others;
}
开发者ID:lofter2011,项目名称:Icefox,代码行数:11,代码来源:gfxPlatform.cpp

示例9: NS_ASSERTION

// static 
xptiFileType::Type xptiFileType::GetType(const char* name)
{
    NS_ASSERTION(name, "loser!");
    int len = PL_strlen(name);
    for(const xptiFileTypeEntry* p = g_Entries; p->name; p++)
    {
        if(len > p->len && 0 == PL_strcasecmp(p->name, &(name[len - p->len])))
            return p->type;
    }
    return UNKNOWN;        
}        
开发者ID:LastRitter,项目名称:vbox-haiku,代码行数:12,代码来源:xptiMisc.cpp

示例10: while

// Ok, if we are here, and we have a aCharset passed in that is not
// UTF-8 or US-ASCII, then we should tag the mChannel member with this
// charset. This is because replying to messages with specified charset's
// need to be tagged as that charset by default.
//
NS_IMETHODIMP
nsMimeBaseEmitter::UpdateCharacterSet(const char *aCharset)
{
  if ( (aCharset) && (PL_strcasecmp(aCharset, "US-ASCII")) &&
        (PL_strcasecmp(aCharset, "ISO-8859-1")) &&
        (PL_strcasecmp(aCharset, "UTF-8")) )
  {
    nsAutoCString contentType;

    if (NS_SUCCEEDED(mChannel->GetContentType(contentType)) && !contentType.IsEmpty())
    {
      char *cBegin = contentType.BeginWriting();

      const char *cPtr = PL_strcasestr(cBegin, "charset=");

      if (cPtr)
      {
        char  *ptr = cBegin;
        while (*ptr)
        {
          if ( (*ptr == ' ') || (*ptr == ';') )
          {
            if ((ptr + 1) >= cPtr)
            {
              *ptr = '\0';
              break;
            }
          }

          ++ptr;
        }
      }

      // have to set content-type since it could have an embedded null byte
      mChannel->SetContentType(nsDependentCString(cBegin));
      mChannel->SetContentCharset(nsDependentCString(aCharset));
    }
  }

  return NS_OK;
}
开发者ID:aleth,项目名称:releases-comm-central,代码行数:46,代码来源:nsMimeBaseEmitter.cpp

示例11:

nsIMAPHostInfo *nsIMAPHostSessionList::FindHost(const char *serverKey)
{
  nsIMAPHostInfo *host;
  
  // ### should also check userName here, if NON NULL
  for (host = fHostInfoList; host; host = host->fNextHost)
  {
    if (!PL_strcasecmp(serverKey, host->fServerKey)) 
      return host;
  }
  return host;
}
开发者ID:rn10950,项目名称:RetroZilla,代码行数:12,代码来源:nsIMAPHostSessionList.cpp

示例12: lookupPropInfo

static struct PreDefProp* lookupPropInfo(const char* str)
{
    /* brute force for now, could use a hash table here. */
    int i;
  
    for (i = 0; propNames[i].name; i++) 
  if (PL_strcasecmp(str, propNames[i].name) == 0) {
      return &propNames[i];
      }
    
    return 0;
}
开发者ID:binoc-software,项目名称:mozilla-cvs,代码行数:12,代码来源:nsVCardObj.cpp

示例13: NS_PRECONDITION

NS_IMETHODIMP nsImportGenericMail::GetStatus(const char *statusKind, int32_t *_retval)
{
  NS_PRECONDITION(statusKind != nullptr, "null ptr");
  NS_PRECONDITION(_retval != nullptr, "null ptr");
  if (!statusKind || !_retval)
    return NS_ERROR_NULL_POINTER;

  *_retval = 0;

  if (!PL_strcasecmp(statusKind, "isInstalled")) {
    GetDefaultLocation();
    *_retval = (int32_t) m_found;
  }

  if (!PL_strcasecmp(statusKind, "canUserSetLocation")) {
    GetDefaultLocation();
    *_retval = (int32_t) m_userVerify;
  }

  return NS_OK;
}
开发者ID:Type-of-Tool,项目名称:ExMail,代码行数:21,代码来源:nsImportMail.cpp

示例14: lookupProp_

const char* lookupProp_(const char* str)
{
    int i;
  
    for (i = 0; propNames[i].name; i++)
  if (PL_strcasecmp(str, propNames[i].name) == 0) {
      const char* s;
      s = propNames[i].alias?propNames[i].alias:propNames[i].name;
      return lookupStr(s);
      }
    return lookupStr(str);
}
开发者ID:binoc-software,项目名称:mozilla-cvs,代码行数:12,代码来源:nsVCardObj.cpp

示例15: NS_PRECONDITION

NS_IMETHODIMP nsImportGenericAddressBooks::GetStatus(const char *statusKind, int32_t *_retval)
{
  NS_PRECONDITION(statusKind != nullptr, "null ptr");
  NS_PRECONDITION(_retval != nullptr, "null ptr");
  if (!statusKind || !_retval)
    return NS_ERROR_NULL_POINTER;

  *_retval = 0;

  if (!PL_strcasecmp(statusKind, "isInstalled")) {
    GetDefaultLocation();
    *_retval = (int32_t) m_found;
  }

  if (!PL_strcasecmp(statusKind, "canUserSetLocation")) {
    GetDefaultLocation();
    *_retval = (int32_t) m_userVerify;
  }

  if (!PL_strcasecmp(statusKind, "autoFind")) {
    GetDefaultLocation();
    *_retval = (int32_t) m_autoFind;
  }

  if (!PL_strcasecmp(statusKind, "supportsMultiple")) {
    bool      multi = false;
    if (m_pInterface)
      m_pInterface->GetSupportsMultiple(&multi);
    *_retval = (int32_t) multi;
  }

  if (!PL_strcasecmp(statusKind, "needsFieldMap")) {
    bool      needs = false;
    if (m_pInterface && m_pLocation)
      m_pInterface->GetNeedsFieldMap(m_pLocation, &needs);
    *_retval = (int32_t) needs;
  }

  return NS_OK;
}
开发者ID:mxOBS,项目名称:deb-pkg_icedove,代码行数:40,代码来源:nsImportAddressBooks.cpp


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