Assignment4.1 stringDelimiter function with a while loop