Argument Functions for Mocha


Note that certain string functions may be helpful in parsing arguments.

string args.first;
Returns the first argument from the arguments args (e.g., "give 3 coins beggar" has first argument "coins").

string args.second;
Returns the second argument from the arguments args (e.g., "give 3 coins beggar" has second argument "beggar").

integer args.number;
Returns the number from the arguments args (e.g., "give 3 coins beggar" has the number 3). If no number was specified in args, returns the value nothing.


Return to Mocha's Main Page