"NEVER EVER rely on the value of the for variable, after the loop." isn't-it ?

"NEVER EVER rely on the value of the for variable, after the loop." isn't-it ?

but I've found this function in FMX.Types

function GetToken(var S: string; const Separators: string; const Stop: string = ''): string;
var
  I: Integer;
  Breaks: string;
begin
  Breaks := Separators + Stop;
  for I := 0 to S.Length - 1 do
  begin
    if Breaks.Contains(S.Chars[I]) then
      Break;
  end;

  Result := S.Substring(0, I);
  S := S.Substring(I + 1);
end;

???!!!!

Comments