How about this
While simple, it doesn't allow for a variable length of string to be returned.
Error checking would be needed if the passed string's length is greater 26 characters.
I am sure there are other ways to handle this, but this has always been my preferred method of handling things:
Step 1) Trim all whitespace.
Step 2) Concatenate the result with a string of characters that is the maximum length needed.
Step 3) Trim the resultant string to the maximum length needed.