delphi 简单的删除字符串尾部数字的代码 方式一: function FilterShowName(const sName: String): String; var I: Integer; begin Result := sName; if Result <> '' then begin do begin ', '-'] then Delete(Result, I, ) else Break; end; end; end; 方式二(未测试): function GetChinese(S
可以看delph的帮助,里面有这个问题详细说明:A character string, also called a string literal or string constant, consists of a quoted string, a control string, or a combination of quoted and control strings. Separators can occur only within quoted strings. A quoted stri
var pMes:^String; begin New(pMes); pMes^:=msg; PostMessage(Application.handle, WM_Custom, 0, Integer(pMes)); end; 以下是接收 procedure CustomMessages(var Msg: TMsg; var Handled: Boolean); var msgStr: String; pMes:^String; begin if Msg.hwnd = Application.h
uses StrUtils; function ReversePos(SubStr, S: String): Integer; var i : Integer; begin i := Pos(ReverseString(SubStr), ReverseString(S)); if i > 0 then i := Length(S) - i - Length(SubStr) + 2; Result := i; end; 调用的例子: ShowMessage (I
//注意:Delphi2010以下版本默认的字符编码是ANSI,VS2010的默认编码是UTF-8,delphi版得到的字符串须经过Utf8ToAnsi()转码才能跟C#版得到的字符串显示结果一致. //Delphi版: function HexToStr(str: string): string; function HexToInt(hex: string): integer; var i: integer; function Ncf(num, f: integer): integer; va