[fpc-devel] TStrings.IndexOf(String, Integer) question

Bart bartjunk64 at gmail.com
Sat Oct 3 23:20:59 CEST 2026


Hi,

TStrings has
-  function IndexOf(const S: string): Integer; virtual;
-  function IndexOf(const S: string; aStart : Integer): Integer; virtual;

TStringList has
- function IndexOf(const S: string): Integer; override;
It does not override the second variant.

TStrins does not declare these functions as overload.
As a result you cannot call/use TStringList.IndexOf(String, Integer)

Is this intentional or simply an oversight?

-- 
Bart


More information about the fpc-devel mailing list