| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
How do I get a backslash in an NSString?
I have tried the following:
string = [NSString stringWithCString: "\include" length:8]; // give compiler warning
NSLog(string);
string = [NSString stringWithCString: "\\include" length:8];
NSLog(string);
string = [NSString stringWithCString: "\binclude" length:8];
NSLog(string);
cstring = "\\include";
printf("%s\n",cstring);
with the results:
2001-12-30 20:41:38.144 CircleView[403] include\\000
2001-12-30 20:41:38.145 CircleView[403] \\\\include
2001-12-30 20:41:38.145 CircleView[403] \\010include
\include
| References: | |
| >want backslash in NSString (From: Christopher Anand <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.