[Tutor] C program
Alondt Yauk
fiveholiday55 at hotmail.com
Wed Aug 1 02:12:33 CEST 2007
Hello people of the world.
This question is not a Python related question, but I thought I might just throw it in here and see if there are any C old-timers who could help out.
I have a string with space and I would like to remove the space before comparing but I don't know how to go about doing it. Here is the code
int result = strcmp("yes","yes ");//trailing space on the second yes
this should give me '0' meaning they are both the same, but with the space, it gives me '-1'
Please note: those arguments can be supplied by the user, and when they do, I want to strip off the trailing space.
Any helps is highly appreciated.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070801/af4e9c43/attachment.htm
More information about the Tutor
mailing list