Function trimSpaceTokens

exclude whitespace tokens at beginning and end of token sequence

Token[] trimSpaceTokens(
  Token[] tokens,
  bool trimBeginning = true,
  bool trimEnd = true
);