Re: generating escaped representation of string
Re: generating escaped representation of string
- Subject: Re: generating escaped representation of string
- From: Tom Sutcliffe <email@hidden>
- Date: Fri, 15 Aug 2003 23:23:58 +0100
Convert the string from/to NSNonLossyASCIIStringEncoding. This
everything except possibly escaped newlines (can't remember exactly).
Regards,
Tom
On Friday, August 15, 2003, at 04:25 am, matt neuburg wrote:
On Tue, 12 Aug 2003 20:25:50 -0700, matt neuburg <email@hidden>
said:
I wish to convert an NSString to a representation where
escape characters are used, as they would look if you were
inputting the corresponding literal. For example I want a
return character to appear as \r and an ASCII 1 character
to appear as \x01. Then I want this string to be editable
and convert back the result to a normal NSString, so that
if the user enters \r it becomes a return character. Is
there some utility function that will do this for me?
How come no one is saying "yes"? How does NSLog generate its string
representation? For that matter, how does sprintf do it in the
Terminal? There must be a utility function somewhere. m.
--------
matt neuburg, phd = email@hidden, http://www.tidbits.com/matt
pantes anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/
_______________________________________________
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.