Simba Code:for i := 0 to Number do
begin
if ArrInStr(Array, String) then
begin
(Some Function to return the index of the array found in the string)
Break;
end;
end;
Simba Code:for i := 0 to Number do
begin
if ArrInStr(Array, String) then
begin
(Some Function to return the index of the array found in the string)
Break;
end;
end;
I believe you're looking for something like the code below:
(ALSO - Check out Janilabo's string handling commands in my signature! ;] )
Simba Code:{$i srl/srl.simba}
var
index: Integer;
s: string;
TSA: TStringArray;
begin
s := 'foo';
TSA := ['hello', 'world', 'foo', 'new', 'object'];
if (InStrArrEx(s, TSA, index)) then
Writeln('Saved index = ' + IntToStr(index) + '.');
end.
i love you
There are currently 1 users browsing this thread. (0 members and 1 guests)