num:integer
现在我想把
edit1.text:=num// 怎样把num转变成string???
现在我想把
edit1.text:=num// 怎样把num转变成string???
解决方案 »
- java调用web service错误 unknown soapaction"http://命名空间/AddEmp"
- 用DELPHI6的indy控件组里的TIsSMTP发送不了邮件?
- 关于类型定义,如何定义不足1字节整数类型?
- 当窗体最小化时,用的内存比窗体最大化时小很多,这是怎么回事??
- 用FastReport25分栏打印时怎样在第二栏末尾加空网格呀?分不够再加!
- copy 文件的问题?
- 我要做个最简单的打印!!求救!
- ClientDataSet的日期过滤失效问题?急
- delphi6怎让使下拉框能和dbgrid工作?
- 这个语句怎么实现啊!
- 如何将treeview1 中的每个节点 复制到 另一棵空树中 treeView2 最好用递归
- 是我太笨了,很简单问题。。。。。
接下面
首部 function IfThen(AValue: Boolean; const ATrue: string; AFalse: string = ''): string; overload; $[StrUtils.pas功能 返回指定的逻辑字符串说明 IfThen(True, '是', '否') = '是';IfThen(False, '是', '否') = '否'参考 <NULL>例子 Edit3.Text := IfThen(CheckBox1.Checked, Edit1.Text, Edit2.Text);━━━━━━━━━━━━━━━━━━━━━首部 function LeftStr(const AText: string; const ACount: Integer): string; $[StrUtils.pas功能 返回字符串AText左边的ACount个字符说明 LeftStr('123456', 3) = '123'参考 function System.Copy例子 Edit3.Text := LeftStr(Edit1.Text, SpinEdit1.Value);━━━━━━━━━━━━━━━━━━━━━首部 function RightStr(const AText: string; const ACount: Integer): string; $[StrUtils.pas功能 返回字符串AText右边的ACount个字符说明 RightStr('123456', 3) = '456'参考 function System.Copy例子 Edit3.Text := RightStr(Edit1.Text, SpinEdit1.Value);━━━━━━━━━━━━━━━━━━━━━首部 function MidStr(const AText: string; const AStart, ACount: Integer): string; $[StrUtils.pas功能 返回字符串AText从AStart开始的ACount个字符说明 其实就是Copy参考 function System.Copy例子 Edit3.Text := MidStr(Edit1.Text, SpinEdit1.Value, SpinEdit2.Value);━━━━━━━━━━━━━━━━━━━━━首部 function SearchBuf(Buf: PChar; BufLen: Integer; SelStart, SelLength: Integer; SearchString: String; Options: TStringSearchOptions = [soDown]): PChar; $[StrUtils.pas功能 返回第一个搜索到的指针位置说明 这函数常用于文本中搜索字符串参考 <NULL>例子///////Begin SearchBuffunction SearchEdit(EditControl: TCustomEdit; const SearchString: String;SearchOptions: TStringSearchOptions; FindFirst: Boolean = False): Boolean;varBuffer, P: PChar;Size: Word;beginResult := False;if (Length(SearchString) = 0) then Exit;Size := EditControl.GetTextLen;if (Size = 0) then Exit;Buffer := StrAlloc(Size + 1);tryEditControl.GetTextBuf(Buffer, Size + 1);P := SearchBuf(Buffer, Size, EditControl.SelStart, EditControl.SelLength,SearchString, SearchOptions);if P <> nil then beginEditControl.SelStart := P - Buffer;EditControl.SelLength := Length(SearchString);Result := True;end;finallyStrDispose(Buffer);end;end;procedure TForm1.Button1Click(Sender: TObject);varSearchOptions: TStringSearchOptions;beginSearchOptions := [];if CheckBox1.Checked thenInclude(SearchOptions, soDown);if CheckBox2.Checked thenInclude(SearchOptions, soMatchCase);if CheckBox3.Checked thenInclude(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);━━━━━━━━━━━━━━━━━━━━━首部 function SoundexInt(const AText: string; ALength: TSoundexIntLength = 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;]━━━━━━━━━━━━━━━━━━━━━