2015-01-11 16:42:31 +00:00
|
|
|
/*
|
|
|
|
* Author: commy2
|
|
|
|
*
|
|
|
|
* Removes the brackets around a code and returns the code as a string. It does nothing if the code is already a string.
|
2015-01-12 04:02:33 +00:00
|
|
|
*
|
2015-01-11 16:42:31 +00:00
|
|
|
* Argument:
|
|
|
|
* 0: Code (Code or String)
|
2015-01-12 04:02:33 +00:00
|
|
|
*
|
2015-01-11 16:42:31 +00:00
|
|
|
* Return value:
|
|
|
|
* Code (String)
|
|
|
|
*/
|
2015-01-12 11:14:15 +00:00
|
|
|
#include "\z\ace\addons\core\script_component.hpp"
|
2015-01-11 16:42:31 +00:00
|
|
|
|
|
|
|
private "_function";
|
|
|
|
|
|
|
|
_function = _this select 0;
|
|
|
|
|
|
|
|
if (typeName _function == "STRING") exitWith {_function};
|
|
|
|
|
|
|
|
_function = toArray str _function;
|
|
|
|
_function set [0, -1];
|
|
|
|
_function set [count _function - 1, -1];
|
|
|
|
_function = toString (_function - [-1]);
|
|
|
|
_function
|