Re: unichar question
Re: unichar question
- Subject: Re: unichar question
- From: Ondra Cada <email@hidden>
- Date: Tue, 2 Apr 2002 13:51:51 +0200
On Tuesday, April 2, 2002, at 07:11 , Isaac Sherman wrote:
How would I go about converting a unichar to a char?
You can't without losing information, that's obvious.
If you wanna lose information (which should be always considered from the
other languages' POV!!!!) then the way is
const char *cp=[[aString dataUsingEncoding:NSASCIIEncoding
allowLossyConversion:YES] bytes];
I want to cypher text,
for instance, change ABC to XRQ, and I'm not finding a good way to do it
with NSString.
What's wrong with characterAtIndex: and computing unichars directly?
I don't think NSScanner will help, but maybe I misread it?
I guess the latter. At least, I don't know how NSScanner would help with
char-by-char work.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
2K Development: email@hidden
http://www.2kdevelopment.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
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.