summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorDastgir <dastgirpojee@rocketmail.com>2015-06-04 18:53:37 +0530
committerDastgir <dastgirpojee@rocketmail.com>2015-06-04 18:53:37 +0530
commit45b443ae81a813b04dcb497ccd6ee963ce048048 (patch)
tree84eeb253b3d6fdfd90e869b71c470b346f92a2b6 /doc
parent5d83253484c92116580fd400eb77b8fe65f1b1f3 (diff)
downloadhercules-45b443ae81a813b04dcb497ccd6ee963ce048048.tar.gz
hercules-45b443ae81a813b04dcb497ccd6ee963ce048048.tar.bz2
hercules-45b443ae81a813b04dcb497ccd6ee963ce048048.tar.xz
hercules-45b443ae81a813b04dcb497ccd6ee963ce048048.zip
Implemented strcmp Function.
Diffstat (limited to 'doc')
-rw-r--r--doc/script_commands.txt21
1 files changed, 20 insertions, 1 deletions
diff --git a/doc/script_commands.txt b/doc/script_commands.txt
index 779589281..342934533 100644
--- a/doc/script_commands.txt
+++ b/doc/script_commands.txt
@@ -7809,7 +7809,7 @@ mes axtoi("11"); // Displays 17 (1 = 1, 10 = 16)
---------------------------------------
-*compare(<string>,<substring>)
+*compare("<string>","<substring>")
This command returns 1 or 0 when the substring is in the main string (1)
or not (0). This command is not case sensitive.
@@ -7822,7 +7822,26 @@ Examples:
//dothat; will not be executed ('Blood butterfly' does not contain 'Bloody').
if (compare("Blood Butterfly","Bloody"))
dothat;
+
+---------------------------------------
+
+*strcmp("<string>","<string>")
+
+This command compares two strings and is similar to strcmp in C.
+Return Values:
+ >0 : String 1 > String 2
+ 0 : Strings are equal
+ <0 : String 1 < String 2
+
+Examples:
+ .@a = strcmp("abcdef","ABCDEF");
+ if (.@a > 0){
+ mes ".@a is greater than 0."; //Output is this.
+ }else{
+ mes ".@a is less or equal to 0";
+ }
+
---------------------------------------
*getstrlen("<string>")