Is there any way to initialize NSString to NSMutableString? and also reverse order?
-(void)st:(NSString *)st
{
NSMutableString str = st; // gives warning..
You can set an NSMutableString to an NSString, but not the other way around
NSString *str = [NSMutableString alloc]init];
is okay, but
NSMutableString *str = [[NSString alloc]init];
is not. This is because an NSMutableString is a subclass of NSString, so it 'is a' NSString. You can however create a mutable string from an NSString with
NSMutableString *mStr = [str mutableCopy];