Slice¶
Name | - | Description | Default | Type |
---|---|---|---|---|
<input> |
The string or sequence from which characters/elements have to be extracted. | [Any] Bytes String |
||
<output> |
The extracted characters/elements. | Any |
||
From |
The position/index of the first character or element that is to be extracted (including). Negative position/indices simply loop over the target string/sequence counting backwards. | 0 |
Int [Int] &Int &[Int] |
|
To |
The position/index of the last character or element that is to be extracted (excluding). Negative position/indices simply loop over the target string/sequence counting backwards. | None |
Int [Int] &Int &[Int] |
|
Step |
The increment between each position/index. Chooses every nth sample to extract, where n is the increment. Value has to be greater than zero. | 1 |
Int |
Extracts characters from a string or elements from a sequence based on the start and end positions/indices and an increment parameter. Operation is non-destructive; the target string/sequence is not modified.
Examples¶
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
[info] [shards/General/Slice/1.edn] el
[info] [shards/General/Slice/1.edn] HloWrd
[info] [shards/General/Slice/1.edn] [20 30]
[info] [shards/General/Slice/1.edn] [10 40 70]
[info] [shards/General/Slice/1.edn] [10 40 70]