new string length cut off function