• 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
String with bytes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

String with bytes


  • Subject: String with bytes
  • From: Aalok <email@hidden>
  • Date: Thu, 29 Jun 2006 15:11:27 +0530

Hi,

I want to create NSString with lenght 36 and the content should be 0x00.
I put 36 0's in the string like @"00000...."  but it gives me
0x48(ascii value of 0)

I have tried something like... but doesnt work.(it give an error
saying incompatible pointer type.)

char zeroArray[36];
	int i;
	for(i=0;i<36;i++)
	{
		zeroArray[i]=0x00;
	}

	const char x[36];

	NSString* checkSum=[[NSString alloc] initWithCharacters:zeroArray length:36];

Please suggest something.

regards,
aalok
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: String with bytes
      • From: Chris Suter <email@hidden>
  • Prev by Date: Re: Vertically-expanding NSTextField
  • Next by Date: Re: Implementing a TCP port listener in Cocoa
  • Previous by thread: Re: running code on quitting of a Foundation tool
  • Next by thread: Re: String with bytes
  • Index(es):
    • Date
    • Thread