is there a library function which does something similar to shifting each of the elements in an array up or down (clearing the first element) and inserting the user input into the new empty one?

for example
"abcdef" and function passes 'g', it becomes "bcdefg" or the other way becoming "gabcde"... (doesnt matter what happens to the null terminator)

I know its not hard to write one yourself but it would be easier if one already exists.