Is stringByTrimmingCharactersInSet: an autoreleased string?
- by David.Chu.ca
I can use the following codes to trim a string:
-(void) aMethod {
// myStr from a text box
NSString *trimedStr = [mystr stringByTrimmingCharactersInSet:
[NSCharacterSet whitespaceAndNewlineCharacterSet]];
...
// should I release trimedStr?
}
Not sure if the result trimedStr is an autorelease string? How can I find out that?