filter - How to delete a part of a string on iOS? -
lets have nsstring stored in variable , want keep string till 10th character , delete rest. how can in objective-c ?
nsmutablestring *tmp = [nsmutablestring stringwithstring:@"012346578901234567890"]; [tmp replacecharactersinrange:nsmakerange(10, tmp.length-10) withstring:@""]; nslog(@"tmp : %@",tmp);
Comments
Post a Comment