System.AnsiStrings.MidStr
Delphi
function MidStr(const AText: AnsiString; const AStart, ACount: Integer): AnsiString; overload;
C++
extern DELPHI_PACKAGE System::AnsiString __fastcall MidStr(const System::AnsiString AText, const int AStart, const int ACount)/* overload */;
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
function | public | System.AnsiStrings.pas System.AnsiStrings.hpp |
System.AnsiStrings | System.AnsiStrings |
説明
文字列内の指定位置から始まる指定の長さの部分文字列を返します。
MidStr は、AText[AStart] から始まる Count 個の文字の部分文字列を返します。
AStart が AText の長さより大きい場合、MidStr は空の文字列を返します。
Count で指定された文字数が可能な数より多い場合、AText[AStart] から AText の末尾までの文字列のみ返されます。
メモ: AText が AnsiString でかつ現在のロケールでマルチバイト文字が使用されている場合、MidStr は ACount バイトより長い文字列を返す可能性があります。特定のバイト数の文字列を返すには、MidBStr を使用します。