Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8976053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:01:55+00:00 2026-06-15T19:01:55+00:00

I am making a substring comparison and i did it like this if ([mystring

  • 0

I am making a substring comparison and i did it like this

 if ([mystring rangeOfString:string options:NSCaseInsensitiveSearch].location == NSNotFound) {
        return NO;
    } else {
        return YES;
    }

But this doesn’t work while comparing with Read and READ

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T19:01:57+00:00Added an answer on June 15, 2026 at 7:01 pm

    Sorry, but your code works for me… If I execute this in XCode:

    if ([@"Read" rangeOfString:@"READ" options:NSCaseInsensitiveSearch].location == NSNotFound) {
        NSLog(@"NO!!");
    } else {
        NSLog(@"YES!!");
    }
    

    I get this output:

    YES!!
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Making my first steps in RIA Services (VS2010Beta2) and i encountered this problem: created
I need to read a line like this from a file: 5 Chair 12.49
I am making an app in which i am stuck in this exception -
I'm trying to maniplulate a string without making a big issue out of it
I'd like to give a user the option of making SQL queries. I placed
I'm making one MySql script that break one string field in multiple words. I
I am making an Android application and I want to encrypt a String before
I am working on an application for Android. For this I am making an
I'm making a program that turns a large number into a string, and then
What I want to do is take a string such as "this.those.that" and get

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.