Skip to content

Commit

Permalink
cmdref: add 'cat'
Browse files Browse the repository at this point in the history
  • Loading branch information
pyroscope committed May 5, 2018
1 parent b90badf commit be837fe
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
1 change: 0 additions & 1 deletion docs/cmd-ref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ TODO (singles)

.. glossary::

cat
print
add_peer
bind
Expand Down
24 changes: 24 additions & 0 deletions docs/include-cmd-scripting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,30 @@ String Functions

.. glossary::

cat

.. code-block:: ini
cat=«text»[,…] ≫ string
cat={"array", "of", "text"}[,…] ≫ string
``cat`` takes a list of string or array arguments,
and smushes them all together with no delimiter.

Note that ``cat`` can be used to feed strings into the parser
that are otherwise not representable,
like passing an empty string where a command is expected via ``(cat,)``,
or text starting with a dollar sign using ``(cat,{$})``.

Example:

.. code-block:: ini
print=(cat, text\ or\ , {"array", " of", " text"})
will print ``(HH:MM:SS) text or array of text`` to the console.


string.map
string.replace

Expand Down

0 comments on commit be837fe

Please sign in to comment.