Re: NSString and control character
Re: NSString and control character
- Subject: Re: NSString and control character
- From: Ondra Cada <email@hidden>
- Date: Fri, 27 Sep 2002 01:14:02 +0200
On Thursday, September 26, 2002, at 04:54 , Seungoh Ryu wrote:
Does anyone know how to force control characters into an NSString without
complicated substitution?
Just like in plain C: all the standard escapes work.
To be specific, I have a NSTextField in which user writes some TeX
commands, such as :
\documentstyle[12pt]
\pagestyle{empty}
etc....
Now, when I load them into an NSString, all the '\' characters cause
trouble as
most of them are interpreted as control characters, especially \p .
Like, \\ for a backslash.
How can I turn the long TeX file into an NSString with all the \ commands
in tact
without a major hassle ?
Nevertheless, I think in this case what you really want is to place the
text into a file, to put the file into the app's resources, and to read it
in using -stringWithContentsOfFile:.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.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.