2011-06-28 08:11:32 +02:00
|
|
|
|
|
|
|
.. _plugin-string:
|
|
|
|
|
|
|
|
The String plugin
|
|
|
|
=================
|
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
Hashes
|
|
|
|
------
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-string-soundex:
|
|
|
|
|
|
|
|
string soundex <string> [<length>]
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
|
|
|
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.
|
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-string-sha:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
string sha <text>
|
|
|
|
^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
Returns the SHA hash of a given string. Read
|
|
|
|
http://www.secure-hash-algorithm-md5-sha-1.co.uk/ for more information
|
|
|
|
about SHA.
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
Encoding/decoding
|
|
|
|
-----------------
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-string-xor:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
string xor <password> <text>
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
Returns *<text>* XOR-encrypted with *<password>*. See
|
|
|
|
http://www.yoe.org/developer/xor.html for information about XOR
|
|
|
|
encryption.
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-string-encode:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
string encode <encoding> <text>
|
2011-06-28 08:11:32 +02:00
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
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>*.
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-string-decode:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
string decode <encoding> <text>
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
|
|
|
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>*.
|
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-string-ord:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
string ord <letter>
|
|
|
|
^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
Returns the 8-bit value of *<letter>*.
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-string-chr:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
string chr <number>
|
|
|
|
^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
|
|
|
Returns the character associated with the 8-bit value *<number>*
|
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
Miscellaneous
|
|
|
|
-------------
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-string-re:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
string re <regexp> <text>
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
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>*.
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-string-levenshtein:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
string levenshtein <string1> <string2>
|
|
|
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
Returns the levenshtein distance (also known as the "edit distance"
|
|
|
|
between *<string1>* and *<string2>*)
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
.. _command-string-len:
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
string len <text>
|
|
|
|
^^^^^^^^^^^^^^^^^
|
2011-06-28 08:11:32 +02:00
|
|
|
|
2011-06-28 17:29:38 +02:00
|
|
|
Returns the length of *<text>*.
|
2011-06-28 08:11:32 +02:00
|
|
|
|