Thank you very much Sven,
IndexOf function work correctly
31-10-2013 12:01 tarihinde, Sven Barth yazdı:
Am 31.10.2013 10:56, schrieb FreeMan:
No any non-ASCII characters,
'Admin', 'xxxxx' this to strings added in items
TmpStr:= 'Admin'
I := EDT_User.Items.IndexOfName(TmpStr);
or
I := EDT_User.Items.IndexOfName('Admin');
same result
Ah, wait. Now I get your problem. You need to use "IndexOf" instead of
"IndexOfName". The latter is for cases where the TStrings instance
contains name-value pairs (like "Foobar=blubb") whereby this will
return the index of the name-value pair with name "Foobar". For your
case you need to use "IndexOf" which checks the complete string.
Regards,
Sven
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus