Show: Delphi C++
Display Preferences

System.AnsiStrings.MidBStr

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function MidBStr(const AText: AnsiString; const AByteStart, AByteCount: Integer): AnsiString;

C++

extern DELPHI_PACKAGE System::AnsiString __fastcall MidBStr(const System::AnsiString AText, const int AByteStart, const int AByteCount);

Properties

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

Description

Returns the substring of a specified number of bytes that appears at a specified position in a string.

MidBStr returns a substring of AByteCount bytes beginning at AByteStart bytes.

If AByteStart is larger than the length of AText in bytes, MidBStr returns an empty string.

If AByteCount specifies more bytes than are available, only the available bytes are returned.

Note: MidBStr assumes all characters are one byte-long, and does not behave correctly if AText contains multi-byte characters. To handle all strings correctly, use MidStr.

See Also

Personal tools
RAD Studio 10.2 Tokyo
In Other Languages
Previous Versions
Assistance