# left {#left}

**Parent topic:**[Functions](../../Functions/category.md)

## Syntax {#syntax}

`left(X,n)`

## Arguments {#arguments}

**X** is a STRING scalar/vector, or table.

**n** is a positive integer.

## Details {#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 {#examples}

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

