Fix str.trim for single-character strings.