System.StrUtils.SearchBuf
Delphi
function SearchBuf(Buf: PAnsiChar; BufLen: Integer; SelStart, SelLength: Integer; SearchString: AnsiString; Options: TStringSearchOptions): PAnsiChar;
function SearchBuf(Buf: PChar; BufLen: Integer; SelStart, SelLength: Integer; SearchString: string; Options: TStringSearchOptions): PChar;
C++
extern DELPHI_PACKAGE char * __fastcall SearchBuf _DEPRECATED_ATTRIBUTE1("Moved to the AnsiStrings unit") (char * Buf, int BufLen, int SelStart, int SelLength, System::AnsiString SearchString, TStringSearchOptions Options = (TStringSearchOptions() << TStringSeachOption::soDown ))/* overload */;
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
function | public | System.StrUtils.pas System.StrUtils.hpp |
System.StrUtils | System.StrUtils |
説明
テキストバッファ内の部分文字列を見つけます。
SearchBuf 関数を呼び出すと,テキストバッファ内で特定の検索文字を検索できます。
Buf は,検索対象のテキストバッファです。
BufLen は,Buf の長さ(バイト数)です。
SelStart は,Options が後方検索を指示しているとき(soDown は含まれない)に,検索を実行する最初の文字です。Buf の最初の文字のポジションは 0 です。
SelLength は,Options が前方検索を指示しているとき(soDown が含まれる)に,SelStart の後方何文字目から検索を開始するかを示します。
SearchString は,Buf 内で検索する文字列です。
Options は,SelStart または SelStart+SelLength から前方検索(soDown)と後方検索のどちらを実行するか,検索時に大文字と小文字を区別するかどうか(soMatchCase),単語全体の検索を行うかどうかを(soWholeWord)を決定します。
SearchBuf は,一致する文字列を検出すると,Buf 内の一致文字列の最初の文字を示すポインタを返します。一致する文字列を検出できない場合,SearchBuf は nil(Delphi)または NULL(C++)を返します。