Takes a string as input and returns a new string with all characters replaced by an specified symbol.