iphone - How to Substring a NSString in iOS? -
how can remove dollar($) symbols nsstring?
amountdataarray = [[nsmutablearray alloc] initwithobjects:@"$ 10", @"$ 20", @"$ 30", @"$ 40", @"$ 50", @"$ 60", nil];
i showing displaying string in uilabel
:
confirm.balancestr = self.amountlbl.text;
i setting amountlbl.text
confirm.balancestr
, don't want '$' in string.
i want show amount 20, 30 , 40 not dollar, $10, $20,
try this
amountlbl.text = [confirm.balancestr stringbyreplacingoccurrencesofstring:@"$ " withstring:@""];
Comments
Post a Comment