Official Soldat Forums
Server Talk => Scripting Discussions and Help => Topic started by: soldat-game on January 05, 2017, 01:14:59 pm
-
Procedure TestIndex();
var Temp: TStringList;
begin
Temp:= File.CreateStringList;
Temp.Append('Test');
Temp.Append('TeSt');
Temp.Append('TEst');
Temp.Append('TesT');
WriteLn(inttostr(Temp.IndexOf('Test'))); //Return 0
WriteLn(inttostr(Temp.IndexOf('TeSt'))); //Return 0
WriteLn(inttostr(Temp.IndexOf('TEst'))); //Return 0
WriteLn(inttostr(Temp.IndexOf('TesT'))); //Return 0
Temp.Free;
end;
-
You're right, there should be additional parameter for case-sensitiveness.
-
there's CaseSensitive (http://www.freepascal.org/docs-html/rtl/classes/tstringlist.casesensitive.html) property on TStringList (http://www.freepascal.org/docs-html/rtl/classes/tstringlist.html), unfortunately as far as i've checked it's not exported into SC3. You'll have to wait for soldat 1.8
-
My whole script accounts leaned against the already indexOf