2021-04-05 17:29:49 +02:00
.. _plugin-String:
Documentation for the String plugin for Supybot
===============================================
Purpose
-------
Provides various commands to manipulate characters and strings.
Usage
-----
Provides useful commands for manipulating characters and strings.
2021-04-05 22:56:40 +02:00
.. _commands-String:
2021-04-05 17:29:49 +02:00
Commands
--------
2021-04-05 22:56:40 +02:00
.. _command-String-chr:
2021-04-05 17:29:49 +02:00
chr <number>
Returns the unicode character associated with codepoint <number>
2021-04-05 22:56:40 +02:00
.. _command-String-decode:
2021-04-05 17:29:49 +02:00
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>.
2021-04-05 22:56:40 +02:00
.. _command-String-encode:
2021-04-05 17:29:49 +02:00
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>.
2021-04-05 22:56:40 +02:00
.. _command-String-len:
2021-04-05 17:29:49 +02:00
len <text>
Returns the length of <text>.
2021-04-05 22:56:40 +02:00
.. _command-String-levenshtein:
2021-04-05 17:29:49 +02:00
levenshtein <string1> <string2>
Returns the levenshtein distance (also known as the "edit distance" between <string1> and <string2>)
2021-04-05 22:56:40 +02:00
.. _command-String-md5:
2021-04-05 17:29:49 +02:00
md5 <text>
Returns the md5 hash of a given string.
2021-04-05 22:56:40 +02:00
.. _command-String-ord:
2021-04-05 17:29:49 +02:00
ord <letter>
Returns the unicode codepoint of <letter>.
2021-04-05 22:56:40 +02:00
.. _command-String-re:
2021-04-05 17:29:49 +02:00
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>.
2021-04-05 22:56:40 +02:00
.. _command-String-sha:
2021-04-05 17:29:49 +02:00
sha <text>
Returns the SHA1 hash of a given string.
2021-04-05 22:56:40 +02:00
.. _command-String-soundex:
2021-04-05 17:29:49 +02:00
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.
2021-04-05 22:56:40 +02:00
.. _command-String-unicodename:
2021-04-05 17:29:49 +02:00
unicodename <character>
Returns the name of the given unicode <character>.
2021-04-05 22:56:40 +02:00
.. _command-String-unicodesearch:
2021-04-05 17:29:49 +02:00
unicodesearch <name>
Searches for a unicode character from its <name>.
2021-04-05 22:56:40 +02:00
.. _command-String-xor:
2021-04-05 17:29:49 +02:00
xor <password> <text>
Returns <text> XOR-encrypted with <password>.
Configuration
-------------
supybot.plugins.String.public
This config variable defaults to "True", is not network-specific, and is not channel-specific.
Determines whether this plugin is publicly visible.