updates to Assignment 4.1

updated to include a new if statement so that if the string does not end with the stringSeparator it will return the last characters into the array.
You can also just write this as sampleInput[i] and that works too if you find it simpler!