Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
killunix
Beginner


Joined: 18 Nov 2007
Posts: 28

PostPosted: Sun Jan 13, 2008 4:15 pm   

how can i remove "," from "123,456" ?
 
how can i remove "," from the number "123,456"
i need the number become 123456 for computing
thanks
Reply with quote
Rorso
Wizard


Joined: 14 Oct 2000
Posts: 1368

PostPosted: Sun Jan 13, 2008 4:26 pm   
 
Something like %replace("123,456", ",", "") should work. See %replace.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Jan 13, 2008 6:16 pm   
 
If you are getting the number from a trigger, try switching the %d to a %n. The %n will match comma-delimited numbers and will automatically remove the comma for you.
_________________
EDIT: I didn't like my old signature
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Mon Jan 14, 2008 12:11 am   
 
You could also use %subchar("123,456",","), but Matt's way is best.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net