本文整理汇总了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;
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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;
}