|
字符串函数大全(7) SearchString, SearchOptions); if P <> nil then begin EditControl.SelStart := P - Buffer; EditControl.SelLength := Length(SearchString); Result := True; end; finally StrDispose(Buffer); end; end; procedure TForm1.Button1Click(Sender: TObject); var SearchOptions: TStringSearchOptions; begin SearchOptions := []; if CheckBox1.Checked then Include(SearchOptions, soDown); if CheckBox2.Checked then Include(SearchOptions, soMatchCase); if CheckBox3.Checked then Include(SearchOptions, soWholeWord); SearchEdit(Memo1, Edit1.Text, SearchOptions); Memo1.SetFocus; end; ///////End SearchBuf ━━━━━━━━━━━━━━━━━━━━━ 首部 function Soundex(const AText: string; ALength: TSoundexLength = 4): string; $[StrUtils.pas 功能 返回探测字符串 说明 根据探测法(Soundex)可以找到相进的字符串;http://www.nara.gov/genealogy/coding.html 参考 <NULL> 例子 Edit2.Text := Soundex(Edit1.Text, SpinEdit1.Value);
|