03.08.2012, 12:53
Quote:
You used strfind1 twice.. lol..
Also, yours doesn't work properly. It returns 1 if found at 0, etc. It should return -1 if not found, 0 if at 0, 1 if at 1, etc.. |
I made it return a greater value because my teacher told me that I should show location of char in the string.
Like if str is abc ,a=1,b=2 and so on.
I redid test and strfind is actually wayyy faster.