Renamed $Character to $InputString.

On suggestion from reddit user law18, made sure $InputString is a string.

Rewrote it to accommodate multi-character strings.