【函数】 | int sizeIds() |
【说明】 | 当前创建的数组的个数。 |
【返回】 | 数组个数。 |
【参数】 | 无 |
【示例】 |
alert(rexseeArray.sizeIds());
运行示例
|
【函数】 | boolean containsId(String id) |
【说明】 | 判断数组是否存在。 |
【返回】 | true或false。 |
【参数】 | id:数组的id。 |
【示例】 |
alert(rexseeArray.containsId('test'));
运行示例
|
【函数】 | void removeId(String id) |
【说明】 | 删除数组。 |
【返回】 | 无 |
【参数】 | id:数组的id。 |
【示例】 |
alert(rexseeArray.removeId('test'));
运行示例
|
【函数】 | void clearIds() |
【说明】 | 删除所有数组。 |
【返回】 | 无 |
【参数】 | 无 |
【示例】 |
alert(rexseeArray.clearIds());
运行示例
|
【函数】 | void add(String id, String string) |
【函数】 | void add(String string) |
【说明】 | 在数组中添加元素(字符串),如果指定数组不存在,则先创建再添加元素。 |
【返回】 | 无 |
【参数】 | id:数组的id,默认为"default"。 string:要添加的字符串元素。 |
【示例】 |
rexseeArray.add('test','1;920;3;4');
运行示例
alert(rexseeArray.getJson('test')); |
【函数】 | void remove(String id, int index) |
【函数】 | void remove(int index) |
【说明】 | 在数组中删除元素。 |
【返回】 | 无 |
【参数】 | id:数组的id,默认为"default"。 index:数组元素的索引。 |
【示例】 |
rexseeArray.remove('test',0);
运行示例
alert(rexseeArray.getJson('test')); |
【函数】 | int size(String id) |
【函数】 | int size() |
【说明】 | 读取数组中的元素个数。 |
【返回】 | 数组中的元素个数。 |
【参数】 | id:数组的id,默认为"default"。 |
【示例】 |
alert(rexseeArray.size('test'));
运行示例
|
【函数】 | String get(String id, int index) |
【函数】 | String get(int index) |
【说明】 | 读取数组中的元素(字符串)。 |
【返回】 | 数组中的元素。 |
【参数】 | id:数组的id,默认为"default"。 index:数组元素的索引。 |
【示例】 |
rexseeArray.get('test','1;920;3;4');
运行示例
alert(rexseeArray.get('test',5)); |
【函数】 | JsonObject getJson(String id) |
【函数】 | JsonObject getJson() |
【说明】 | 读取所有数组元素。 |
【返回】 | Json对象,使用eval('('+json')')转换为JavaScript对象。 |
【参数】 | id:数组的id,默认为"default"。 |
【示例】 |
alert(rexseeArray.getJson('test'));
运行示例
|
【函数】 | void explode(String id, String string, String split) |
【函数】 | void explode(String string, String split) |
【说明】 | 分割字符串为数组。 |
【返回】 | 无 |
【参数】 | id:数组的id,默认为"default"。 string:要分割的字符串。 split:分隔符。 |
【示例】 |
rexseeArray.explode('test','1;920;3;4',';');
运行示例
alert(rexseeArray.getJson('test')); |
【函数】 | String implode(String id, String split) |
【函数】 | String implode(String split) |
【说明】 | 连接数组元素为字符串。 |
【返回】 | 连接后的字符串。 |
【参数】 | id:数组的id,默认为"default"。 split:连接符。 |
【示例】 |
rexseeArray.explode('test','1;920;3;4',';');
运行示例
alert(rexseeArray.implode('test',',')); |
【函数】 | void sort(String id) |
【函数】 | void sort() |
【说明】 | 对数组进行排序。 |
【返回】 | 无 |
【参数】 | id:数组的id,默认为"default"。 |
【示例】 |
rexseeArray.explode('test','南京;北京;安全',';');
运行示例
rexseeArray.sort('test'); alert(rexseeArray.implode('test',',')); |