Hotfix - For TextHelper

which seems to have gone wrong (messed up the file) in a merge. 
tail() is missing completely and the docs for truncate() are the ones for tail(). 
This fixes it.

Also added missing test case to avoid this regression.