Update Str.php

Added rtrim() to remove whitespace between the truncated string and the $end string which is appended.