• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
CharacterAtIndex method?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CharacterAtIndex method?


  • Subject: CharacterAtIndex method?
  • From: "Richard S. French" <email@hidden>
  • Date: Mon, 22 Dec 2008 14:22:35 -0500
  • Thread-topic: CharacterAtIndex method?

I am receiving a compiler warning: ³NSString may not respond to
­characterAtIndex² from the following code.
This is from MathPaper ­ Chapter 12 of Building Cocoa Apps. Any help is
appreciated.
Thanks.

- (void)appendString:(NSString *)string
{
    int i;

    for (i=0;i<[string length];i++) {
        unichar c = [string characterAtindex:i];

        switch(c) {
            case '\n':
            case  '{':
            case  '}':
            case '\\':
                [self appendChar:'\\'];
                break;
            default:
                break;
        }
        [self appendChar:c];
    }
}

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: CharacterAtIndex method?
      • From: Kevin Gessner <email@hidden>
  • Prev by Date: Re: NSCalendar/NSDate - generating all months/days in a year
  • Next by Date: Re: NSCalendar/NSDate - generating all months/days in a year
  • Previous by thread: Re: NSStream APIs
  • Next by thread: Re: CharacterAtIndex method?
  • Index(es):
    • Date
    • Thread