[DGD] find_in_str

chris . psych_mayo at hotmail.com
Sun Jul 8 18:57:03 CEST 2007


I have tested it on my lib, which is a modified version of GurbaLib.  I used 
it to replace gurba's strstr autofun, which returned the index of the first 
occurance.  Typechecking is set to 2 on my version, as well.
I was going to use find_in_string to do various tasks, such as find first 
index match.  I would do that by find_in_str(x,y)[0].  If i wanted the 
number of matches, i would use sizeof.
Not perfect for performance, but i like the simplicity.
I kind of like returning nil, so that !find_in_str(x,y) becomes sensible.  
Do you think that i should write in that i am returning nil, rather than 
letting people assume?
Thanks for the helpful advice.

_________________________________________________________________
Don't get caught with egg on your face. Play Chicktionary!  
http://club.live.com/chicktionary.aspx?icid=chick_hotmailtextlink2




More information about the DGD mailing list