Back to blog
documentation

Skip

Skip is the operation that skips passed number of elements in a sequence.

Syntax

Skip
  : 'skip' '(' ConstantExpression ')'  
  ;

Related tokens

[ConstantExpression](../expression/constant)

Skip examples

Skip first cell of the sequence.

select(tableCells) // PdfTableCell[]
    ->skip(1) // PdfTableCell[]

Take only the second and the third rows.

select(tableCells) // PdfTableCell[]
   ->skip(1) // PdfTableCell[]
   ->take(2) // PdfTableCell[]