Truncate string after some characters