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

  • SEARCH
  • Home
  • 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 8509837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:32:33+00:00 2026-06-11T03:32:33+00:00

I am sorting An Array of Strings using a comparator block. The comparison logic

  • 0

I am sorting An Array of Strings using a comparator block.
The comparison logic of two strings should leave aside case,punctuation marks like apostrophes ,commas and full stops and also white space characters.

UPDATE:

Strip Non-Alphanumeric Characters from an NSString

Just saw this SO post, used this to do a case-Insensitive comparison of strings after removing non alphanumeric characters.

  • 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-11T03:32:34+00:00Added an answer on June 11, 2026 at 3:32 am

    You’ll have to make a temporary string that has the characters that you don’t like to participate in the comparison removed.

    If you have a lot of strings you might want to cache these temporary strings (like in a dictionary with the real string as key and the temp string as data), or implement your own comparision function so you don’t have to repeatedly create and discard those temporary strings.

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

Sidebar

Related Questions

I am sorting and sectioning a tableview using the first letter of an array
I am trying to sort an array of strings, but it's not sorting anything....
A class project involves sorting an array of strings, with each string containing an
I'm using NSXMLParser to fetch a feed, and am sorting the resulting array according
When soritng an array made of a mix of strings, null values and zeros,
I found out how to sort a JSON array at http://www.devcurry.com/2010/05/sorting-json-array.html Now I want
In AS3, Array.sort() took some nice sorting options like: Array.DESCENDING - sorts the array
I using jquery sorting ( http://jqueryui.com/demos/sortable/ ). Is it possible to sort (move list)
I have an Array of Strings that are in order A-Z. I was wondering
I am trying to find an efficient way to sort an array of strings

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.