find a max length substring without a repeat char in a string