String function

xiaoxiao2021-03-06  52

[String Function] The headlights Function ANSIRESEMBLESTEXT (Const AText, AoTher: String): Boolean; $ [Strutils.PAS feature Returns two strings to similar to the ANSI (American National Standards Institute) US National Standards Association; not case sensitive Reference function strutils.SoundExProc; var strutils.ansiresemblesproc example Checkbox1.checked: = ANSIRESEMBLESTEXT (Edit1.Text, Edit2.Text); ━━━━━━━━━ 首 首━━━━━━━━━━ 首 首 首 首━━━━━━━━━━━ 首 首AnsiContainsText (const aText, ASubText: string): Boolean; $ [StrUtils.pas function returns a string containing the substring ASubText whether aText described with reference to a case-insensitive function StrUtils.AnsiUppercase; function StrUtils.AnsiPos example CheckBox1.Checked: = AnsiContainsText ( Edit1.text, edit2.text); ━━━━━━━━━ 首 首━━━━━━━━ 首 首 首 f━━━━━━━ 首 f f:::;; (Strutils.PAS): boolean; Return string ATEXT to begin with child string asubtext instructions not distinguish between using the case refunction windows.comPareString example checkbox1.checked: = ANSISTARTSTEXT (Edit1.Text, Edit2.text); ━━━━━━━━━━━━━━ ━━━━━━━ 首 首 首 f f f f addstext (Const Asbtext, ATE XT: String): Boolean; $ [strutils.PAS feature Returns ATEXT End of the sub-string asubtext instructions Not distinguishes the case in the case of the case, the reference window, the information, the case checkbox1.checked: = Ansiendstext (edit1.text, edit2.text); ━━━━━━━━━━━━━━━━━━━━ 首 首 首 f 首 首 首 首 首 首 首 f f f:::::: String; $ [Strutils.PAS feature Return to string ATEXT string AFromText replaced substrings AToText results described with reference to a case-insensitive function SysUtils.StringReplace; type SysUtils.TReplaceFlags example Edit4.Text: = AnsiReplaceText (Edit1.Text, Edit2.Text, Edit3.Text); ━━━━━━ ━━━━━━ 首━━━━━━ 首 首 首 f━━ 首 首 首 f f;;;;; Const Avalues: Array Of String: Boolean;

$ [Strutils.PAS feature Returns whether there is a string ATEXT in the array of strings in the AVALUES, the case is not distinguished, refer to the reference refunction strutils.ansiindextext exampleXckbox1.checked: = ANSIMATCHTEXT (Edit1.Text, ['A1', 'A2', 'A3 ',' A4 ']); ━━━━━━━━━ 首 首━━━━━━━━ 首 首 首 f━━━━━━ 首 首 首 f fdddddext (Const Atext: Array Of String): Integer; $ [ Strutils.PAS feature returns a string atExt location instructions in the string array avateues uncorded case; if not included, return -1 reference function system1.Value: = ANSIINDEXTEXT (Edit1.Text, ['A1' , 'A2', 'A3', 'A4']); ━━━━━━━━━ 首 首━━━━━━━━ 首 首 f━━━━━━━━ 首 首 f::;;; Boolean; $ [Strutils.PAS feature Return string ATEXT contains substrings asubtext Description Case Size Size Reference Function Strutils.ansipos Example CheckBox1.Checked: = ansicontainsstr (edit1.text, edit2.text); ━━━━━━━━━━ ━━━━━━━━━ 首 首 首 首 首 f f f f f f f;;; $ [Strutils.PAS Features Returns the string ATEXT "Sub-string asubtext begins notification Size case reference reference function sysutils. ANSISAMESTR Example CheckBox1.checked: = ansistartsstr (edit1.text, edit2.text); ━━━━━━━━━ 首━━━━━━━━━ 首 首━━━━━━━━━ 首 首 f━━━━━━━━ 首 首━━━:: s: s::::: Boolean; $ [strutils.PAS feature Return string ATEXT Whether the end of child string AsubText Description Case Size Size Reference Function Sysutils.ansisameSTR CHECKBOX1.CHECKED: = ANSIENDSSTR (Edit1.Text, Edit2.text); ━━━━━━━━ ━━━━━━━━━━━━━ 首 首 f f 首━ 首 首 f f f f 首 首 首 f (((::: String; $ [Strutils.PAS Features Return Controvers Atext AFROMTEXT Replace with SubtromTETEXT The results of the description are case sensitive reference reference function system; type sysutils.treplaceflags example edit4.text: =

AnsirePlaceStr (edit1.text, edit2.text, edit3.text); ━━━━━━━━ 首 首 首━━━━━━━━ 首 首━━━━━━━━ 首 首 f━━;;;; Const Avalues: array of String): boolean; $ [strutils.pas feature Returns the string array Avalues ​​Whether to include the string AText Description Case Size Size Reference Function Strutils.ansiIndexSTR CHECKBOX1.CHECKED: = ANSIMATCHSTR (Edit1.Text, ['A1', 'A2 ',' A3 ',' A4 ']); ━━━━━━━━ 首 首 首━━━━━━━━ 首 首 首━━━━━━━ 首 首 首 f fdddd (((Const Ate: Array Of String): Integer; $ [strutils.PAS feature Returns Atext location Description in the string array Avalues ​​Case Size Size Write Reference Function SYSUTILS.ASISAMESTR Example Spinedit1.Value: = AnsiIndexStr (Edit1.Text, ['A1', 'A2', 'A3', 'A4']); ━━━━━━━━ 首 首 首━━━━━━━ 首 首 首 f━━━;; (Const: Integer): String; $ [Strutils .PAS feature returns a string ATEXT ACOUNT a copy description When ACOUNT returns' '' reference function system.setlength example edit3.text: = dupeString (edit1.text, spinedit1.value); ━━━━━━━━ ━━━━━━ 首━━━━━━ 首 首 首 f f 首 首 首 f f f 首 f Ring; $ [Strutils.PAS feature Returns a string ATEXT Reverse Description ReverseString ('1234') = '4321' Reference function system.setlength example edit3.text: = reverseString (Edit1.Text ); ━━━━━━━━━ 首 首━━━━━━ 首 首 首 首 f f 首; (const at: String; Astart, ALENGTH: Cardinal; Const AsbText: String): String; $ [Strutils. PAS feature returns a string description ASTART: Nested start position; ALENGTH: Nested length; stuffstring ('abcd', 2, 0, '12') = 'a12bcd' refer to function system.copy example Edit3.text: = StuffString (edit1.text, spinedit1.value, spinedit2.value, edit2.text);

━━━━━━━━━━━━━━━━━━━ 首 首 首 首 f f a:::: String; OVERLOAD; $ [Strutils.PAS feature Random Return to the array Avalues An element description Before it is recommended to execute the randomize reference function system.random example Randomize; edit3.text: = randomfrom (['A1', 'A2', 'A3', 'A4']); ━━━━━━━━ ━━━━━━━━━━━━ 首 首 首 f f 首 (Avalue: Boolean; Const Atrue: String; Afalse: String = '): String; OverLoad; $ [strutils.pas function Returns the specified logical string Description ifthen (True, 'is', 'No') = 'is'; ifThen (false, 'is', 'No') = 'No' reference example edit3.text: = ifthen (checkbox1.checked, Edit1.Text, edit2.text); ━━━━━━━━━ 首 首━━━━━━━ 首 首 首 首━━━━ (首 首 首 首 首 首;;; Const Action: Integer: String; $ [Strutils .PAS feature returns the ACOUNT characters on the left of the string AText Description Leftstr ('123456', 3) = '123' Reference function system.copy example Edit3.Text: = Leftstr (edit1.text, spinedit1.value); ━━━ ━━━━━━━ 首 首━━━━━━━ 首 首 f━━━━━ 首 首 首 f f (Const Atext: String; Const Acount: Integer): String; $ [Strutils.PAS feature Returns the ACOUNT characters on the right side of the string "RightStr ('123456', 3) = '456' Reference function system.copy example Edit3.Text: = RightStr (Edit1.Text, Spinedit1.value); ━━━━━━━━━━━━━━━━━━━ 首 首 首 f f━ 首 首 首 首 首 f 首 首 (Const ATEXT: STRING; Const Astart, ACOUNT: Integer): String; $ [Strutils.PAS feature Returns AText The ACOUNT character starting from ASTART is actually a copy reference function system.copy example edit3.text: = midstr (edit1.text, spinedit1.value, spinedit2.valu); ━━━━━━━━━━━━━━━━━━ ━━━━━━━ 首 The first Function Searchbuf (BUF: PCHAR; BUFLEN: Integer;

SELSTART, SELLENGTH: INTEGER; SearchString: String; Options: TstringSearchOptions = [SODOWN]): PCHAR; $ [Strutils.PAS feature Returns the first search pointer location Description This function is often used in the text Search string reference examples /// Begin SearchBuf function SearchEdit (EditControl: TCustomEdit; const SearchString: String; SearchOptions: TStringSearchOptions; FindFirst: Boolean = False): Boolean; var Buffer, P: PChar; Size: Word; begin Result: = False; if ( Length (searchString) = 0) THEN EXIT; size: = editcontrol.gettextlen; if (size = 0) THEN EXIT; buffer: = stralloc (size 1); try EditControl.getTextBuf (buffer, size 1); P: = SearchBuf (Buffer, Size, EditControl.SelStart, EditControl.SelLength, SearchString, SearchOptions); if P <> nil then begin EditControl.SelStart: = P - Buffer; EditControl.SelLength: = Length (SearchString); Result: = True ; End; Finally strdispose (buffer); 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 ━━━━━━━━━━━━━━━━━━━━━━ ━ The first Function SoundEx (consth: tsoundexlength = 4): String; $ [Strutils.PAS feature Return Probe string Description Depending on the detection method (SOUNDEX) can find a string; http: // www. Nara.gov/genealog reference/coding.html Reference example edit2.text: = SOUNDEX (Edit1.Text, Spinedit1.Value); ━━━━━━━━━━━━━━━━━━━━━ ━ The first Function Soundexint (Const AText: String; Alength: TsoundexintLength = 4): Integer; $ [Strutils.PAS feature Return Detection Integer Description ALENGTH's value, the higher the decoding accuracy, the reference example spinedit2.Value: = Soundexint (Edit1.Text, S Pinedit1.value); ━━━━━━━━ 首 首 首━━━━━━━ 首 首 首 首━━::::: 首; $ [Strutils.PAS feature returns the decoding of the detection integer DecodeOndexint (Soundexint ('Hello')) is equivalent to SoundEx ('Hello') Reference Example Edit2.Text: = Decodesoundexint (Spinedit2.Value); ━━━━━━━━━━━━━━━━━━━ ━━━ The first Function SoundExword (const at: string): Word; $ [strutils.pas feature return detection text value Description No parameter ALENGTH has been fixed to 4 Reference example spinedit2.value: = SoundExword (edit1.text) ━━━━━━━━━━━━━━━━━━━━━ The first Function Decodesoundexword (Avalue: Word): String; $ [Strutils.PAS feature Returns the decoding of the probing text value DecodesoundExword (SoundexWord 'Hello')) is equivalent to SOUNDEX ('

Hello ') Reference EDIT2.TEXT: = DecodesoundExWord (Spinedit2.Value); ━━━━━━━ 首 首 首 首━━━━━━━ 首 首 首 f━━━━━━━ (((((((((((Const AText, AoTher: String; alength: tsoundength = 4): boolean; $ [Strutils.PAS feature returns two string probe strings to indicate Result: = SOUNDEX (AtexT, alength) = Soundex (AOTHER, ALENGTH) Reference example Checkbox1.checked: = SOUNDEXSIMILAR (Edit1.Text, Edit2.Text, Spinedit1.Value); ━━━━━━━) 首 首 首━━━━━━━━ 首 首━━━━━━━━ ((Const AText, AoTher: String; ALENGTH: TsoundExlength = 4): Integer; $ [Strutils.PAS feature Returns the results of comparing two strings to probing strings Result: = ansiCompareStr (Soundex (ATEXT, ALENGTH), SOUNDEX (AOTHER, ALENGTH) Reference Function sysutils.ansiCompareSTR example spinedit2.value: = SoundExCompare (edit1.text, edit2.text, spinedit1.value); ━━━━━━━━ 首 首 首━━━━━━━━━ 首 首━━━━━━━ ((( Const ATEXT, AOTHER: STRING: Boolean; $ [Strutils.PAS function call SoundexSILAR Returns the two string detection strings to indicate the same instructions system variables ANSIRESEMBLESPROC's default reference function strutils.ansiresembleStext example [VAR ANSIRESEMBLESPROC: TCompareTextProc = SoundExProc;] ━━━━━━━ 首 首━━━━━━━━━ 首 首 首━━━━━━━━━ 首 首 f━━━━ (: :━━ 首 首 首━━━━━━━━━ 首 首 首━━━━━━━━━━ 首Pstring; Deprecated; $ [sysutils.pas feature Returns a new string pointer address Description String S Returns NullStr Reference Procedure System.NEW Example 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 ━━━━━━━━━━━━━━━━━━ ━━━ The first procedure disposeStr (P: pstring); deprecated;

$ [SYSUTILS.PAS feature release string pointer P Resource Description Mix Function Newstr Using Reference Procedure System.Dispose Example ━━━━━━━━━━━━━━━━━━━━━━━━ ━ The first procedure assignstr (var p: pstring; const s: String); DepRecated; $ [sysutils.pas feature to update string S to string pointer P Designing Update Value Reference Function Sysutils. newStr; function SysUtils.DisposeStr examples Begin AssignStr procedure TForm1.Button1Click (Sender: TObject); var P: PString; begin P: = nil; AssignStr (P, Edit1.Text); Edit2.Text: = P ^; DisposeStr (P ); End; end assignstr ━━━━━━━━━ 首 首 首━━━━━━━ 首 首 首━━━━━ 首 首 首 首━━━;; const String; DepRecated; $ [sysutils.pas After the string DEST, add a string S that is equivalent to DEST: = DEST S; Delphi6 is not recommended to use a reference example begin appendstr procedure tform1.button1click (sender: TOBJECT); var s: string; begin s: = Edit2.text; appendstr (s, edit1.text); edit2.text: = s; end; end Appendstr ━━━━━━━━━━━ 首 首 首━━━━━ 首 首 首 首 首 首 首 首 首 首 首 首::: String; $ [Sysutils.PAS feature Return to string S uppercase form Description Non-lowercase Character does not process reference procedure system.setlength example edit2.text: = Uppercase (edit1.text); ━━━━━━━━━ 首 首━━━━━━━━━ 首 首 首━━━━━━ (首 首 首 首 首 首 (((((首 首 首 首: String; $ [sysutils.PAS feature Returns the lowercase of the string S. Description Non-Udress characters do not process reference procedure system.setlength example edit2.text: = lowercase (edit1.text); ━━━━━━━━━━━━ ━━━━━━━━━━ 首 The first Function CompareStr (Const S1, S2: String): Integer; $ [sysutils.pas feature Returns Two characters Description When S1> S2 return value> 0; when S1 S2 return value <0; when S1 = S2 returns value = 0; case sensitive case reference example spinEdit1.Value: =

CompareStr (edit1.text, edit2.text); ━━━━━━━━ 首 首 首━━━━━━━ 首 首 首 f━━━;;;;; Length: Integer: Boolean; Assembler ; $ [Sysutils.PAS feature returns two memory pointer description CompareMem (Pchar ('12A'), PCHAR ('12c'), 2) = true; CompareMem (Pchar ('12a'), PCHAR ('12c') , 3) = false reference example checkbox1.checked: = comparemem (Self, Form1, 8); ━━━━━━━━━ 首 首 首━━━━━━━━ 首 首 f━━etet━━ 首S1, S2: STRING: Integer; $ [sysutils.pas feature Return Compare two string Description Not Distort Reference Example Spinedit1.Value: = CompareText (Edit1.Text, Edit2.Text); ━━━ ━━━━━━━━ 首━━━━━━━ 首 首 首 首━━━━ 首 首 首 f fetetet: Boolean; $ [SYSUTILS.PAS feature Returns the two strings to wait for the instructions Reference example checkbox1.checked: = Sametext (edit1.text, edit2.text); ━━━━━━━━━ 首 首━━━━━━━━━ 首 首 f━━━━━━━━ (首 首 首━━━━━━━ ((((((━━━━━━━━━ (首 首━━━━━━━━━ (首 首 首━━━━━━━━━━━ 首 首━━━━━━━━━━━ 首 首━━━━━━━━━━━━ 首━━━━━━━━━━━━ 首 首━━━━━━━━━━━ 首 首━━━ : String; $ [sysutils.pas feature Returns the uppercase of the string S. Description ANSI (American National Standards Institute) US National Standard Association; non-lowercase characters unchanged reference Funct ION windows.charupperbuff example edit2.text: = ANSIUPPERCASE (Edit1.Text); ━━━━━━━━━ 首 首━━━━━━━━ 首 首 首━━━━━━━ (首 首;:::::::: String; $ [Sysutils.PAS feature Returns the lowercase of the string S. Description Non-Uda-character does not process reference function windows.charLowerBuff example edit2.text: = ansilowercase (edit1.text); ━━━━━━━━━━━━━━━━ ━━━━━━ 首 首 首 f f f f f (Const S1, S2: String): Integer; $ [SYSUTILS.PAS function Reversible Two string Description When S1> S2 return value> 0; when S1

━━━━━━━━━━━━━━━━━━━ 首 首 首 首 f f 首 f f f f (Const S1, S2: String): Boolean; $ [SYSUTILS.PAS feature Returns the difference between the two strings Size write reference Function Sysutils.ansicomparestr case checkbox1.checked: = AnsisameStr (edit1.text, edit2.text); ━━━━━━━━ 首 首 首━━━━━━━━━━ 首 首 f━━━━ettext S1, S2: STRING: Integer; $ [systemils.pas function reverse compare two string description When S1> S2 return value> 0; when S1 S2 return value> 0; when S1 S2 return value> 0; when S1 S2 return value> 0; when S1

Ansistrol (pchar (edit1.text), pchar (edit2.text), spinedit2.value) ━━━━━━━━━ 首 首 首 首━━━━━━ 首 首 首━━━━━━━━ 首 首 首 首━━━━ ((((((S1, S2: PCHAR Maxlen: cardinal): Integer; $ [sysutils.pas feature Returns Two pointer strings Specify length Description When S1> S2 return value> 0; when S1

$ [Sysutils.pas feature to return to double-word string under small-write form Description I can't test it. Reference function windows.charLowerBuffW example edit2.text: = widelowercase (edit1.text); ━━━━━━━━━━━━ ━━━━━━━━━━ 首 The first Function WideCompareStr (Const S1, S2: WideString): Integer; $ [SYSUTILS.PAS feature Return to compare two double-byte string Description When S1> S2 return value> 0 When S1 S2 return value> 0; when S1

$ [SYSUTILS.PAS headlight (const s: wideString): WideString; overload; $ [systemils.pas feature returns to remove string S left invisible characters Description less than # 32 Character as invisible character reference function system.copy Example edit2.text: = trimleft (edit1.text); ━━━━━━━━━ 首 首━━━━━━━━━ 首 f━━━::::: string; overload; SYSUTILS.PAS headlights: wideString; overload; $ [sysutils.pas feature returns to remove string s On the right side of the keyword Description Small than # 32 Character as an invisible character reference Function System.copy Example Edit2 .Text: = trimright (edit1.text); ━━━━━━━━━ 首 首━━━━━━━━ 首 首 首 f━::::: 首; $ [sysutils.pas function Returns a string S in the expression of the manifestation in Pascal, one of the single quotes will be converted to two reference procedure system.insert example edit2.text: = quotedstr (edit1.text); ━━━━━━━━━━━ ━━━━━━━━━━ 首 首 首 f f f f f f f (Const S: String; Quote: CHAR): String; $ [SYSUTILS.PAS feature Returns Strings S with character quote specifically "ANSIQUOTEDSTR (' Hello "World ',' @ ') =' @ Hello" World @ '; ANSIQUOTEDSTR (' HE LLO "world ','") = '"hello" "world" reference function sysutils.ansistrscan example edit2.text: = ANSIQUOTEDSTR (edit1.text,' "); ━━━━━━━━━━━ ━━━━━━━━ 首 首 首 f f f f;; quote: char): String; $ [sysutils.pas feature Returns the expression of character quote as quotation marks in the form of illegal SRC /// otherwise becomes empty reference function SysUtils.AnsiStrScan example Begin AnsiExtractQuotedStr procedure TForm1.Button1Click (Sender: TObject); var P: PChar; begin P: = PChar (Edit1.Text); Edit2.Text: = AnsiExtractQuotedStr (P, '"'); Edit3.text: = p; end;

/// End AnsiextractquotedSTR ━━━━━━━━━ 首 首━━━━━━ 首 首 首 首 首 首━━ 首 首 首 首 首 首 首; (const s: string; aquote: char): String; $ [sysutils.pas feature return Character AQUOTE is an original form of a quotation indicating that the expression is illegal, returns to the s reference function sysutils.ansiextRactQuotedSTR example edit2.text: = ansidequotedstr (edit1.text, '"); ━━━━━━━━━━━━━ ━━━━━━━━━ header function AdjustLineBreaks (const S: string; Style: TTextLineBreakStyle = {$ IFDEF LINUX} tlbsLF {$ ENDIF} {$ IFDEF MSWINDOWS} tlbsCRLF {$ ENDIF}): string; $ [SysUtils. PAS feature returns to the CR / LF sequence to adjust the gauge string Description AdjustLineBreaks ('1' # 13'2 '# 13) =' 1 '# 13 # 10'2' # 13 # 10; AdjustLineBreaks '1' # 10'2 '# 10) =' 1 '# 13 # 10'2' # 13 # 10 Reference Function Sysutils.StrNextchar Example ━━━━━━━━━━━━━━━ ━━━━━ ━ 首 首c iv: boolean; $ [sysutils.pas function Return string ident is the correct identifier Description Identifier :: Letter | Underline [Letter | Underline | Number]. .. Reference example checkbox1.checked: = isvalidident (edit1.text); ━━━━━━━━━ 首 首 首━━━━━━━━━ 首 首 首 f━━━━━━━━━ 首 首 首 首━━━━━━━━━ 首 首 首━━━━━━━━━━━━ 首(Value: integer): String; OverLoad; $ [sysutils.pas headlight Function INTTOSTR (value: int64): string; overload; $ [sysutils.pas feature return integer value translation into string Description Format ('% d', " Value]) Reference function sysutils.fmtstr example edit2.text: = INTTOSTR (Spinedit1.Value); ━━━━━━━━━ 首 首 首━━━━━━━━ 首 首 f━━━━ ((value: integer; Digits: integer: String; OverLoad; $ [sysutils.pas headfaster Function INTTOHEX (value: integer): string; overload; $ [sysutils.pas feature return integer value translation into hexadecimal results; format ('%. * x', [DIGITS, VALUE]) Description Parameter DIGITS Specifies the minimum width of the character;

When the minimum width is insufficient, use 0 to fill the reference function sysutils.fmtstr example edit2.text: = INTTOHEX (Spinedit1.Value, Spinedit2.Value); ━━━━━━━━━━━━━━━━━━━━━━ ━ The first Function StrtOINT (Const S: String): Integer; $ [SYSUTILS.PAS feature Return String S Convert to Integer Description String Non Integer Expression will cause anomalous reference process1.value: = start (Edit1) .Text); ━━━━━━━━━━━━━━━━━━━ 首 首 首 f f━━━: 首 首 首 首 f:: Integer; $ [sysutils.pas feature return string S-converted into an integer description string non-integer expression When returns a default value Default reference procedure system.val example spinedit1.value: = startdef (edit1.text, 0); ━━━━━━━━━━━━━━ ━━━━━━ The first function trystrtOint (const s: integer): boolean; $ [sysutils.pas feature Returning String S) Returns False when the string is not integrated Value 0 is output as the reference example System.Val procedure /// Begin TryStrToInt procedure TForm1.Button1Click (Sender: TObject); var I: Integer; begin CheckBox1.Checked: = TryStrToInt (Edit1.Text, I); SpinEdit1.Val UE: = i; end; /// endsSTRTOINT ━━━━━━━━ 首 首 首 首━━━━━━ 首 首 首 首━━━━:: 首 首 首━::::: int64; $ [sysutils.pas Function Returns String S Converts to Sixty-Four Integers Description Strings Non-Sixty-four-bit integers, will cause an exception reference procedure system.val example spinedit1.value: = strt64 (edit1.text); ━━━━━━ ━━━━━━ 首 首━━━━━━ 首 首 首 首━ 首 首 首 首 首 首 (const); const default: int64): int64; $ [sysutils.pas function return string S converted to sixty-four-bit integer description String Non 64-bit integer expression When returning to default value Default reference process1.value: = start64def (edit1.text, 0); ━━━━━━━━━━━━━━━━━ ━━━━━ The first Function trysTRTOINT64 (Const S: String; Out value: int64): boolean;

$ [SYSUTILS.PAS feature Returns Strings S converted to sixty-four-bit integers value to successfully describe the string Non 64-bit integers to return false and value will output to 0 reference procedure system.val example // Begin TrystrtOint64 Procedure tform1.button1click (sender: Tobject); var i: int64; begin checkbox1.checked: = trystrthannel64 (edit1.text, i); spinedit1.value: = i; end; /// end trystrt64 ━━━━━━━ ━━━━━━ 首 首 首━━━━ 首 首 首 首 首 首 首 (const S: String): Boolean; $ [sysutils.pas feature Returns String S Convert to logic values ​​Description Character non-logical expression will cause exceptions Reference function sysutils.trystrtobool example checkbox1.checked: = stratobool (edit1.text); ━━━━━━━━━ 首 首━━━━━━━━━━ 首 首━━━━━━━━━ 首 首 首 首 f━━ ((((((((((( : Boolean; $ [sysutils.pas feature Returning String S Convert to logic value Description Character Non-logical expression When returning to default value default reference function sysutils.trystrtobool example checkbox1.checked: = stropoldef (Edit1.Text, false) ; ━━━━━━━━━━━ 首 首━━━━━ 首 首 首 首 f f; (all value: boolean): Boolean; $ [sysutils.pas.pas Function Return String S Convert to Logic Value Successful Successful Description [Note] 0 is true; not 'true' and 'false'; Delphi6 BUG Corply refer to Function Sysutils.ansisametext; var sysutils.trueboolstrs; var sysutils examples .FalseBoolStrs /// Begin TryStrToBool procedure TForm1.Button1Click (Sender: TObject); var B: Boolean; begin SetLength (TrueBoolStrs, 2); SetLength (FalseBoolStrs, 2); TrueBoolStrs [0]: = 'True'; FalseBoolStrs [ 0]: = 'false'; TrueBoolSTRS [1]: = 'yes'; falseBoolSTRS [1]: = 'NO'; checkbox1.checked: = trysTRTOBOOL (Edit1.Text, b); checkbox2.checked: = b; END ;

/// End TryStrToBool additional /// Begin TryStrToBool function TryStrToBool (const S: string; out Value: Boolean): Boolean; function CompareWith (const aArray: array of string): Boolean; var I: Integer; begin Result: = False For i: = low (aaarray) to high (aaRray) DO if Ansisametext (s, AARRAY [I]) THEN BEGIN Result: = true; break; end; end; var lresult: extended; begin result: = trysTRTOFLOAT (S , LResult); if Result then Value: = LResult <> 0 else begin Result: = True; // amendments are VerifyBoolStrArray; if CompareWith (TrueBoolStrs) then Value: = True else if CompareWith (FalseBoolStrs) then Value: = False else Result : = False; end; end; /// end trystrtobool ━━━━━━━━ 首 首 首━━━━━━━━ 首 首 首━━━t━━ ((((首tttt (B: Boolean; Usebook): String ; $ [Sysutils.pas feature return logic value B converted to string Description BoolTostr (false, false) = '0'; booltos Tr (false, true) = '- 1' refer to var sysutils.trueBoolstrs; var sysutils.falseBoolSTRS example Edit1.text: = booltostr (checkbox1.checked, checkbox2.checked); ━━━━━━━━━━━━━ ━━━━━━━ 首 首 Function LoadStr (Ident: Integer): String; $ [SYSUTILS.PAS feature Returns String Resource Reference Function Sysutils.FindStringResource Edit2.text: = loadingStr (strtointdef (edit1.text, 0)); ━━━━━━━━━ 首 首 首━━━━━━━━━ 首 首━━━━━━━━━ 首 首 f━━;; Const Args: array Of const; [sysutils.PAS feature Return Formatted string Resource Description String Resource is the internal resources of the program reference function sysutils.fmtstr; function sysutils.findstringResource example ;

━━━━━━━━━━━━━━━━ 首 首 首 首 首 f 首 首: 首;; $ [SYSUTILS.PAS feature returns the length of the pointer string Description When the pointer string When Str is NIL, it will trigger an abnormality reference example spinedit2.value: = strlen (pchar (edit1.text)); ━━━━━━━━━━ 首 首━━━━━━━━━ 首 首 首 f━━━━━━━━━━ 首Strend (const str: pchar): PCHAR; $ [sysutils.pas feature returns the end of the pointer string Description When the pointer string STR is NIL, the exception reference example edit2.text: = stread (pchar (edit1). TEXT)) - Spinedit1.Value; ━━━━━━━━ 首 首 首━━━━━━━ 首 首 首━━━━; ((首 首 f f f; Const Source: Pchar; Count: Cardinal: Pchar; $ [SYSUTILS.PAS feature returns to specify the number of memory Source Specified memory COOUNT COUNT Copy Override to Point String Dest Description DEST No Distribution Resources will trigger an exception S reference Function System.move example /// begin Strmove Procedure TFORM1.BUTTON1CLICK (Sender: TOBJECT); VAR VBUFFER: PCHAR; Begin vbuffer: = '0123456789; Strmove (vbuffer, pchar (edit1.text), spinedit1.value; edit2.text: = vbuffer; end; /// end strmove ━━━━━━━━━ ━━━━━━━ 首 首━━━━━━━ 首 首 f f━━━━━ 首 f f f━;;;; CO Nst Source: Pchar): Pchar; $ [SYSUTILS.PAS feature Returns to copy the pointer string source to the pointer string DEST Description DEST Dest should assign enough space to trigger an exception reference example /// begin strcopy procedure TForm1.Button1Click (Sender: TObject); var vBuffer: PChar; begin GetMem (vBuffer, Length (Edit1.Text) 1); StrCopy (vBuffer, PChar (Edit1.Text)); Edit2.Text: = vBuffer; FreeMem (vbuffer); end; /// end strcopy ━━━━━━━━ 首 首 首 首━━━━━━━ 首 首 首 首 f━;;; ;━ 首 首 首 f; Const Source: Pchar): Pchar; $ [ SYSUTILS.PAS feature returns the end of the pointer string source to the pointer string DEST instructions can be connected to the pointer string reference

Example // Begin Strecopy Procedure TFORM1.BUTTON1CLICK (Sender: Tobject); Var vbuffer: array [0..255] of char; begin strecopy (strecopy (vbuffer, pchar (edit1.text)), Pchar (Edit2.Text) Edit3.Text: = vbuffer; end; /// end streecopy ━━━━━━━━━ 首 首━━━━━━━ 首 首 首 f━━━━━━ 首;; Const Source: pchar; Maxlen: cardinal): PCHAR; $ [SYSUTILS.PAS feature returns to copy the pointer string Source Specify length Maxlen to Pointer string DEST Description DEST Description Dest should have assigned enough space to trigger an abnormal reference example //// Begin StrLCopy procedure TForm1.Button1Click (Sender: TObject); var vBuffer: array [0..255] of Char; begin StrLCopy (vBuffer, PChar (Edit1.Text), SpinEdit1.Value); Edit2.Text: = vBuffer; end ; /// end strlcopy ━━━━━━━━━ 首 首 首━━━━━━━ 首 首 首━━━━;; const source: string: pchar; $ [sysutils.pas feature returns Copy the pointer string source to the pointer string DEST Description Strlcopy (DEST, PCHAR (SOURCE), Length) Reference Function Sysutils.Strlcopy Sub // Begin Strpcopy Procedure TFORM1.BUTTON1CLICK (Sender: Tobject); var vbuffer: array [0..255] of char; begin strpcopy (vbuffer, pchar (edit1.text)); edit2.text: = vbuffer; end; ; /// end strpcopy ━━━━━━━━━ 首 首 首━━━━━━━ 首 首 f━━━;;;;; 首 首;;; Const Source: string; Maxlen: cardinal: Pchar; $ [sysutils .pas return function copies the string length specified MaxLen Source to Dest string pointer described StrLCopy (Dest, PChar (Source), MaxLen) the reference function SysUtils.StrLCopy example /// Begin StrPLCopy procedure TForm1.Button1Click (Sender: TObject) Var vbuffer: array [0..255] of char; begin strplcopy (vbuffer, edit1.text, spiffit1.val); edit2.text: = vbuffer;

End; /// end strplcopy ━━━━━━━━ 首 首 首━━━━━━━ 首 首 首 首 首;;;;;;;; const source: pchar): pchar; $ [sysutils.pas function Returns the connection pointer string Dest and pointer string Source Description Strcopy (Strend (DEST), SOURCE Reference Function Sysuntils.Strcopy Example // Begin Strcat Procedure TFORM1.BUTTON1CLICK (Sender: Tobject); var vbuffer: array [0 .. 255] of char; begin strpcopy; strcat (vbuffer, pchar (edit2.text)); edit3.text: = vbuffer; end; /// end strcat ━━━━━━━━━ ━━━━━━━━━━ 首 The headlight strlcat (DEST: PCHAR; Const Source: pchar; maxlen: cardinal): PCHAR; $ [sysutils.pas feature return connection pointer string DEST and pointer string SOURCE description [Note] Maxlen specifies the maximum length of the connection not the length of the pointer string Source Reference example /// begin strlcat procedure tForm1.Button1Click (sender: TOBJECT); var vbuffer: array [0..255] of char; Begin Strpcopy; strlcat (vbuffer, pchar (edit2.text), spinedit1.value; Edit3.Text: = VBUF FER; End; /// end strlcat ━━━━━━━━━ 首 首 首━━━━━━ 首 首 首 首 首 f━ 首 首 首 首 首 首; $ [sysutils.pas feature Returns two pointer string description When S1> S2 returns value> 0; when S1 example spinedit1.value: = strcomp (pchar (edit1.text), pchar (edit2.text)); ━━━━━━━━━━ 首 首━━━━━━━━━━ 首Function StriComp (const str1, str2: pchar): Integer; $ [sysutils.pas feature returns two pointer string description When S1> S2 return value> 0; when S1 example spinedit1.value: = StriComp (pchar (edit2.text); PCHAR (EDIT1.TEXT));

━━━━━━━━━━━━━━━━━━━━ 首 首 首 首 f 首 f 首 首 f f f; Maxlen: Cardinal: Integer; $ [SYSUTILS.PAS feature Returns Two pointers String specification length Description When S1> S2 returns value> 0; when S1 Example Spinedit1.Value: = Strlcomp (Pchar (Edit1.Text), Pchar (Edit2.Text), Spiedit2.Value) ━━━━━━━━━━━━━━━━━━━━━ ━━━ The first Function strlicomp (const str1, str2: pchar; maxlen: cardinal): Integer; $ [sysutils.pas feature Returns Two pointer strings Specify length Description When S1> S2 return value> 0; when S1 < S2 return value <0; when S1 = S2 returns value = 0; not case sensitive; [Note] Returns the first difference reference example spinedit1.Value: = strlicomp (pchar (edit1.text) , Pchar (edit2.text), spinedit2.value) ━━━━━━━━━ 首 首 首━━━━━━ (首 首 首━━━ ((((Const str: pchar; chr: char): pchar; $ [SYSUTILS.PAS function Returns the address of the pointer string STR Search Character ChR The first address description is not found, return to the empty pointer reference example edit2.text: = strscan (pchar (edit1.text), '*') ━━━━━━━━━━ 首 首━━━━━━━ 首 首 首 f f;; (Const str: pchar; chr: char): Pchar; $ [sysutil S.PAS feature Returns the address of the pointer string STR Search Character CHR The last appearance address Description None, return to the empty pointer reference example edit2.text: = STRSCAN (Pchar (edit1.text), '*'); ━ ━━━━━━━━ 首 首━━━━━━━ 首 首 首━━━━ 首 首 首 f f;;; Pchar; $ [SYSUTILS.PAS feature Returns the first string STR2 in STR1 first An appearance address shows that the empty pointer is not found; STRPOS ('12345', '3') = '345' refer to example edit3.text: = strpos (pchar (edit1.text), pchar (edit2.text) )))); ━━━━━━━━━ 首 首 首━━━━━━━ 首 The first Function Strupper (str: pchar): Pchar; $ [sysutils.pas feature return pointer string STR write instructions non-lowercase Character does not process reference example edit1.text: = Strupper (pchar (edit2.text));

━━━━━━━━━━━ 首━━━━━━━━ 首 首 f 首 f::: (Str: Pchar): Pchar; $ [SYSUTILS.PAS feature Return Point string STR lowercase Description non-uppercase characters do not process Reference example edit1.text: = strlower (pchar (edit2.text)); ━━━━━━━━━ 首 首 首━━━━━━━━ 首 首 f━━━━━ ((首 首 首━━━━━ ((((( : String; $ [SYSUTILS.PAS feature Returns string STR Convert into string Description You can also directly assign a reference example edit1.text: = strpas (pchar (edit2.text)); ━━━━━━━ ━━━━━━━━━━━ 首 The first Function Stralloc (Size: cardinal): PCHAR; $ [sysu onils.pas feature Returns the memory resource of the assigned specified space to the pointer string Description space size will also be saved; all references to release with StrDispose System.GetMem example function /// Begin StrAlloc procedure TForm1.Button1Click (Sender: TObject); var P: PChar; begin P: = StrAlloc (SpinEdit1.Value); ShowMessage (IntToStr (StrLen (P) )); DEC (p, sizeof (cardinal)); SHOWMESSAGE (POINTER (P) ^)); Inc (p, sizeof (cardinal)); strDispose (p); end; /// end stralloc

━━━━━━━━━━ 首 首━━━━━━━ 首 首 首 首 f f::: Cardinal; $ [sysutils.pas feature returns the buffer size instructions allocated by the function stralloc An exception situation returns an unpredictable result reference function system.sizeof example spinedit1.Value: = strbufsize (stralloc (spinedit2.value)); ━━━━━━━━━━━━━━━━━━━━━ The first Function strnew (const str: pchar): PCHAR; $ [sysutils.pas feature Returns a new pointer string indicates that if the Str is NIL, return nil reference function sysutils.strlen; function systemils.strmove; function sysutils.stralloC example /// begin strnew, strdispose procedure tform1.button1click (sender: TOBJECT); VAR P: ​​PCHAR; Begin P: = strnew (pchar (edit1.text)); showMessage (P); strdispose (p); end; // / End strnew, strdispose ━━━━━━━━━ 首 首━━━━━━━ 首 首 首━━━━━;; $ [sysutils.pas feature release pointer string STR memory resource note The STR is NIL without any processing; and releases space size information reference function system.dec; function system.sizeof; function system.freemem example ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ━━━━ The first FUNCT ION Format (const format: string; constrays: array of const): String; $ [sysutils.pas function Return to format a array constant in the specified mode Description This function is the most used function in Delphi, Now list a few examples to give you an intuitive understanding "%" [index ":"] ["-"】 "" summary] type Format ('x =% d', [12]); // 'x = 12' // Most normal format ('x =% 3D', [12]); // 'x = 12' // Specify the width Format ('x =% f', [12.0]); // '= 12.00' // floating point FORMAT ('x =%. 3F', [12.0]); // '= 12.000' // Specify decimal format ('x =%. * f', [5 , 12.0]); // 'X =%. 5D', [12]); // 'x = 00012' // front Supplement 0 Format ('x =%. 5x ', [12]); //' x =

0000c '// hex Format Format (' x =% 1: D% 0: D ', [12, 13]); //' x = 1312 '// Using Index Format (' x =% P ', [NIL]); // 'x = 00000000' // Pointer format ('x =% 1.1e', [12.0]); // '=1.2e 001' // Scientific counting method Format ('x = %% ', []); //' x =% '// Get "%" s: = format ('% s% d ', [s, i]); // s: = s strtoint ( I); // Connecting string reference processuer sysutils.fmtstr example edit1.text: = format (edit2.text, [strMLoATDEF (edit.3.text, 0)]); ━━━━━━━━━━━━━ ━━━━━━━━ 首 The first procedure fmtstr (var result: string; const format: string; const arggs: array of const); $ [sysutils.pas feature is formatted in the form of a character form in the specified manifold. Description Refer to Function System.Length; Function System.Length; Function System.SetLength Example ━━━━━━━ 首 首 首━━━━━━━ (首 首 首 首 首 f ((((( Buffer, Format: Pchar; Const Args: Array Of Const: Pchar; $ [SYSUTILS.PAS feature Returns a character pointer formatted in the specified method to format a array constant. If Buffer and Format are returned to NIL reference Function sysutils.formatbuf example ━━━━━━━━━ 首 首 首 首━━━━━━ 首 首 首 f f 首 f━━ffff T (Buffer: Pchar; Maxbuflen: Cardinal; Format: Pchar; Const args: array of const): PCHAR; $ [SYSUTILS.PAS feature returns a character pointer format Strlfmt (vbuffer, 6, '% D | 12345', [1024]) = '1024 | 1'; Reference function sysutils.formatbuf example ━━━━━━━━━━━━━━━━━ The first Function Formatbuf (var buffer; buflen: cardinal; const form: array ipas: cardinal; $ [sysutils.pas feature returning to formatting an array constant to buffer buffer in a specified manner Reference Example

━━━━━━━━━━━━━━━━━━━━ 首 首 首 首 f 首;; ;━ 首 首 首 f w;; Const Args: Array Of Const: WideString; $ [SYSUTILS.PAS feature Return Press Mode Format a multi-character form of a array constant Description Reference procedure sysutils.Widefmtstr example ━━━━━━━ 首 首━━━━━━━━━ 首 首 首━ 首 ((((((( Var Result: WideString; const format: wirestring; const args: array of const); $ [sysutils.pas feature Returns a multi-byte character form of an array constant by specifying the multi-character character form: Reference function sysutils.WideFormatbuf example < See Format> ━━━━━━━━━ 首 首 首━━━━━━ 首 首 首 首 首 f f f: (var buffer; buflen: cardinal; const format; fmtlen: cardinal; const args: array of const): Cardinal; $ [SYSUTILS.PAS feature returns to format an array constant to the buffer buffer in the buffer refer to example ━━━━━━━━━━━━━━━━━ ━━━━━ 首 首 首 首 首 f:: String; $ [sysutils.pas feature Return floating point value VALUE Convert into string Description When the floating point is equal to 1E15 will adopt a scientific number of minutes reference function sysutils.floatTEXT example Edit1.text: = floattostr (now); ━━━━━━━━━━━ 首━━━━━━━ 首 首 首 f f::::: String; $ [SYSUTILS.PAS feature Return currency VALUE Convert to string Description currency only Keep four decimals reference function sysutils.floattotext example Edit1.text: = currtostr (now); ━━━━━━━━ 首 首 首━━━━━━━━━ 首 首 首━━━━ (((((const value: Extended) : Currency; $ [sysutils.PAS feature Returns floating point value VALUE Converted to currency Number Description If the floating point value value is exceeding the range, the exception reference const system means.mincurrency; const system tcCurrency EDIT1.TEXT: = Currtostr (FLOATTOCURR (now) ); ━━━━━━━━━━ 首━━━━━━━━━ The first Function Floattostrf (Value: Extended; Format: Tfloatformat; Precision, Digits: Integer): String; $ [sysutils.pas function Returns the floating point number to the specified format into string Description precision specifies accuracy;

Decimal Digits specified width of the reference function SysUtils.FloatToText example /// Begin FloatToStrF procedure TForm1.Button1Click (Sender: TObject); begin Memo1.Lines.Values ​​[ 'ffGeneral']: = FloatToStrF (StrToFloatDef (Edit1.Text, 0), ffGeneral , Spinedit1.Value, Spinedit2.Value; Memo1.Lines.Values ​​['ffexponent']: = floattostrf (strtOFLoATDEF (Edit1.Text, 0), ffexponent, spinedit1.value, spinedit2.value; memo1.line.values ​​[Memo1.Lines.Values 'ffFixed']: = FloatToStrF (StrToFloatDef (Edit1.Text, 0), ffFixed, SpinEdit1.Value, SpinEdit2.Value); Memo1.Lines.Values ​​[ 'ffNumber']: = FloatToStrF (StrToFloatDef (Edit1.Text, 0) , FFNUMBER, SPINEDIT1.VALUE, SPINEDIT2.VALUE; MEMO1.LINES.VALUES ['FFCURRENCY']: = FLOATTOSTRF (StrtOFLOATDEF (Edit1.Text, 0), Ffcurrency, Spinedit1.Value, Spinedit2.Value; end; // / End floattostrf ━━━━━━━━━ 首 首 首━━━━━━━ 首 首 f━━━━━━ 首 首 首 (value: currency; format: tfloatformat; Digits: integer): String; $ [sSUTILS .pas function returns the type of currency converted into a string in the specified format described Digits specified fractional width of the reference function SysUtils.FloatToText example /// Begin CurrToStrF procedure TForm1.Button1Click (Sender: TObject); begin Memo1.Lines.Values ​​[ 'ffGeneral'] : = CurrToStrF (StrToCurrDef (Edit1.Text, 0), ffGeneral, SpinEdit1.Value); Memo1.Lines.Values ​​[ 'ffExponent']: = CurrToStrF (StrToCurrDef (Edit1.Text, 0), ffExponent, SpinEdit1.Value); Memo1.Lines.Values ​​[ 'ffFixed']: = CurrToStrF (StrToCurrDef (Edit1.Text, 0), ffFixed, SpinEdit1.Value); Memo1.Lines.Values ​​[ 'ffNumber']: = CurrToStrF (StrToCurrDef (Edit1.Text, 0), FFNUMBER, SPINEDIT1.VALUE);

Memo1.Lines.values ​​['FFCurrency']: = CURRTOSTRF (Strtocurrdef (Edit1.Text, 0), FFCurrency, Spinedit1.Value); end; /// end currtostrf ━━━━━━━━━━━━━━━━━━━━ ━━━━━━━ 首 The headlight floattotext (bufferg: pchar; const value; value; tfloatformat; precision, digits: integer): Integer; $ [sysutils.pas function returns floating point number to specify format Memory size of the pointer string Description precision specifies accuracy; DIGITS specifies the decimal width reference example /// begin floattotext procedure tform1.button1click (sender: Tobject); var vbuffer: array [0..255] of char; E: Extended; Begin E: = STRTOFLOATDEF (Edit1.Text, 0); Spinedit3.Value: = floattotext (vbuffer, e, fvextended, ffnumber, spinedit1.value, spinedit2.value); Edit2.Text: = Copy (vbuffer, 1, Spo; /// end floattotext (━━━━━━━━ 首 首━━━━━━━━ 首 首 首 f━━━━━━ 首 首 ": string; String; $ [Sysutils.pas feature returns the floating point type type to specify the format string Format converted into strings Description Format Float (',. 00', 1234567890) = '1, 234, 567, 890.00' Reference function sysutils.floattotextfmt example edit1.text: = formatfloat (edit2.text, strtofloatdef (edit3.text, 0)); ━━━━━━━━━ ━━━━━━━━━ 首 首 The first Function Formatcurr (const format: string; value: currency): String; $ [systemils.pas feature Returns the currency type to specify the format string Format converted into string Description FormatCurr ', .00', 1234567890) = '1,234,567,890.00' Reference function sysutils.floattlextfmt example edit1.text: = formatcurr (edit2.text, stratocurrdef (edit3.text, 0)); ━━━━━━━━━━━━ ━━━━━━━━ 首 The headlight floattotextfmt (BUF: Pchar; Const value; ValueType: Tfloatue; Format: Pchar): Integer;

$ [SYSUTILS.PAS feature Returns the floating point number to specify the format string Format Convert Memory Size Memory Size Description VALUETYPE Specifies the Type of Nothing Parameter Value Reference Example // Begin FloattotextFmt Procedure TFORM1.B /BUTTON1CLICK (Sender: Tobject VAR VBUFFER: Array [0..255] of char; e: extended; begin E: = struploatdef (edit1.text, 0); spinedit1.value: = floattotextfmt (vbuffer, e, fvextended, pchar (edit2.text )); Edit3.text: = Copy (vbuffer, 1, spinedit1.value); end; /// end floattlextFMT ━━━━━━━━ 首━━━━━━━━━━━ 首 首 首━━━━━━━━━ 首 首(const S: String): Extended; $ [sysutils.pas function Returns String S Convert to floating point number Description String non-floating point number When expressing the abnormal reference function sysutils.texttofloat example var E: Extended; Begin E: = StrtOFLOAT (Ed;); PAS function Returns String S Convert to floating point number Description String Non-floating point Number Expression Returns Default Reference Function Sysutils.TextTOFLOAT Example Var E: Extended; Begin E: = STRTOFL OATDEF (Edit1.Text, 0); END; ━━━━━━━━ 首 首 首━━━━━━━━ 首 首 f━━━━━: 首::: Extended: Boolean; OverLoad ; $ [SysUtils.pas header function TryStrToFloat (const S: string; out Value: Single): Boolean; overload; $ [SysUtils.pas header function TryStrToFloat (const S: string; out Value: Double): Boolean; overload; $ [SYSUTILS.PAS feature Returns String S Convert to floating point VALUE Successfully describe the string non-floating point number expression Returns false and value will output a value of uncertain reference function sysutils.texttofloat example // Begin Trystrtofloat Procedure TFORM1.BUTTON1CLICK (Sender: TOBJECT); VAR E: Extended; Begin Checkbox1.checked: = trystrtofloat (edit1.text, e); edit2.text: = formatfloat (''

, E); end; /// end trystrtofloat ━━━━━━━━ 首 首 首 首━ 首 首 (首 首 首 首 ((const s: string): currency; $ [sysutils.pas function Returns String S Convert to Currency Number Description String Non-currency Noncural Expression will cause an exception reference function sysutils.textTOFLOAT example var C: currency; begin c: = straopcurr (edit1.text); end; ━━━━━━━ ━━━━━ 首 首 首━━━━ 首 The first Function Strtocurrdef (const default: currency): currency; $ [sysutils.pas feature return string S converted to currency Number Description String Non-currency Number expression returns a default value default reference function sysutils.textTOFLOAT example var C: currency; recomcar c: = strangurrdef (edit1.text, 0); End; ━━━━━━━━━━━━━━━ ━━━━ 首 The first Function trysTRTOCURR (Const S: string; out value: currency): boolean; $ [sysutils.pas feature Returning String S) VALUE Successfully Describes String Non-currency Number Expression Returns false and value output /// Begin TryStrToCurr procedure TForm1.Button1Click reference value function SysUtils.TextToFloat example indeterminate (Sender: TObject); var C: Currency; begin CheckBox1.Checked: = TryStrToCurr (Edit1.Text, C); Edit2.text: = formatcurr ('', c); end; /// end trystrtocurr ━━━━━━━━ 首 首━━━━━━━━━ 首 首━━━━━━━━━ (首 首━:::;; var; var VALUE; VALUETYPE: TFLOATVALUE): Boolean; $ [sysutils.pas feature returns to convert the pointer string buffer into a non-type variable VALUE Description ValueType Specifies the type of non-type parameter VALUE Type reference example // begin textttofloat Procedure TFORM1.BUTTON1CLICK (Sender: TOBJECT); VAR E: Extended; Begin Checkbox1.checked: = texttOfloat (pchar (edit1.text), e, fvextended; ed2.text: = formatfloat ('', e); end; /// end TEXTTOFLOAT ━━━━━━━━━━ 首 首 首━━━━━━ 首 首 f━━━━━))))): String;

$ [SYSUTILS.PAS function return date DateTime Convert to string Description conversion format constructed by system variable shortdateformat control reference function sysutils.datetimetostring; var sysutils.shortdateformat EDIT1.TEXT: = DATETOSTR (date); ━━━━━━━━━━ ━━━━━━━━━━━ 首 The first Function Timetostr (const datetime: tdatetime): String; $ [sysutils.pas feature return time DateTime Convert to string Description Translation format The system variable LongTimeFormat control reference function sysutils. DateTimetString; var sysutils.longtimeformat eDit1.text: = Timetostr (date); ━━━━━━━━ 首 首 首━━━━━━━━ 首 首━━━━━━━━━ 首) )━━)))): String Download Adobe Reader DateTime: TDATETIN $ [SYSUTILS.PAS feature return date Time DateTime Convert to string Description Conversion Format The system variable ShortdateFormat and LongTimeFormat Control reference function sysutils.datetimetostring example edit1.text: = DateTimetostr (now); ━━━━━━━━━━━━ ━━━━━━━━━ 首 The first Function Strtodate (const s: string): TDATETIME; $ [systemils.pas feature return string S Convert to date Description Character Non-date Expression will cause an exception reference function sysutils.tryStodate Example DateTimePicker1.Date: = stradate (edit1.text); ━━━━━━━━━━━━━━━━━━━ ━━━ The first Function Strtodatedef (const default: tdatetime): tdatetime; $ [systemils.pas feature Return String S Convert to date Description Character Non-date Expression When you return to the default value Default reference Function Sysutils.TryStodate example DateTimePicker1.Date: = stradateDef (edit1.text, date); ━━━━━━━━ 首 首 首━━━━━━━━ 首 首 f━━━━━━━ 首 首 首 f:;: TDATETIME: Boolean; $ [sysutils.pas function Returns Strings S Convert to Date Value Successfully Description Character Non-Date Expression Returns False and Value will output example /// begin trysTRTODATE Procedure TFORM1.BUTTON1CLICK (Sender: Tobject ); Var vdatetime: tdatetime; begin checkbox1.checked: = trystodate (edit1.text, vdatetime); DateTimePicker1.date: = vdatetime

End; /// end trystodate ━━━━━━━━━━━━━━━ 首 首 首 首 首 首 首:::: TDATETIME; $ [SYSUTILS.PAS feature Returns Strings S Converting Time Description Character Non-Time Expression will cause an exception reference function sysutils.tryStotime example DateTimePicker1.Time: = startIME (edit1.text); ━━━━━━━━━━━━━━━━━━━━ ━ header function StrToTimeDef (const S: string; const default: TDateTime): TDateTime; $ [SysUtils.pas function returns a string S is converted to the default value default time reference function SysUtils.TryStrToTime example DateTimePicker1 is returned if the character is not time expression. Time: = strtotimedef (edit1.text, time); ━━━━━━━━━ 首 首━━━━━━━━ 首 首 f━━━━━ ((const S: string; out value: tdatetime): boolean; $ [SYSUTILS.PAS feature Returns String S Convert to Time Value Successfully Successfully Describes Character Non-Time Expression Returns False and Value will output Example /// Begin Trystotime Procedure TFORM1.BUTTON1CLICK (Sender: TOBJECT); Var vdatetime: tdatetime; begin checkbox1.checked: = trystotime (edit1.text, vdatetime); DateTimePicker1.Time: = vdatetime End; /// end trystotime ━━━━━━━━━━ 首━━━━━ 首 首 首 首 首 f:: 首 首 (const s: string): tdatetime; $ [sysutils.pas feature returns string S Converting Date Time Description Character Non-Date Time Expression will cause an exception reference function sysutils.trystodatetime example edit1.text: = DATETITOSTR (STRTODATETIME (EDIT2.TEXT)); ━━━━━━━━━━━━━━━━━━━━ ━━━━━ ━ 首 首c f;; const default: tdatetime; tdatetime; $ [systemils.pas feature return string S converted to date Time Description Character Non-date Time Expression Returns Default Reference Function sysutils.trystrtodatetime example edit1.text: = DateTimetostr (strtodatetimedef (edit2.text, now)); ━━━━━━━━━ 首 首━━━━━━━━━ 首 首 f━━━━━━━ ((Const S: String; out value: tdatetime): boolean;

$ [SYSUTILS.PAS function Returns String S Convert to Date Time Value Successfully Describes the character Non-date time Returns false and value will output to 0 reference example /// begin tryston1click (sender: Tobject) Var vdatetime: tdatetime; begin checkbox1.checked: = trystetodatetime (edit1.text, vdatetime); edit2.text: = DateTimetostr (vdatetime); end; /// end trystrtodatetime ━━━━━━━━━━ ━━━━━━━━ 首 The first procedure: string; const format: string; datetime: tdatetime); $ [sysutils.pas function with the specified format format to format the date time DateTime and return to the character String Result Reference Function System.setString Examples ━━━━━━━━ 首 首 首━━━━━━━━ 首 首 首 首━━━━━━ 首 首 首 (;;; ;━━ ;━━ ((Locale, LocaleType: Integer; Const Default: string): string; platform; $ [SysUtils.pas system function returns the current value of the specified parameter string Description GetLocaleStr (GetThreadLocale, LOCALE_SLANGUAGE, '') = 'Chinese ()' function Windows.GetLocaleInfo reference example Edit1.Text : = GetLocalestr (GetThre Adlocale, Spinedit1.Value, ''); ━━━━━━━━━ 首 首━━━━━━━━ 首 首━━━━━━━ ((Locale, LocaleType: Integer; Default: char): char ; platform; $ [SysUtils.pas function returns the current system parameters specified character value be described GetLocaleChar (GetThreadLocale, LOCALE_STHOUSAND, # 0) = ',' reference function Windows.GetLocaleInfo example Edit1.Text: = GetLocaleChar (GetThreadLocale, LOCALE_SLANGUAGE, # 0 ); ━━━━━━━━━━━━ 首━━━━━━ 首 首 首 首 f 首 首 首 (const S: string; index: integer): TMBCSBYTYPE; $ [sysutils.pas feature returns string S position InDex characters in MBCS Description Multi-byte character system: multi-byte character system system (mbcs) Reference var sysutils.syslocale example spinEdit1.Value: =

ORD (byType (Edit1.Text, Spinedit2.Value)); ━━━━━━━━ 首 首 首━━━━━━━━ 首 首 首━━━━━ ((str: pchar; index: cardinal): TMBCSBYTYPE $ [SYSUTILS.PAS feature Returns the character string STR position index in the MBCS Type Description Index From 0 Reference Var Systemils.syslocale Example Spinedit1.Value: = ORD (StrByType (pchar (pchar (edit1.text), Spinedit2.Value ))); ━━━━━━━━━━━ 首━━━━━━━ 首 首 首 首 f f (((const S: String; Maxlen: Integer): Integer; $ [sysutils.pas feature Return string S How many multi-byte characters in Maxlen specify the number of references for the number of processing characters. Function SYSUTILS.BYTETOCHARINDEX example spinedit1.Value: = bytetocharlen (edit1.text, spinedit2.value); ━━━━ )━━━━━━━━━━━ ━━━━━━ 首 The first Function Chartobytelen (Const S: String; Maxlen: Integer): Integer; $ [SYSUTILS.PAS function Return String S How many characters in the string s Description Maxlen Specifies a number of reference to the multi-byte character Var sysutils.syslocale example spinedit1.value: = chartobytelen (edit1.text, spinedit2.value); ━━━━━━ )━━ 首 首━━━━━━━━━ 首 首 首━━━━━━━ (((Const S: String ; Index: integer: integer; $ [SYSUTILS.PAS feature Returns the multi-byte character position of the character position Description ByTetocharindex ('Hello', 2) = 1; bytetocharindex ('Hello', 3) = 2 Reference function sysutils.nextcharindex example spinedit1.Value: = ByTetocharindex (Edit1.Text, Spinedit2.Value); ━━━━━━━━━ 首 首 首━━━━━━━━ 首 首 首━━━━tt ((Const S: String; Index: Integer; $ [Sysutils.PAS feature Returns the character starting position of the multi-byte character position Description CHARTOBYTEINDEX ('Hello', 1) = 1; ChartobyteIndex ('Hello', 2) = 3 Reference Function System.length Example Spinedit1.Value : = CHARTOBYTEINDEX (Edit1.Text, Spinedit2.Value); ━━━━━━━━━ 首 首━━━━━━━━━ 首 f━━━: (((Const str: Pchar): Integer;

$ [SYSUTILS.PAS feature Returns the first character's width Description Parameters Return 0 Reference function Windows.CharNext Example Spinedit1.Value: = STRCHARLENGTH (PCHAR (EDIT1.TEXT)); ━━━━━━━━━━ ━━━━━━━━━ 首 ━ 首 首 f f:: pchar; $ [sysutils.pas feature Return Character pointer STR's next character pointer Description strnextchar ('1234') = '234' Reference function windows.charnext example edit2.text: = strnextchar (pchar (edit1.text)); ━━━━━━━━━━ 首 首━━━━━━━━ 首 首 f━━━━ (((((Const S: String; index: integer: Integer; $ [sysutils.pas function Returns the character width of the specified location in the string Description Charlength ('English Han, 1) = 1; Charlength (' English Han, 8) = 2 Reference FUNCTION SYSTEM.ASSERT; FUNCTION SYSUTILS.STRCHARLENGTH example spinedit1.value: = charlength (edit1.text, spinedit2.valu); ━━━━━━━━ 首 首━━━━━━━━━━ 首 首 f━━━━ ((( Const S: String; Index: Integer: Integer; $ [Sysutils.PAS function Back to the next character location Description Charlength ('Hello', 1) = 3; Charlength ('Hello', 3) = 5 Reference Function System.assert; function sysutils.strcharlength Example spinedit1.value: = nextcharindex (Edit1.Text, Spinedit2.Value); ━━━━━━━━━ 首 首━━━━━━━━━ 首 首 f━━━━━━ (((Const S: String; Index: Integer : Boolean; $ [systemils.pas function Returns whether it is a path separator on the specified position index in the string S. ISPATHDELIMITER ('c: / windows', 3) = true reference const system; Checkbox1.checked: = ISPATHDELIMITER (Edit1.Text, Spinedit1.Value); ━━━━━━━━━ 首 首━━━━━━━ (首 首━━━━━ ((Const Delimiters, S: String; Index: Integer: Boolean; $ [systemils.pas function Returns in the specified position index is a separator Delimiters description Isdelimiter ('@', 'WJHU111 @

21cn.com ', 8) = True Reference Function Sysutils.byType Example CheckBox1.checked: = Isdelimiter (Edit1.Text, Edit2.Text, Spinedit1.Value); ━━━━━━━━━━━━━━━━ ━━━━━ ━ 首 首c (const s: string): string; $ [sysutils.pas feature returns to include the last path separator Description The last character is the path separator is constant; otherwise, add a path separator to return reference function SysUtils.IsPathDelimiter; function System.Length example Edit1.Text: = IncludeTrailingPathDelimiter (Edit2.Text); ━━━━━━━━━━━━━━━━━━━━━ header function IncludeTrailingBackslash (const S : string): string; platform; $ [SysUtils.pas function returns information including the last slash Description Result: = IncludeTrailingPathDelimiter (S); an example of the reference function SysUtils.IncludeTrailingPathDelimiter Edit1.Text: = IncludeTrailingBackslash (Edit2.Text); ━━━━ ━━━━━━━ 首 首━━━━━━ 首 首 f━━━━ 首 首 (const S: string): string; $ [systemils.pas feature return exclude Last path separator Description Last character is not a path separator Constant; otherwise subtract the last path separator returns reference function syspathDelimiter; function system.l ENGTH; FUNCTION System.Setlength EDIT1.TEXT: = ExcludtrailingPathDelimiter (edit2.text); ━━━━━━━━ 首 首━━━━━━━━━ 首 首 首━━━━━━━━━ (const s: string): string; platform; $ [SysUtils.pas negative function returns the last slash Description Result: = ExcludeTrailingPathDelimiter (S) reference example function SysUtils.ExcludeTrailingPathDelimiter Edit1.Text: = ExcludeTrailingBackslash (Edit2.Text); ━━━━━━━━━ ━━━━━━━━━ 首 首 The first Function LastDelimiter (Const Delimiters, S: String): Integer; $ [sysutils.PAS function Returns the location of the last separator Description LastDelimiter ('.', 'Kingron.Myetang .com ') = 16 Reference function sysutils.strscan;

Function sysutils.bytepepe example spinedit1.value: = lastdelimiter (edit1.text, edit2.text); ━━━━━━━━━ 首 首━━━━━━━━━━ 首 首━━━━━━━━━ (Const S1, S2 : integer; $ [sysutils.pas function Returns two file name description When S1> S2 return value> 0; when S1

━━━━━━━━━━━━━━━━━━━ 首 首 首 首 首 f f 首 首 首 f f; pchar; $ [sysutils.pas feature returns in pointer string STR search characters The last address of the CHR appears to support multi-byte character systems; Ansistrrscan ('Kingron.Myetang.com', ') =' .com 'refer to function sysutils.ansistrscan example edit2.text: = ANSISTRSTRSTRSTRSTRSCAN (Pchar (pchar (edit1). TEXT), '.'); ━━━━━━━━━ 首 首━━━━━━━━ 首 首 f━━━━ ((str: pchar; chr: char): PCHAR; $ [SYSUTILS.PAS function Returns the address of the first appearance of the pointer string STR search character chR The first appearance is supported by the multi-byte character system; ANSISTRSCAN ('kingron.myetang.com', '.') = '.Myetang.com' Reference function sysutils.strscan example Edit2.text: = ANSISTRSCAN (Pchar (edit1.text), '.'); ━━━━━━━━━ 首 首 首━━━━━━━━ 首 首 f━━━━ (((首 首 首 f━━━ (((((((((((((( : string; Flags: TReplaceFlags): string; the string $ [SysUtils.pas replaced Description returns the entire contents of the replacement rfReplaceAll; rfIgnoreCase ignore the case of the reference function SysUtils.AnsiUpperCase; function SysUtils.AnsiPos; function System.Copy examples // Begin StringReplace Procedure TFORM1.BUTTON1CLICK (Sender: TOBJEC T); begin memo1.lines.values ​​['[]']: = StringReplace (edit1.text, edit2.text, edit3.text, []); memo1.line.values ​​['[RFREPLACEALL]']: = StringReplace (Edit1.text, edit3.text, [rfreplace); memo1.lines.values ​​['[RFIGNORECASE]']: = StringReplace (edit1.text, edit2.text, edit3.text, [rfignoreCase]) Memo1.Lines.Values ​​['[RFREPLACEALL, RFIGNORECASE]']: = StringReplace (edit1.text, edit2.text, edit3.text, [rfreplaceAll, Rfignore]); end; /// end stringReplace ━━━━━━━ ━━━━━ ━━━━━━━ 首━━━━━━ 首 首 f━━━: (const s: string): tguid;

转载请注明原文地址:https://www.9cbs.com/read-111820.html

New Post(0)