rfc:array_part
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Next revisionBoth sides next revision | ||
rfc:array_part [2012/05/28 13:31] – [Changelog] cataphract | rfc:array_part [2012/05/28 15:19] – [Specification for the function] cataphract | ||
---|---|---|---|
Line 25: | Line 25: | ||
Each part specification shall have one of the following forms: | Each part specification shall have one of the following forms: | ||
- | * A sequential numeric array of indexes, which specifies that only the elements existing at those indexes will be kept. | + | * A non-empty |
* A single index, which specifies that only the element existing at that index will be kept. In this case the level will be collapsed onto the previous one, meaning all the arrays at that level will be replaced with its element the specified index. | * A single index, which specifies that only the element existing at that index will be kept. In this case the level will be collapsed onto the previous one, meaning all the arrays at that level will be replaced with its element the specified index. | ||
* A span part specification is an associative array. The following keys are allowed //start//, //end// and //step//. At least //start// or //end// must be specified. //start// and //end// are an index or a special value -- '' | * A span part specification is an associative array. The following keys are allowed //start//, //end// and //step//. At least //start// or //end// must be specified. //start// and //end// are an index or a special value -- '' |
rfc/array_part.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1