|
楼主 |
发表于 2011-12-27 22:23:59
|
显示全部楼层
本帖最后由 FFUR2007SLX2_5 于 2011-12-27 22:29 编辑
79楼,移除数组元素并返还(BIS_fnc_removeIndex)
该函数可以移除一个数组中你所不需要的任意元素并返还结果。- _array = [1,["b"],"c",[4],"d"];
- [_array, 2] call BIS_fnc_removeIndex; //returns: [1,["b"],[4],"d"]
- [_array, [0,1,3]] call BIS_fnc_removeIndex; //returns: ["c","d"]
- [_array, 2, 3] call BIS_fnc_removeIndex; //returns: [1,["b"],"d"]
复制代码 从官方的例子中我们看到_array为原始数组,后面则为被移除元素的序数。 |
|