Deleting a value in an ini file

I need to write a program in c++ or write a batch file to delete a value from an .ini file. I do not know what the value is and I need to take into consideration that there could be spaces at the end of the line. I need to leave the name but just want to delete the value.

"name=value" needs to be "name="

any ideas?
I have many.
Thanks for the reply. If you feel like posting anything related to the question while i look that over...I will still be here.
Sorry I posted this towards the end of my bad question hating spree (was late night), the question is specific enough. If someone could please move this to the windows forums for closer topic alignment and/or help the OP.
Topic archived. No new replies allowed.