From The Mana World
(~~~~)
 
Line 5: Line 5:
==Basic usage==
==Basic usage==
the usage is:<br>
the usage is:<br>
<code>(CALL script_split_str character string variable maximum)</code>
<code>(CALL script_split_str delimiter string variable maximum)</code>
<br><br>
<br><br>
consider this code:<br>
consider this code:<br>

Revision as of 02:55, 22 August 2014

Argument Splitter

The argument splitter (script_split_str) can be used to split a string passed to a spell into multiple arguments.


Basic usage

the usage is:
(CALL script_split_str delimiter string variable maximum)

consider this code:
(CALL script_split_str " " target "arg" 2)

In the above example, the string "target" is splitted at every whitespace character (" ") and stored into @arg0$, @arg1$ and @arg2$ (maximum being 2)