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 7859921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T22:04:49+00:00 2026-06-02T22:04:49+00:00

I am looking for the quickest and simplest way to determine whether or not

  • 0

I am looking for the quickest and simplest way to determine whether or not a one word substring occurs in a given right-to-left string.

If it’s worth noting, I am going to be implementing the algorithm using Objective C and in an iPhone app. I have also searched for this algorithm, and found algorithms such as KMP, or BM, which as I figured, were ment to be used for more-than-one-word substring. If my assumption is wrong, please let me know!

Thanks ahead,
iLyrical.

  • 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-02T22:04:51+00:00Added an answer on June 2, 2026 at 10:04 pm

    How about:

    if([string rangeOfString:@" foo "].location != NSNotFound)
        //I found it, yippee!!
    

    edit Though I’ve never tried it on a right to left string….And I realize this will not match the first or last word…so after this you will have to check those too :-S

    another edit You could also use regular expressions. The NSRegularExpression class will allow you to do this. The one you want it \s*foo\s*

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

Sidebar

Related Questions

I am looking for the quickest and easiest way to combine two silverlight projects.
I asked on SO a few days ago what was the simplest quickest way
Looking for the quickest way to calculate a point that lies on a line
I'm looking for the quickest way to return a set of accounts that have
Given a timestamp and a directory path, what would be the quickest way to
What is the quickest way to read a text file into a string variable?
Looking back at my past projects I often encounter this one: A client or
I am looking to search for and replace a known string from within another
What's the quickest and easiest way to convert my json, containing the data of
Looking for a general case solution to determine if any jquery dialog (there are

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.