determine if a string has duplicate characters