check a string does have repeat charactor