truncateLeft$

A function that can be used in Formulas.

## Syntax and semantics

`truncateLeft$` (`string$`, `maximumNewWidth`)
  remove characters from the left of `string$` until the result is at least as short as `maximumNewWidth`:

`assert truncateLeft$ ("hello", 3) = "llo"
` `assert truncateLeft$ ("hello", 5) = "hello"
`

No padding takes place, so the resulting string may be shorter than `maximumNewWidth`:

`assert truncateLeft$ ("hello", 12) = "hello"
`

Note that `maximumNewWidth` cannot be negative:

`asserterror Can never truncate a string down to -3 characters.
` `a$ = truncateLeft$ ("hello", -3)
`

### Links to this page

- Functions