slice

get a slice of collection between given indices


Parameters

slice collection :string :literal :pathliteral :block
      from :integer
      to :integer

Returns

  • :string
  • :block

Examples

copy
slice "Hello" 0 3 ; => "Hell"

copy
print slice 1..10 3 4 ; 4 5

Related