How do I get a list of all the characters/letters the mush accepts?

Submitted by javelin on Sun, 2012-02-12 22:19

How do I get a list of all the characters/letters the mush accepts?

Many mushes can work with non-ASCII accented letters and other special characters. The @nameaccent attribute, and the accent(), chr() and ord() functions can be used to generate some of them in softcode, and you can send others through your client if you can type them, or cut&paste. But what about seeing exactly what characters the mush will handle in a better way than trial and error?

With the regraball() function, you can generate lists of every character the mush considers "printable" and thus accepts, or the characters that meet stricter restrictions, like "every lower-case letter".

To do this, call regraball() like so:

regraball(iter(lnum(1, 255), chr(##)), ^\\[\\[:FOO:\\]\\]$)

FOO is one of the following classes:

 upper, for upper-case letters,
 lower, for lower-case letters,
 alpha, for letters,
 digit, for digits,
 alnum, for letters and digits,
 word, for letters, digits and _,
 xdigit, for digits in base-16 numbers,
 ascii, for characters in the ASCII set only,
 punct, for punctuation characters,
 space, for white-space characters
 graph, for non-white-space characters,
 print, for all characters

There\'s also cntrl, but none of the characters that can match it can be
generated by chr().

If you want to get just characters that also fall into a certain range (Like, from A to Z), you can fiddle with the lnum() bit as needed.

2004-Jul-24 10:50am shawnw

Here\'s a line of code you can just paste to make it list all the printable characters:

th edit(iter(lnum(1,255), switch(chr(##), #-1*,,#$)),%b,)

2003-Apr-23 7:28am pmak