Monday, May 13, 2013

NSString fastestEncoding example ios


[NSString fastestEncoding]

Returns the fastest encoding to which the receiver may be converted without loss of information.
- (NSStringEncoding)fastestEncoding
Return Value of [NSString fastestEncoding]
The fastest encoding to which the receiver may be converted without loss of information.
Discussion of [NSString fastestEncoding]
“Fastest” applies to retrieval of characters from the string. This encoding may not be space efficient.
Example of [NSString fastestEncoding]
NSString * csv = ...;
NSError * error = nil;
NSArray * rows = [NSArray arrayWithContentsOfCSVString:csv encoding:[csv fastestEncoding] error:&error];