RTTI provides information about types, not about variables. In general, there is no way using RTTI, given the address of a variable, to find its name.
Not only does RTTI not help, but what you try as a method of a string object is actually impossible. Imagine a scenario in which you have two variables related to the same object.
S := 'foo'; T := S;
What is the name of one string object here. Is it S or is it T?
source share