PDA

View Full Version : lindexof in gs2?


JkWhoSaysNi
01-04-2006, 06:29 PM
Hello, does lindexof work in GS2? (or have a GS2 equivilent?)

Heres what i'm trying to do:


this.index = lindexof(params[0],this.list);


This works:

this.index = lindexof(#v(params[0]),this.list);


and so does this:


this.index = lindexof(#p(0),this.list);


is there a way to use lindexof using only gscript2?

Thanks.

napo_p2p
01-04-2006, 07:24 PM
I'm thinking:
this.list.index(params[0]);

JkWhoSaysNi
01-04-2006, 10:05 PM
thanks. Now i get it. Had the same problem with startswith() but it's string.starts :) I think i understand the new syntax more now :p