Limit Textarea

Is it possible to limit the text input in a textarea? e.g. to 2000 characters?

Thanks for any advice.

TextArea.setMaxLength(2000)

How simple …
Thank you!