left

Syntax

left(X,n)

Arguments

X is a STRING scalar/vector, or table.

n is a positive integer.

Details

Return the first n characters of string X.

If X is a table, the function is applied only to columns of STRING type. Other column types are ignored.

Examples

left("I love this game!", 6);
// output: I love