Rosetta Code: Determine if a string has all the same charact