§ 4.99 - [slice] Built-InMnemonic aid: lslice SLICE content This built-in returns a portion of the content. sliceSpec can be any of the following, where a, b and c are integers:
Tip: When a slice component a or b is negative, then it refers to a character position relative to the end of the list. When c is negative, the step goes from the end of the list towards the beginning of the list.
[slice sliceSpec,content] [slice 4,foobarbip] [slice 3:6,foobarbip] [slice 1:9:2,foobarbip] [slice :3,foobarbip] [slice 3:,foobarbip] [slice ::2,foobarbip] [slice :3:2,foobarbip] [slice 2::3,foobarbip] [slice :-1,foobarbip] [slice ::-1,foobarbip] [style reverse [slice ::-1,[b]]] {reverse xyzzy} a bar obri foo barbip foabp fo orp foobarbi pibraboof yzzyx
a
bar
obri
foo
barbip
foabp
fo
orp
foobarbi
pibraboof
yzzyx
Keyboard Navigation
, Previous Page . Next Page t TOC i Index |