added string truncation script and test

Implemented tm.string.truncate() utility method to fix issue