Author Topic: IndexOf bug bad work  (Read 3945 times)

0 Members and 1 Guest are viewing this topic.

Offline soldat-game

  • Camper
  • ***
  • Posts: 407
IndexOf bug bad work
« on: January 05, 2017, 01:14:59 pm »
Code: [Select]
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;

Offline Savage

  • Soldier
  • **
  • Posts: 155
Re: IndexOf bug bad work
« Reply #1 on: January 05, 2017, 06:40:54 pm »
You're right, there should be additional parameter for case-sensitiveness.

Offline Falcon`

  • Flagrunner
  • ****
  • Posts: 792
  • A wanted lagger
Re: IndexOf bug bad work
« Reply #2 on: January 06, 2017, 03:38:24 am »
there's CaseSensitive property on TStringList, unfortunately as far as i've checked it's not exported into SC3. You'll have to wait for soldat 1.8
If you're not paying for something, you're not the customer; you're the product being sold.
- Andrew Lewis

Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live.

Offline soldat-game

  • Camper
  • ***
  • Posts: 407
Re: IndexOf bug bad work
« Reply #3 on: January 06, 2017, 11:35:01 am »
My whole script accounts leaned against the already indexOf