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

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -