Skip to content

Commit

Permalink
cmd-ref: add 'array.at' command
Browse files Browse the repository at this point in the history
  • Loading branch information
pyroscope committed Jun 1, 2018
1 parent 2c504f0 commit d1464a0
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 22 deletions.
48 changes: 27 additions & 21 deletions docs/include-cmd-scripting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ String Functions
.. code-block:: ini
# rTorrent-PS 1.1+ only
string.len=«text» ≫ value (length)
string.len = «text» ≫ value (length)
**TODO**

Expand All @@ -638,27 +638,11 @@ String Functions
:end-before: # END


string.at
.. code-block:: ini
# rTorrent-PS 1.1+ only
string.at=«text»[,«pos»] ≫ string
**TODO**

Examples:

.. literalinclude:: rtorrent-ps/tests/commands/string.txt
:language: console
:start-at: # string.at
:end-before: # END


string.substr
.. code-block:: ini
# rTorrent-PS 1.1+ only
string.=«text»[,«pos»[,«count»]] ≫ string
string.substr = «text»[, «pos»[, «count»[, «default»]]] ≫ string
**TODO**

Expand All @@ -676,7 +660,7 @@ String Functions
.. code-block:: ini
# rTorrent-PS 1.1+ only
string.contains[_i]=«haystack»,«needle»[,…] ≫ bool (0 or 1)
string.contains[_i] = «haystack», «needle»[, …] ≫ bool (0 or 1)
Checks if a given string contains any of the strings following it.
The variant with ``_i`` is case-ignoring, but *only* works for pure ASCII needles.
Expand All @@ -695,8 +679,8 @@ String Functions
.. code-block:: ini
# rTorrent-PS 1.1+ only
string.map=«text»,{«old»,«new»}[,…] ≫ string
string.replace=«text»,{«old»,«new»}[,…] ≫ string
string.map = «text», {«old»,«new»}[, …] ≫ string
string.replace = «text», {«old»,«new»}[, …] ≫ string
``string.map`` scans a list of replacement pairs for an ``old`` text that matches
*all* of the given string, and replaces it by ``new``.
Expand All @@ -717,6 +701,28 @@ String Functions
# prints 'low' as a console message, this is how you map integers
Array Functions
^^^^^^^^^^^^^^^

.. glossary::

array.at

.. code-block:: ini
# rTorrent-PS 1.1+ only
array.at = «array», «pos» ≫ object (element)
**TODO**

Examples:

.. literalinclude:: rtorrent-ps/tests/commands/array.txt
:language: console
:start-at: # array.at
:end-before: # END


Math Functions
^^^^^^^^^^^^^^

Expand Down

0 comments on commit d1464a0

Please sign in to comment.