Used to cut a string after it reaches to a specific length