• 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
Re: NSString not working
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSString not working


  • Subject: Re: NSString not working
  • From: Alexander von Below <email@hidden>
  • Date: Mon, 20 Apr 2009 10:14:48 +0200

My guess:

"If cString is not a NULL-terminated C string, or encoding does not match the actual encoding, the results are undefined."
http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/Classes/NSString_Class/Reference/NSString.html#/ /apple_ref/doc/uid/20000154-BAJCCGHJ


Also please note that this is not an Xcode, but a Cocoa question. You may find better answers on the Cocoa list

Alex

Am 20.04.2009 um 00:42 schrieb Susan Granger:

Hi,

I am unable to use NSString in my project.
But if i try it in other new project it works fine.
can any one help with this ?

char* tmp = "Blah";

NSString* str = [NSString stringWithCString:(const char*)tmp encoding:NSISOLatin1StringEncoding ];


After this, I get str = nil.

Thanks & Regards

Susan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: NSString not working
      • From: Jeremy Pereira <email@hidden>
References: 
 >NSString not working (From: Susan Granger <email@hidden>)

  • Prev by Date: Re: Resources flattened out into a single directory in the .app package
  • Next by Date: Re: Resources flattened out into a single directory in the .app package
  • Previous by thread: NSString not working
  • Next by thread: Re: NSString not working
  • Index(es):
    • Date
    • Thread