left

Extract the first n elements from an object.

Parameters:

No. Type Comments
1 string or list< T > Object to extract values from
2 int Number of elements to be extracted from the start

Returns:

string? or list< T >?

The extracted result. Note the result is optional, and none is returned if its not possible extract the required number of elements.

Usages:

  • left( v:list<T>, count : int ) : list<T>
  • left( v:string, count : int ) : string