summaryrefslogtreecommitdiff
path: root/doc/script_commands.txt
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2017-06-03 18:36:40 +0200
committerGitHub <noreply@github.com>2017-06-03 18:36:40 +0200
commitcaebdf44507fcd345b63211588fbe607fefd0d78 (patch)
tree15e01308be0ab89bb49aaeac5d723d2629ac5cd9 /doc/script_commands.txt
parent968a0b5cf3d016bf929e27f02f0dd124ac7c5a3d (diff)
parent7e521f026429f0ccfa9c95197c26453e7caef72b (diff)
downloadhercules-caebdf44507fcd345b63211588fbe607fefd0d78.tar.gz
hercules-caebdf44507fcd345b63211588fbe607fefd0d78.tar.bz2
hercules-caebdf44507fcd345b63211588fbe607fefd0d78.tar.xz
hercules-caebdf44507fcd345b63211588fbe607fefd0d78.zip
Merge pull request #1753 from mekolat/string2
new buildins: isstr, getarrayindex
Diffstat (limited to 'doc/script_commands.txt')
-rw-r--r--doc/script_commands.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index f1b7f14dc..e4f7e24a1 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -2441,6 +2441,17 @@ If you do this:
---------------------------------------
+*getarrayindex(<array name>)
+
+This command returns the index of the passed array. This is useful when
+used in combination with getarg()
+
+Example:
+
+ getarrayindex(.@foo[42]) // 42
+
+---------------------------------------
+
*getelementofarray(<array name>, <index>)
This command retrieves the value of the element of given array at given
@@ -8275,6 +8286,18 @@ else.
---------------------------------------
+*isstr(<argument>)
+
+This command checks if the given <argument> is a string (1),
+an integer (0) or something else (2).
+
+Example:
+
+ isstr(69); // outputs 0
+ isstr("69"); // outputs 1
+
+---------------------------------------
+
*charisalpha("<string>", <position>)
This function will return true if the character number Position in the given