When I load the audio name, some include char "[","]" How to convert such string include "[","]" to OBJ-C compatible string?
Welcome any comment Ken
An Objective-C string is defined with an @ and quotes.
@"[" works fine for me ... Maybe you could clarify your question a bit?
To create a static
NSString, do this:
NSString *stringA = @"a string with some square brackets [ ] ";
If you have a C string, you can create an
NSString using the following methods (depending on whether your string is encoded in ASCII or UTF8:
NSString *stringB = [NSString stringWithUTF8String:utf8String];
NSString *stringC = [NSString stringWithCString:asciiString encoding: NSASCIIStringEncoding];