The function takes an input string and shifts each character by a fixed number of positions to generate an output string.

