2010-11-11, 08:05 PM
Python (95 characters)
Extra credit (138 characters)
Not the cleanest or most time-efficient method, but character-efficient, which is what Fiel asked for.
Edit: Didn't realize "input is always valid", so you can get rid of the try/except block in the extra credit, which drops it down to 116 characters.
Edit: Comparing s to the empty string wasted 4 characters. Whoops.

