Trim length of text string