Remove more redundant calls to toCharArray.