find the max unrepeated substring in a string