delphisubstring

Delphi Return last 3 characters of a string


I need to get the last 3 characters of a string in delphi.

I have been googling and found LastDelimiter but not an example that does something like this.

Any ideas of what I need to be looking for or how this is done?


Solution

  • Unit StrUtils contains function RightStr, which seems what you are looking for.