The function f(x) takes a string input and shifts each letter in the input string by 5 positions forward in the alphabet. When it reaches the end of the alphabet, the shift wraps around to the start of the alphabet, maintaining the case (uppercase or lowercase) of the input letters. 

[CODE]:
```python
def shift_string(s, shift=5):
    result = ""
    for char in s:
        if char.isalpha():
            shift_amount = 65 if char.isupper() else 97
            result += chr(((ord(char) - shift_amount + shift) % 26) + shift_amount)
        else:
            result += char
    return result
```