Fix outdated comments in StringUtils `truncate()`

I must have stared at this code so much I did not realize they were outdated until right now. :smile:
Nit: can you change this to `{?string}` to indicate that it can return undefined?