findtext(Haystack,Needle,Start=1,End=0)
Well, I have an instance where I want to check for multiple "needles" at once but in the same haystack. Here is what I currently have:
mob/proc/Play_File(file/S)
if(findtext("[S]",".bmp")||findtext("[S]",".png")||findtext("[S]",".jpg")||findtext("[S]",".gif"))
world<<browse(S)
I have to repeat findtext() a lot. Is there any other way of doing this that is better/shorter?
Thanks.
And if this is not possible, is it something I should put in the suggestions forum? Or not?
It would be nice if I could do something like this:
mob/proc/Play_File(file/S)
if(findtext("[S]",list(".bmp",".png",".jpg",".gif")))
world<<browse(S)
But I think that would search for the actual entire list in a text string, so it wouldn't find anything. But I really do not know.