本文整理汇总了C++中String::EqualsIgnoreCase方法的典型用法代码示例。如果您正苦于以下问题:C++ String::EqualsIgnoreCase方法的具体用法?C++ String::EqualsIgnoreCase怎么用?C++ String::EqualsIgnoreCase使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类String
的用法示例。
在下文中一共展示了String::EqualsIgnoreCase方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: IsComposedIconComponent
Boolean IconPackHelper::IsComposedIconComponent(
/* [in] */ const String& tag)
{
return tag.EqualsIgnoreCase(ICON_MASK_TAG) ||
tag.EqualsIgnoreCase(ICON_BACK_TAG) ||
tag.EqualsIgnoreCase(ICON_UPON_TAG);
}
示例2: ParseScheme
ECode CHttpAuthHeader::ParseScheme(
/* [in] */ const String& header,
/* [out] */ String* scheme)
{
if (header != NULL) {
Int32 i = header.IndexOf(' ');
if (i >= 0) {
String localScheme = header.Substring(0, i).Trim();
if (localScheme.EqualsIgnoreCase(DIGEST_TOKEN)) {
mScheme = DIGEST;
// md5 is the default algorithm!!!
mAlgorithm = String("md5");
} else {
if (localScheme.EqualsIgnoreCase(BASIC_TOKEN)) {
mScheme = BASIC;
}
}
*scheme = header.Substring(i + 1);
}
}
*scheme = String(NULL);
return NOERROR;
}
示例3: ParseParameter
ECode CHttpAuthHeader::ParseParameter(
/* [in] */ const String& token,
/* [in] */ const String& value)
{
if (token != NULL && value != NULL) {
if (token.EqualsIgnoreCase(NONCE_TOKEN)) {
mNonce = value;
return NOERROR;
}
if (token.EqualsIgnoreCase(STALE_TOKEN)) {
ParseStale(value);
return NOERROR;
}
if (token.EqualsIgnoreCase(OPAQUE_TOKEN)) {
mOpaque = value;
return NOERROR;
}
if (token.EqualsIgnoreCase(QOP_TOKEN)) {
mQop = value.ToLowerCase();
return NOERROR;
}
if (token.EqualsIgnoreCase(ALGORITHM_TOKEN)) {
mAlgorithm = value.ToLowerCase();
return NOERROR;
}
}
return NOERROR;
}
示例4: FindColByName
ECode CJDBCResultSetMetaData::FindColByName(
/* [in] */ const String& columnName,
/* [out] */ Int32 * value)
{
String c = String(NULL);
if (r != NULL && ((CJDBCResultSet *)r.Get())->tr != NULL) {
for (Int32 i = 0; i < ((CJDBCResultSet *)r.Get())->tr->mNcolumns; i++) {
c = (*((CJDBCResultSet *)r.Get())->tr->mColumn)[i];
if (c != NULL) {
if (c.EqualsIgnoreCase(columnName) == 0) {
*value = i + 1;
} else {
Int32 k = c.IndexOf('.');
if (k > 0) {
c = c.Substring(k + 1);
if (c.EqualsIgnoreCase(columnName) == 0) {
*value = i + 1;
}
}
}
}
}
} else {
return E_SQL_EXCEPTION;
}
return NOERROR;
}
示例5: IsLocalHost
Boolean CMediaHTTPConnection::IsLocalHost(
/* [in] */ IURL* url)
{
if (url == NULL) {
return FALSE;
}
String host;
url->GetHost(&host);
if (host == NULL) {
return FALSE;
}
// try {
if (host.EqualsIgnoreCase("localhost")) {
return TRUE;
}
AutoPtr<IInetAddress> addr;
NetworkUtils::NumericToInetAddress(host, (IInetAddress**)&addr);
Boolean b;
if ((addr->IsLoopbackAddress(&b), b)) {
return TRUE;
}
// } catch (IllegalArgumentException iex) {
// }
return FALSE;
}
示例6: GetParameterByName
ECode BasicHeaderElement::GetParameterByName(
/* [in] */ const String& name,
/* [out] */ INameValuePair** parameter)
{
VALIDATE_NOT_NULL(parameter)
*parameter = NULL;
if (name.IsNull()) {
Logger::E("BasicHeaderElement", "Name may not be null");
return E_ILLEGAL_ARGUMENT_EXCEPTION;
}
AutoPtr<INameValuePair> found;
Int32 len;
mParameters->GetLength(&len);
for (Int32 i = 0; i < len; i++) {
AutoPtr<IInterface> value;
mParameters->Get(i, (IInterface**)&value);
AutoPtr<INameValuePair> current = INameValuePair::Probe(value);
String n;
current->GetName(&n);
if (n.EqualsIgnoreCase(name)) {
found = current;
break;
}
}
*parameter = found;
REFCOUNT_ADD(*parameter)
return NOERROR;
}
示例7: NotificationGroupExistsByName
ECode ProfileManagerService::NotificationGroupExistsByName(
/* [in] */ const String& notificationGroupName,
/* [out] */ Boolean* result)
{
VALIDATE_NOT_NULL(result);
AutoPtr<ICollection> values;
mGroups->GetValues((ICollection**)&values);
AutoPtr<IIterator> it;
values->GetIterator((IIterator**)&it);
Boolean bHasNxt = FALSE;
while ((it->HasNext(&bHasNxt), bHasNxt)) {
AutoPtr<IInterface> p;
it->GetNext((IInterface**)&p);
AutoPtr<INotificationGroup> group = INotificationGroup::Probe(p);
String name;
group->GetName(&name);
if (name.EqualsIgnoreCase(notificationGroupName)) {
*result = TRUE;
return NOERROR;
}
it = IIterator::Probe(p);
}
*result = FALSE;
return NOERROR;
}
示例8: ProfileExistsByName
ECode ProfileManagerService::ProfileExistsByName(
/* [in] */ const String& profileName,
/* [out] */ Boolean* result)
{
VALIDATE_NOT_NULL(result);
AutoPtr<ISet> entrySet;
mProfileNames->GetEntrySet((ISet**)&entrySet);
AutoPtr<IIterator> it;
entrySet->GetIterator((IIterator**)&it);
Boolean bHasNxt = FALSE;
while ((it->HasNext(&bHasNxt), bHasNxt)) {
AutoPtr<IInterface> p;
it->GetNext((IInterface**)&p);
AutoPtr<IMapEntry> entry = IMapEntry::Probe(p);
AutoPtr<IInterface> k;
entry->GetKey((IInterface**)&k);
AutoPtr<ICharSequence> cs = ICharSequence::Probe(k);
String str;
cs->ToString(&str);
if (str.EqualsIgnoreCase(profileName)) {
*result = TRUE;
return NOERROR;
}
}
*result = FALSE;
return NOERROR;
}
示例9: ParseComposedIconComponent
Boolean IconPackHelper::ParseComposedIconComponent(
/* [in] */ IXmlPullParser* parser,
/* [in] */ IMap* iconPackResources)
{
String icon;
String tag;
parser->GetName(&tag);
if (!IsComposedIconComponent(tag)) {
return FALSE;
}
Int32 count;
if (parser->GetAttributeCount(&count), count >= 1) {
if (tag.EqualsIgnoreCase(ICON_BACK_TAG)) {
parser->GetAttributeCount(&mIconBackCount);
for (Int32 i = 0; i < mIconBackCount; i++) {
tag = "";
tag.AppendFormat(ICON_BACK_FORMAT.string(), i);
parser->GetAttributeValue(i, &icon);
AutoPtr<IComponentName> component;
CComponentName::New(tag, String(""), (IComponentName**)&component);
iconPackResources->Put(component, CoreUtils::Convert(icon));
}
}
else {
parser->GetAttributeValue(0, &icon);
AutoPtr<IComponentName> component;
CComponentName::New(tag, String(""), (IComponentName**)&component);
iconPackResources->Put(component, CoreUtils::Convert(icon));
}
return TRUE;
}
return FALSE;
}
示例10: GetBooleanArgument
Boolean CInstrumentationTestRunner::GetBooleanArgument(
/* [in] */ IBundle* arguments,
/* [in] */ const String& tag)
{
String tagString;
arguments->GetString(tag, &tagString);
return !tagString.IsNull() && tagString.EqualsIgnoreCase("TRUE");
}
示例11: ParseStale
ECode CHttpAuthHeader::ParseStale(
/* [in] */ const String& value)
{
if (value != NULL) {
if (value.EqualsIgnoreCase("true")) {
mStale = true;
}
}
return NOERROR;
}
示例12: CheckAttribute
Boolean Provider::CheckAttribute(
/* [in] */ const String& servAlg,
/* [in] */ const String& attribute,
/* [in] */ const String& val)
{
String attributeValue = GetPropertyIgnoreCase(servAlg + String(" ") + attribute);
if (!attributeValue.IsNull()) {
if (attribute.EqualsIgnoreCase("KeySize")) {
if (StringUtils::ParseInt32(attributeValue) >= StringUtils::ParseInt32(val)) {
return TRUE;
}
}
else { // other attributes
if (attributeValue.EqualsIgnoreCase(val)) {
return TRUE;
}
}
}
return FALSE;
}
示例13: GetService
ECode Provider::GetService(
/* [in] */ const String& type,
/* [in] */ const String& algorithm,
/* [out] */ IProviderService** service)
{
VALIDATE_NOT_NULL(service);
*service = NULL;
AutoLock lock(this);
if (type.IsNull()) {
Logger::E("Provider", "type == null");
return E_NULL_POINTER_EXCEPTION;
}
else if (algorithm.IsNull()) {
Logger::E("Provider", "algorithm == null");
return E_NULL_POINTER_EXCEPTION;
}
if (type.Equals(mLastServiceName) && algorithm.EqualsIgnoreCase(mLastAlgorithm)) {
*service = mReturnedService;
return NOERROR;
}
String key = Key(type, algorithm);
AutoPtr<ICharSequence> keyObj;
CString::New(key, (ICharSequence**)&keyObj);
AutoPtr<IInterface> o;
if (mServiceTable != NULL) {
mServiceTable->Get(keyObj, (IInterface**)&o);
}
if (o == NULL && mAliasTable != NULL) {
mAliasTable->Get(keyObj, (IInterface**)&o);
}
if (o == NULL) {
UpdatePropertyServiceTable();
}
if (o == NULL && mPropertyServiceTable != NULL) {
mPropertyServiceTable->Get(keyObj, (IInterface**)&o);
}
if (o == NULL && mPropertyAliasTable != NULL) {
mPropertyAliasTable->Get(keyObj, (IInterface**)&o);
}
if (o != NULL) {
mLastServiceName = type;
mLastAlgorithm = algorithm;
mReturnedService = IProviderService::Probe(o);
*service = mReturnedService;
REFCOUNT_ADD(*service);
return NOERROR;
}
*service = NULL;
return NOERROR;
}
示例14: FindEncodingByName
Xml::Encoding Xml::FindEncodingByName(
/* [in] */ const String& encodingName)
{
if (encodingName.IsNull()) {
return Encoding::UTF_8;
}
if (encodingName.EqualsIgnoreCase(Encoding::US_ASCII.mExpatName)) {
return Encoding::US_ASCII;
}
else if (encodingName.EqualsIgnoreCase(Encoding::UTF_8.mExpatName)) {
return Encoding::UTF_8;
}
else if (encodingName.EqualsIgnoreCase(Encoding::UTF_16.mExpatName)) {
return Encoding::UTF_16;
}
else if (encodingName.EqualsIgnoreCase(Encoding::ISO_8859_1.mExpatName)) {
return Encoding::ISO_8859_1;
}
assert(0 && "UnsupportedEncodingException");
return Encoding::UTF_8;
}
示例15: CanResponseHaveBody
Boolean Request::CanResponseHaveBody(
/* [in] */ IHttpRequest* request,
/* [in] */ Int32 status)
{
AutoPtr<IRequestLine> line;
request->GetRequestLine((IRequestLine**)&line);
String str;
line->GetMethod(&str);
if (str.EqualsIgnoreCase("HEAD")) {
return FALSE;
}
return status >= IHttpStatus::SC_OK
&& status != IHttpStatus::SC_NO_CONTENT
&& status != IHttpStatus::SC_NOT_MODIFIED;
}