- Fixed some spelling errors in /doc/script_commands.txt
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@17175 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
7bbd35a052
commit
2886a2b39a
@ -5090,7 +5090,7 @@ everything not equippable by the new job class anyway.
|
||||
*sit {"<character name>"};
|
||||
*stand {"<character name>"};
|
||||
|
||||
These commands will make a character sit if standing and stanf if sitting.
|
||||
These commands will make a character sit if standing and stand if sitting.
|
||||
If no character is specified, the command will run for the invoking character.
|
||||
|
||||
---------------------------------------
|
||||
@ -6825,46 +6825,47 @@ The first letter is position 0.
|
||||
*charat(<string>,<index>)
|
||||
|
||||
Returns char at specified index. If index is out of range, returns empty string.
|
||||
|
||||
The first letter of a string is index 0.
|
||||
|
||||
Example:
|
||||
|
||||
charat("This is a string", 10); //returns "s"
|
||||
|
||||
|
||||
---------------------------------------
|
||||
|
||||
|
||||
*setchar(<string>,<char>,<index>)
|
||||
|
||||
Returns the original string with the char at the specified index set to the
|
||||
specified char. If index out of range, the original string will be returned.
|
||||
Only the 1st char in the <char> parameter will be used.
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
setchar("Cat", "B", 0); //returns "Bat"
|
||||
|
||||
|
||||
---------------------------------------
|
||||
|
||||
*insertchar(<string>,<char>,<index>)
|
||||
|
||||
|
||||
Returns the original string with the specified char inserted at the specified
|
||||
index. If index is out of range, the char will be inserted on the end of the
|
||||
string that it is closest. Only the 1st char in the <char> parameter will be used.
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
insertchar("laughter", "s", 0); //returns "slaughter"
|
||||
|
||||
|
||||
---------------------------------------
|
||||
|
||||
*delchar(<string>,<index>)
|
||||
|
||||
Returns the original string with the char at the specified index removed.
|
||||
If index is out of range, original string will be returned.
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
delchar("Diet", 3); //returns "Die"
|
||||
|
||||
|
||||
---------------------------------------
|
||||
|
||||
*strtoupper(<string>)
|
||||
@ -6872,7 +6873,7 @@ Example:
|
||||
|
||||
Returns the specified string in it's uppercase/lowercase form.
|
||||
All non-alpha characters will be preserved.
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
strtoupper("The duck is blue!!"); //returns "THE DUCK IS BLUE!!"
|
||||
@ -6883,16 +6884,16 @@ Example:
|
||||
*charislower(<string>,<index>)
|
||||
|
||||
Returns 1 if character at specified index of specified string is
|
||||
uppercase/lowercase. Otherwise, 0. Characters not of the alphabelt will return 0.
|
||||
uppercase/lowercase. Otherwise, 0. Characters not of the alphabet will return 0.
|
||||
|
||||
Example:
|
||||
|
||||
charisupper("rAthena", 1); //returns 1
|
||||
|
||||
|
||||
---------------------------------------
|
||||
|
||||
*substr(<string>,<start_index>,<end_index>)
|
||||
|
||||
|
||||
Returns the sub-string of the specified string inclusively between the set
|
||||
indexes. If indexes are out of range, or the start index is after the end
|
||||
index, an empty string will be returned.
|
||||
@ -6900,7 +6901,7 @@ index, an empty string will be returned.
|
||||
Example:
|
||||
|
||||
substr("foobar", 3, 5); //returns "bar"
|
||||
|
||||
|
||||
---------------------------------------
|
||||
|
||||
*explode(<dest_array>,<string>,<delimiter>)
|
||||
@ -6926,28 +6927,28 @@ Example:
|
||||
|
||||
Combines all substrings within the specified string array into a single string.
|
||||
If the glue parameter is specified, it will be inserted inbetween each substring.
|
||||
|
||||
|
||||
Example:
|
||||
setarray .@my_array$[0], "This", "is", "a", "test";
|
||||
implode(.@my_array$, " "); //returns "This is a test"
|
||||
|
||||
---------------------------------------
|
||||
|
||||
*sprintf(<format>[,param[,param[,...]]]) [Mirei]
|
||||
*sprintf(<format>[,param[,param[,...]]])
|
||||
|
||||
C style sprintf. The resulting string is returned same as in PHP. All C format
|
||||
specifiers are supported except %n. More info: sprintf @ www.cplusplus.com.
|
||||
The number of params is only limited by rA's script engine.
|
||||
|
||||
Example:
|
||||
.@format$ = 'The %s contains %d monkeys';
|
||||
set .@format$, "The %s contains %d monkeys";
|
||||
dispbottom(sprintf(.@format$, "zoo", 5)); //prints "The zoo contains 5 monkeys"
|
||||
dispbottom(sprintf(.@format$, "barrel", 82)); //prints "The barrel contains 82 monkeys"
|
||||
|
||||
|
||||
---------------------------------------
|
||||
|
||||
*sscanf(<string>,<format>[,param[,param[,...]]]) [Mirei]
|
||||
|
||||
*sscanf(<string>,<format>[,param[,param[,...]]])
|
||||
|
||||
C style sscanf. All C format specifiers are supported.
|
||||
More info: sscanf @ www.cplusplus.com. The number of params is only limited
|
||||
by rA's script engine.
|
||||
@ -6955,7 +6956,7 @@ by rA's script engine.
|
||||
Example:
|
||||
sscanf("This is a test: 42 foobar", "This is a test: %d %s", .@num, .@str$);
|
||||
dispbottom(.@num + " " + .@str$); //prints "42 foobar"
|
||||
|
||||
|
||||
---------------------------------------
|
||||
|
||||
*strpos(<haystack>,<needle>{,<offset>})
|
||||
@ -6969,7 +6970,7 @@ Example:
|
||||
strpos("foobar", "bar", 0); //returns 3
|
||||
strpos("foobarfoo", "foo", 0); //returns 0
|
||||
strpos("foobarfoo", "foo", 1); //returns 6
|
||||
|
||||
|
||||
---------------------------------------
|
||||
|
||||
*replacestr(<input>, <search>, <replace>{, <usecase>{, <count>}})
|
||||
@ -6983,7 +6984,7 @@ Example:
|
||||
replacestr("testing tester", "test", "dash"); //returns "dashing dasher"
|
||||
replacestr("Donkey", "don", "mon", 0); //returns "monkey"
|
||||
replacestr("test test test test test", "yay", 0, 3); //returns "yay yay yay test test"
|
||||
|
||||
|
||||
---------------------------------------
|
||||
|
||||
*countstr(<input>, <search>{, <usecase>})
|
||||
|
Loading…
x
Reference in New Issue
Block a user