Just a newbie question. Still trying to get a handle on C++ syntax
I need to fill a string with the contents of a myURL. the file is 16,000 characters of ascii text.
1 ) Can I use?
+ (id)stringWithContentsOfURL
NSURL *)url encoding
NSStringEncoding)enc error
NSError **)error
2) Do I need to import NNString into the header file of the implementation file in which I use this?
3) Can I simply declare the sting variable into which to place the contents of the url like this?
chr textIAmUsing(16000);
4) Would the statement which fills textIAmUsing with the contents of the myURL be?
textIAmUsing = (id)stringWithContentsOfURL
NSURL *)url encoding
NSStringEncoding)enc error
NSError **)error
5) Can the text from above "(NSURL *)url" be replaced simply with http://www.pagefulloftext.txt ) ?
and can (NSStringEncoding)enc be replaced simply with 1 ? because 1 is the NSASCIIStringEncoding
Thanks for any answers.
Jerry
I need to fill a string with the contents of a myURL. the file is 16,000 characters of ascii text.
1 ) Can I use?
+ (id)stringWithContentsOfURL
2) Do I need to import NNString into the header file of the implementation file in which I use this?
3) Can I simply declare the sting variable into which to place the contents of the url like this?
chr textIAmUsing(16000);
4) Would the statement which fills textIAmUsing with the contents of the myURL be?
textIAmUsing = (id)stringWithContentsOfURL
5) Can the text from above "(NSURL *)url" be replaced simply with http://www.pagefulloftext.txt ) ?
and can (NSStringEncoding)enc be replaced simply with 1 ? because 1 is the NSASCIIStringEncoding
Thanks for any answers.
Jerry