views:

1407

answers:

1

i have a string like this A. rahul VyAs

and i want to remove A. and the Space After The A. so that new string would be rahul VyAs

how do i achieve this?

+14  A: 

You can use the NSString instance methods substringWithRange: or substringFromIndex:

NSString *str = @"A. rahul VyAs";
NSString *newStr = [str substringWithRange:NSMakeRange(3, [str length]-3)];

or

NSString *str = @"A. rahul VyAs";
NSString *newStr = [str substringFromIndex:3];
Perspx
I answered almost character for character on the substringFromIndex: part, so deleted and upvoted your answer as it is more complete
Xetius
Thanks .
Perspx