Selbst bauen?
Falls man ReportHelper ableiten könnte, was aber nur bei den ClassHelpern geht.
Delphi-Quellcode:
type
TMyStringHelper = record helper(TStringHelper) for string
private
procedure SetChars(Index: Integer; Value: Char);
public
property Chars[Index: Integer] write SetChars;
end;
function TMyStringHelper.SetChars(Index: Integer; Value: Char);
begin
Self[Index + Low(string)] := Value;
end;
So geht es, aber dir fehlen dann alle Standard-HelperFunktionen.
Delphi-Quellcode:
type
TMyStringHelper = record helper for string
private
function GetChars(Index: Integer): Char;
procedure SetChars(Index: Integer; Value: Char);
public
property Chars[Index: Integer]: Char read GetChars write SetChars;
end;
function TMyStringHelper.GetChars(Index: Integer): Char;
begin
Result := Self[Index + Low(string)];
end;
procedure TMyStringHelper.SetChars(Index: Integer; Value: Char);
begin
Self[Index + Low(string)] := Value;
end;