Linux中国 Linux中国门户站!
设为主页 设为主页
收藏本站 收藏本站
 
当前位置 :首页 ->编程语言 ->Delphi ->正文

Delphi字符串函数大全

来源:Linuxdby.com 作者:Webmaster 时间:2007-06-05 点击: [收藏] [投稿]

      4): Integer; $[StrUtils.pas
      功能 返回探测整数
      说明 ALength的值越大解码准确率越高
      参考 <NULL>
      例子 SpinEdit2.Value := SoundexInt(Edit1.Text, SpinEdit1.Value);
      ━━━━━━━━━━━━━━━━━━━━━
      首部 function DecodeSoundexInt(AValue: Integer): string; $[StrUtils.pas
      功能 返回探测整数的解码
      说明 DecodeSoundexInt(SoundexInt('hello')) 相当于 Soundex('hello')
      参考 <NULL>
      例子 Edit2.Text := DecodeSoundexInt(SpinEdit2.Value);
      ━━━━━━━━━━━━━━━━━━━━━
      首部 function SoundexWord(const AText: string): Word; $[StrUtils.pas
      功能 返回探测文字数值
      说明 没有参数ALength已经固定为4
      参考 <NULL>
      例子 SpinEdit2.Value := SoundexWord(Edit1.Text);
      ━━━━━━━━━━━━━━━━━━━━━
      首部 function DecodeSoundexWord(AValue: Word): string; $[StrUtils.pas
      功能 返回探测文字数值的解码
      说明 DecodeSoundexWord(SoundexWord('hello')) 相当于 Soundex('hello')
      参考 <NULL>
      例子 Edit2.Text := DecodeSoundexWord(SpinEdit2.Value);
      ━━━━━━━━━━━━━━━━━━━━━
      首部 function SoundexSimilar(const AText, AOther: string; ALength:
      TSoundexLength = 4): Boolean; $[StrUtils.pas
      功能 返回两个字符串的探测字符串是否相同
      说明 Result := Soundex(AText, ALength) = Soundex(AOther, ALength)
      参考 <NULL>
      例子 CheckBox1.Checked := SoundexSimilar(Edit1.Text, Edit2.Text,
      SpinEdit1.Value);
      ━━━━━━━━━━━━━━━━━━━━━
      首部 function SoundexCompare(const AText, AOther: string; ALength:
      TSoundexLength = 4): Integer; $[StrUtils.pas
      功能 返回比较两个字符串的探测字符串的结果
      说明 Result := AnsiCompareStr(Soundex(AText, ALength), Soundex(AOther,
      ALength))
      参考 function SysUtils.AnsiCompareStr
      例子 SpinEdit2.Value := SoundexCompare(Edit1.Text, Edit2.Text,
      SpinEdit1.Value);
      ━━━━━━━━━━━━━━━━━━━━━
      首部 function SoundexProc(const AText, AOther: string): Boolean;
      $[StrUtils.pas
      功能 调用SoundexSimilar返回两个字符串的探测字符串是否相同
      说明 系统变量AnsiResemblesProc的默认值
      参考 function StrUtils.AnsiResemblesText
      例子 [var AnsiResemblesProc: TCompareTextProc = SoundexProc;]
      ━━━━━━━━━━━━━━━━━━━━━
      首部 function NewStr(const S: string): PString; deprecated; $[SysUtils.pas
      功能 返回一个新的字符串指针地址
      说明 字符串S为空时返回NullStr
      参考 procedure System.New
      例子
      ////////Begin NewStr,DisposeStr
      procedure TForm1.Button1Click(Sender: TObject);
      var
      P: PString;
      begin
      P := NewStr(Edit1.Text);
      Edit2.Text := P^;
      DisposeStr(P);
      end;
      ////////End NewStr,DisposeStr
      ━━━━━━━━━━━━━━━━━━━━━
      首部 procedure DisposeStr(P: PString); deprecated; $[SysUtils.pas
      功能 释放字符串指针P资源
      说明 配合函数NewStr使用
      参考 procedure System.Dispose
      例子 <如上参见,如下参见>
      ━━━━━━━━━━━━━━━━━━━━━
      首部 procedure AssignStr(var P: PString; const S: string); deprecated;

 如果您对本文有任何疑问或者建议,请到讨论区发表您的意见: >> 论坛入口 <<



上一篇:我的共享软件防破解的实用着法   下一篇:让ReportBuilder彻底支持Oracle

文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【我要投稿】 【论坛讨论
更多相关文章
Power by linux-cn.com 粤ICP备05006655号