|
Oracle Apprentice
Joined: 29 May 2002 Posts: 121
|
Posted: Tue Sep 17, 2002 8:00 am
Removing Commas |
I have been looking for a way to remove commas but have come up with no ideas. I have considered the substiture commands but to no avail, it isn't working.
Any string functions available in Zmud to parse through a variable?
Thanks... |
|
|
|
Oracle Apprentice
Joined: 29 May 2002 Posts: 121
|
Posted: Tue Sep 17, 2002 8:12 am |
Nevermind, I found the %replace function.
|
|
|
|
Charbal GURU
Joined: 15 Jun 2001 Posts: 654 Location: USA
|
Posted: Tue Sep 17, 2002 8:13 am |
#SAY %replace("This, is, a,,, test", ",", %null)
yields
This is a test
The main thing to watch out for here is that you delineate the string arguments with quotation marks.
If you are wanting to remove the commas in something matched as %1 in a trigger, something like %replace(%1, ",", %null) will not work properly since it will parse the string above as %replace(This, is, a, , , test, ",", %null), passing 8 arguments to %replace instead of the 3 it expects.
Instead, you can use %replace("%1", ",", %null) to tell zMUD to pass %1 as the first argument only.
Edit: starting posting this before you replied to yourself but you were too fast for me.
- Charbal |
|
|
|
|
|
|
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
|
|