|
Churlant Novice
Joined: 17 Oct 2002 Posts: 44 Location: USA
|
Posted: Wed Dec 26, 2007 5:41 pm
Two small inquiries... |
Looking for a way (maybe a command?) to list all aliases in a class on-screen... I thought there might be a command, but I haven't been able to find it.
And another dumb question...
...if I wanted to substitute a 'z' for every 's' at the end of a word, how would the guru's suggest I go about it?
So that if I said "coins" on a channel for instance, the script would substitute "coinz" instead. |
|
_________________ >-Churlant-< |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Wed Dec 26, 2007 7:52 pm |
I'm going to hate myself for this.
text = %subregex(@text,"s\b","z") |
|
|
|
Churlant Novice
Joined: 17 Oct 2002 Posts: 44 Location: USA
|
Posted: Wed Dec 26, 2007 8:43 pm |
Hate yourself? For the regex? ;)
|
|
_________________ >-Churlant-< |
|
|
|
Taz GURU
Joined: 28 Sep 2000 Posts: 1395 Location: United Kingdom
|
Posted: Thu Dec 27, 2007 12:25 am |
Yes because coinz is terrible whereas coins is not -- that's English purism for you :)
|
|
_________________ Taz :) |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Thu Dec 27, 2007 12:40 am |
If you want to list only aliases in one class, you will need to use the ZMUD COM object. If you simply want to list all the aliases in memory at the time of issuance, use the #ALIAS command. The formatting will not be very pretty and/or easily readable, because it's also going to list all the code in those aliases. One plus to this, though, is that it's printed exactly as it's shown in the settings editor so with pretty printer/syntax checker on it will properly indent (aside from the skew created by the "name code" alignment for that first line of code).
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
|
|