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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:08:48+00:00 2026-05-20T00:08:48+00:00

I would assume there would be a convenience class somewhere where I could call

  • 0

I would assume there would be a convenience class somewhere where I could call say

NSArray *alphabet = [SomeClass lowerCaseAlphabet];

instead of having to write it out every time. Is there such a class?

  • 1 1 Answer
  • 1 View
  • 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-05-20T00:08:49+00:00Added an answer on May 20, 2026 at 12:08 am

    Yes, a quick search in the docs even throws up some code using NSMutableCharacterSet:

    addCharactersInRange:
    Adds to the receiver the characters whose Unicode values are in a given range.

    - (void)addCharactersInRange:(NSRange)aRange
    

    Parameters:

    aRange:
    The range of characters to add.
    aRange.location is the value of the first character to add; aRange.location + aRange.length– 1 is the value of the last. If aRange.length is 0, this method has no effect.

    Discussion

    This code excerpt adds to a character set the lowercase English alphabetic characters:

    NSMutableCharacterSet *aCharacterSet = [[NSMutableCharacterSet alloc] init];
    NSRange lcEnglishRange;
    
    lcEnglishRange.location = (unsigned int)'a';
    lcEnglishRange.length = 26;
    [aCharacterSet addCharactersInRange:lcEnglishRange];
    //....
    [aCharacterSet release];
    

    Availability:

    Available in iOS 2.0 and later.

    /////////

    Personal opinion: If you get stuck for a while on these things it’s often just quicker to create something for yourself. In this case there’s probably not much to lose by making an instance of NSArray with objects @”a”, …, @”z”. An array of twenty-six or fifty-two characters is not very big.

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

Sidebar

Related Questions

Let's assume there's a class with a virtual property (let's call it 'P'). It's
Lets assume we have a class car. How would You name parameters of function
Assume I have this model : class Task(models.Model): title = models.CharField() Now I would
How would I make this jQuery shorter? I assume there must be a better
I would assume that there is an AJAX request on the client side that
I would assume there's a simple LINQ query to do this, I'm just not
Is there a simple way to do (what any normal person would assume) this
Simple question, would love a solution if there is one! I assume there has
I thought the following would be a pretty common task and assumed there would
I would assume that most User-defined Exceptions are for Business Logic level exceptions, but

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.