Okay, lets say I had a string variable that contained "Hello World! ", (or whatever the string contained)

how would i remove the the right most spaces to make it say "Hello World"

(im reading in items from a text file using substrings that has fixed positions with one line of the text containing several different items)

or does it automatically eliminate the right most spaces???