my program is to get value in a config file whose format is
servername = ubuntu
servername = solaris
port = 37777
I use strrchr() to detect the index of '=' then copy string and trim a possible of leading space of that string.
I think i have the problem with strrchr() because when it detect '=', it stops, so I need to move forward 1 index to exclude '=' from the string . I have tried, but fail. So please help me.
Also , is there are in better way to achieve same task with better code? tks.
PS: I just want to cover the case =50000 or = 50000, or = 50000 .