I want to end a loop if a string ends with a period. A period in any other place should not end the string. How can this be achieved? I know how to find a period within a string, but can't figure out how to determine if the period is the last character. Any tips would be greatly appreciated.