Provides useful commands for manipulating characters and strings.
| Command | Help |
|---|---|
| chr | String chr <number> Returns the unicode character associated with codepoint <number> |
| decode | String decode <encoding> <text> Returns an un-encoded form of the given text; the valid encodings are available in the documentation of the Python codecs module: <http://docs.python.org/library/codecs.html#standard-encodings>. |
| encode | String encode <encoding> <text> Returns an encoded form of the given text; the valid encodings are available in the documentation of the Python codecs module: <http://docs.python.org/library/codecs.html#standard-encodings>. |
| len | String len <text> Returns the length of <text>. |
| levenshtein | String levenshtein <string1> <string2> Returns the levenshtein distance (also known as the "edit distance" between <string1> and <string2>) |
| md5 | String md5 <text> Returns the md5 hash of a given string. |
| ord | String ord <string> Returns the unicode codepoint of characters in <string>. |
| re | String re <regexp> <text> If <regexp> is of the form m/regexp/flags, returns the portion of <text> that matches the regexp. If <regexp> is of the form s/regexp/replacement/flags, returns the result of applying such a regexp to <text>. |
| sha | String sha <text> Returns the SHA1 hash of a given string. |
| soundex | String soundex <string> [<length>] Returns the Soundex hash to a given length. The length defaults to 4, since that's the standard length for a soundex hash. For unlimited length, use 0. Maximum length 1024. |
| unicodename | String unicodename <string> Returns the name of characters in <string>. This will error if any character is not a valid Unicode character. |
| unicodesearch | String unicodesearch <name> Searches for a unicode character from its <name>. |
| xor | String xor <password> <text> Returns <text> XOR-encrypted with <password>. |