|Need to find all string compares in scores of projects [message #1400804]
||Mon, 14 July 2014 18:44
| website reader3
Registered: July 2014
This morning one of my programs did a C++ string compare on two unequal strings (one was a function parameter input) and found that they (much to my surprise) were equal, the equality operator == was being used.|
Some careful reading uncovered that using == to compare strings has quirks and using == on char* (properly terminated by the \0 character) was a good way to go.
I would like to find all string compares in my 78 projects and convert them to char* compares, but the only thing I can find is using some Eclipse java add-on which does this.
Is there anything for Eclipse C++ which can locate a string compare using the equality == operator?
Thanks for sharing a robust method (if it exists) I did go manually through all my code attempting to do this, but I might have overlooked one or two which could still be a bug in the program module. (and yes, this bug caused the program to do strange things such as return negative integers to the mod operator)
Powered by FUDForum
. Page generated in 0.01532 seconds