I created this helper in order to add some more functions to the string
type:
type
AStringHelper = record helper for string
function Invert: string; overload;
function InvertMe: string; overload;
end;
But when I use it in my code, the TStringHelper
in System.StrUtils
"gets out" and I can't use it's functions.
Is it possible to both of them to coexist?
At most one helper can active at any one point in your code. The documentation says this:
You can define and associate multiple helpers with a single type. However, only zero or one helper applies in any specific location in source code. The helper defined in the nearest scope will apply. Class or record helper scope is determined in the normal Delphi fashion (for example, right to left in the unit's uses clause).
Since record helpers do not support inheritance, there's no way to have both the standard helper's and your helper's functionality active at the same time, other than re-implementing the standard helper's functionality.