Duplicate character search in strings (+ unit tests).