• 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 & NSMutableData
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSString & NSMutableData


  • Subject: Re: NSString & NSMutableData
  • From: Phil Larson <email@hidden>
  • Date: Mon, 21 Apr 2003 09:12:03 -0700

It's in the docs:

<http://developer.apple.com/techpubs/macosx/Cocoa/Reference/Foundation/ObjC_classic/Classes/NSString.html>

- (id)initWithData:(NSData *)data encoding:(NSStringEncoding)encoding

also, you can get to a NSMutableData by doing [NSMutableData dataWithData:[myString dataUsingEncoding:NSISOLatin1StringEncoding]];

Or any other encoding you want of course.

Phil

On Monday, April 21, 2003, at 08:55AM, Peter Karlsson <email@hidden> wrote:

>Dear list!
>
>I can put a NSString into a NSMutableData object with this code:
>
>NSMutableData *data;
>NSString *myString = @"Some text";
>data = [NSMutableData dataWithBytes:[myString cString] length:[myString
>length]];
>
>But how do I get the NSMutableData back to the NSString object?
>
>Peter
>
>
>_________________________________________________________________
>Add photos to your e-mail with MSN 8. Get 2 months FREE*.
>http://join.msn.com/?page=features/featuredemail
>_______________________________________________
>cocoa-dev mailing list | email@hidden
>Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: NSString & NSMutableData
  • Next by Date: Re: Saving an alias(AliasHandle/AliasRecord) with NSUserDefaults.
  • Previous by thread: NSString & NSMutableData
  • Next by thread: ANN: GNUMail.app and Pantomime 1.1.0pre2
  • Index(es):
    • Date
    • Thread