From RAD Studio API Documentation
Jump to: navigation, search


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


extern DELPHI_PACKAGE System::AnsiString __fastcall MidBStr _DEPRECATED_ATTRIBUTE1("Moved to the AnsiStrings unit") (const System::AnsiString AText, const int AByteStart, const int AByteCount);


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


Warning: MidBStr is deprecated. Please use AnsiStrings.

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

MidBStr returns a substring 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