Delphi

Delphi

Delphi 搜索字符串

49 0

搜索字符串://--------------------------------------------------------------------------------var str: string; n: Integer;begin str := 'A1 A2 A3 A4'; n := str.IndexOf('A'); // 0 n := str.LastIndexOf('A'); // 9 n := str.IndexOf

Delphi

Delphi 字符串是否包含

132 0

是否包含:if pos('a','abcdef')>0 thenbegin//包含endeslebegin//不包含end;//--------------------------------------------------------------------------------var str: string; b: Boolean;begin str := 'Delphi XE4'; b := str.Contains('X

Delphi

Delphi 字符串适宽处理

53 0

适宽处理:function PadLeft(TotalWidth: Integer): string;function PadLeft(TotalWidth: Integer; PaddingChar: Char): string;function PadRight(TotalWidth: Integer): string;function PadRight(TotalWidth: Integer; PaddingChar: Char): string;//-----------------------

Delphi

Delphi 添加或解除引号

24 0

添加或解除引号:function QuotedString: string;function QuotedString(const QuoteChar: Char): string;function DeQuotedString: string;function DeQuotedString(const QuoteChar: Char): string;//--------------------------------------------------------------------------

Delphi

Delphi TDictionary 简单用法

104 0

program Project1;{$APPTYPE CONSOLE}{$R *.res}uses System.SysUtils, System.Generics.Collections;var{ Dictionary: TDictionary<LongWord, string>; aPair: TPair<LongWord, string>;} Dictionary: TDictionary<string, LongWord>; aPair: TPai

Delphi

Delphi 阿拉伯数字转中文汉字数字

90 0

function MoneyConvert2(mmje:real): WideString;const cNum: WideString = '零一二三四五六七八九-万仟佰拾亿仟佰拾万仟佰拾元角分'; cCha: array[0..1, 0..11] of string = (('零仟','零佰','零拾','零零零','零零', '零亿',&

Delphi

Delphi检查是否在64位Windows环境中运行?

81 0

家64位如何使用Delphi检查是否在64位Windows环境中运行?标签:64位,Delphi IAmIn64Bits,IsWow64Process,syswow64如何使用Delphi检查是否在64位Windows环境中运行? 2017年5月24日 没意见 64位,代码,代码库,delphiWin32 API IsWow64Process确定运行的进程(进程处理程序)是否在WOW64上,如果进程是32位且OS是64位,则仅将其设置为TRUE。在64位Windows上,WOW64(Windows

Delphi

Delphi str1.Compare 比较两个字符是否相同

54 0

program Project1;{$APPTYPE CONSOLE}{$R *.res}uses System.SysUtils; varstr1:string ='a1232';str2:string ='a1232';begin try if str1.Compare(str1, str2)=0 then begin write('相同'); end else begin write('不相同'); en