RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
StrUtils.RightStr Function

Returns the substring of a specified length that appears at the end of a string.

Pascal
function RightStr(const AText: AnsiString; const ACount: Integer): AnsiString; overload;
function RightStr(const AText: WideString; const ACount: Integer): WideString; overload;
C++
AnsiString RightStr(const AnsiString AText, const int ACount);
BSTR RightStr(const BSTR AText, const int ACount);

StrUtils

RightStr returns the trailing characters of AText up to a length of ACount characters. Thus, for example, if AText is the string "Programmer" and ACount is 7, RightStr returns the string "grammer".

Note: If AText is an AnsiString and the current locale uses multi-byte characters, RightStr may return more than ACount bytes. To return a specific number of bytes, use RightBStr.
 

 

Copy 

TrimRight 

AnsiEndsText 

AnsiEndsStr 

AnsiRightStr

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!