Name |
shorten()缩短数组 |
||
Examples |
String[] sa1 = { “OH “, “NY “, “CA “}; String[] sa2 = shorten(sa1); println(sa1); // ‘sa1’ still contains OH, NY, CA println(sa2); // ‘sa2’ now contains OH, NY |
||
Description |
Decreases an array by one element and returns the shortened array. When using an array of objects, the data returned from the function must be cast to the object array’s data type. For example: SomeClass[] items = (SomeClass[]) shorten(originalArray) 将数组减少一个元素, 并返回缩短的数组。
当使用对象数组时, 从函数返回的数据必须转换为对象数组的数据类型。例如: SomeClass [] 项目 = (SomeClass []) 缩短 (originalArray) |
||
Syntax |
shorten(list) |
||
Parameters |
|
||
Returns |
boolean[], byte[], char[], int[], float[], String[], or Object |
||
Related |
append() |
- 本文固定链接: http://iprocessing.cn/2017/07/21/shorten缩短数组/
- 转载请注明: 卡萨布兰卡 于 Processing编程艺术 发表