System.StrUtils.RightStr

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function RightStr(const AText: AnsiString; const ACount: Integer): AnsiString; overload;
function RightStr(const AText: string; const ACount: Integer): string; overload;

C++

extern DELPHI_PACKAGE System::AnsiString __fastcall RightStr _DEPRECATED_ATTRIBUTE1("Moved to the AnsiStrings unit") (const System::AnsiString AText, const int ACount)/* overload */;

Properties

Type Visibility Source Unit Parent
function public
System.StrUtils.pas
System.StrUtils.hpp
System.StrUtils System.StrUtils

Description

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

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.

See Also