ヘッダー関数rightstr(const atext:string; const acount:integer):$ [strutils.pas
関数は、文字列の右側にあるacount文字を返しますaText
説明rightstr( '123456'、3)= '456'
function system.copyを参照してください
例edit3.text:= rightstr(edit1.text、spinedit1.value);
━━━━━━━━━━━━━━━━━━━━━
ヘッダー関数Midstr(const atext:string; const astart、count:integer):$ $ [strutils.pas
関数は、astartから始まる文字列atext acount文字を返します
コピーを意味します
function system.copyを参照してください
例edit3.text:= midstr(edit1.text、spinedit1.value、spinedit2.value);
━━━━━━━━━━━━━━━━━━━━━
ヘッダー関数SearchBuf(buf:pchar; buflen:integer; selstart、sellength:searchstring:string; option:tstringsearchoptions = [sodown]):$ [strutils.pas;
関数は、最初の検索されたポインター位置を返します
この関数を説明することは、テキストの文字列を検索するためによく使用されます
参照<null>
例
//////// SearchBufを開始します
function searchedit(editcontrol:tcustomedit; const searchstring:string;
SearchOptions:tstringsearchoptions;
var
バッファー、P:PCHAR;
サイズ:word;
始める
結果:= false;
if(length(searchstring)= 0)then exit;
サイズ:= editControl.getTextLen;
if(size = 0)then exit;
バッファ:= stralloc(size + 1);
試す
editControl.getTextBuf(バッファー、サイズ + 1);
p:= searchBuf(buffer、size、editcontrol.selstart、editcontrol.sellength、
SearchString、SearchOptions);
p <> nilの場合は始めます
editControl.selstart:= P-バッファー;
EditControl.Sellength:= length(searchstring);
結果:= true;
終わり;
ついに
strdispose(バッファー);
終わり;
終わり;
手順tform1.button1click(sender:tobject);
var
SearchOptions:tstringsearchoptions;
始める
SearchOptions:= [];
Checkbox1がチェックされている場合
include(searchoptions、sodown);
Checkbox2がチェックされている場合
include(searchoptions、somatchcase);
Checkbox3。の場合、チェックしました
include(searchoptions、sowholeword);
searchedit(memo1、edit1.text、searchoptions);
memo1.setfocus;
終わり;
//////// end searchbuf
━━━━━━━━━━━━━━━━━━━━━
ヘッダー関数SoundEx(const atext:string; alength:tsoundexlength = 4):string;
関数は検出文字列を返します
説明:検出方法(SoundEx)によると、交差する文字列を見つけることができます
参照<null>
例edit2.text:= soundex(edit1.text、spinedit1.value);
━━━━━━━━━━━━━━━━━━━━━
ヘッダー関数soundexint(const atext:string; alength:tsoundexintlength = 4):$ [strutils.pas
関数は検出整数を返します
それは、alengthの値が大きいほど、デコード精度が高いことを意味します
参照<null>
例spinedit2.value:= soundexint(edit1.text、spinedit1.value);
━━━━━━━━━━━━━━━━━━━━━
ヘッダー関数decodeSoundExint(avalue:integer):$ [strutils.pas
関数は、プローブ整数のデコードを返します
説明decodesoundexint(soundexint( 'hello'))はsoundex( 'hello')と同等です
参照<null>
例edit2.text:= decodesoundexint(spinedit2.value);
━━━━━━━━━━━━━━━━━━━━━
First Function soundexword(const atext:string):word [strutils.pas
関数は、検出テキスト値を返します
4に固定されたパラメーターalengthがないことを示します
参照<null>
例spinedit2.value:= soundexword(edit1.text);
━━━━━━━━━━━━━━━━━━━━━
First Function DecodeSoundExWord(Avalue:word):strutils.pas
関数は、検出テキスト値のデコードを返します
説明decodeSoundExword(soundexword( 'hello'))はsoundex( 'hello')に相当します
参照<null>
例edit2.text:= decodeSoundExword(spinedit2.value);
━━━━━━━━━━━━━━━━━━━━━
ヘッダー関数soundexsimilar(const atext、aother:alength:tsoundexlength = 4):$ [strutils.pas
関数は、2つの文字列のプローブ文字が同じかどうかを返します
説明結果:= soundex(atext、alength)= soundex(aother、alength)
参照<null>
Checkbox1.Checked:= soundExSimilar(edit1.text、edit2.text、spinedit1.value);
━━━━━━━━━━━━━━━━━━━━━
ヘッダー関数soundexcompare(const atext、aother:string; alength:tsoundexlength = 4):$ [strutils.pas
関数2つの文字列を比較して文字列を検出した結果を返します
説明結果:= ansicomparester(soundex(atext、alength)、soundex(aother、alength))
参照関数sysutils.ansicomparestr
例spinedit2.value:= soundexcompare(edit1.text、edit2.text、spinedit1.value);
━━━━━━━━━━━━━━━━━━━━━
First Function SoundExproc(const atext、aother:string):boolean;
function soundexsimilarを呼び出して、2つの文字列のプローブ文字列を返します。
システム変数AnsiresemblesProcのデフォルト値の説明
参照関数strutils.AnsireSemblestext
例[var ansiresemblesproc:tcomparetextproc = soundExproc;]