Joystick Renaming

How do you rename joysticks in a library program? I need the code to be clear on how.