AnsiCompareStr function comparison string (case sensitive)
AnsicompareText function comparison string (not case sensitive)
AnsilowerCase function converts characters to lowercase
The ANSIUPPERCASE function converts characters to uppercase
DateTimetOfileDate function Convert Delphi's date format to DOS date format
The DateTimetostr function converts the date time format to a string
DateTimetString function converts the date time format to a string
The DateTostr function converts the date format to a string
The FLOATTOSTRF function converts floating point numbers to strings
The FLOATTOSTR function converts floating point numbers to strings
INSERT Insert a subtrunch in a string
The STR function converts the numerical value to a string
The stralloc function assigns the maximum length -1 buffer to the string ended with NULL
The strbufsize function returns the maximum number of characters stored in the character buffer allocated by Stralloc
The STRCAT function attached a string to another string and returned the merged string
Strcomp function compares two strings
The stropy function copies a string to another string
The strdispose function releases strings on the stack
The strecopy function copies a string to another string and returns the pointer of the result string tail.
Strend function returns a pointer to the tail of the string
STRETCH Attributes Automatically Adjusts the Size Strfmt Function of Controls Formatting a Series of Parameters
StriComp function compares two strings (not case sensitive)
The StringTowideChar function converts the ANSI string to a Unicode string
The strlcat function attached the characters in a string to another string and returned the merged string
The strlcomp function compares two strings with maximum length
The strlcopy function copies the characters in a string to another string
Strlen function returns the number of characters in the string
Strlfmt function format a series of parameters, which contain pointers to target buffers.
The strlicomp function compares two strings with maximum length (not case sensitive)
The strlower function converts the characters in the string to lowercase
The strMove function copies the characters in a string to another string.
The STRNEW function allocates a string on the stack
The STRPAS function will convert the string of the string ended with NULL to the string of the Pascal class.
The strpcopy function copies the string of the Pascal class to the string ended with NULL
The STRPLCOPY function is copied from the maximum length string of the Pascal class to the end of NULL.
The STRPOS function returns a string in another string first appearance pointer
STRSCAN function returns a pointer to the last character in the string
STRSCAN function returns a first-character pointer in the string
The Strtodate function converts the string into the date format STRTODATETIME function to convert a string into a date / time format
The StrtOfloat function converts a given string to floating point numbers
The StrtoinT function converts the string to integer
The StrtointDef function converts strings to integer or default values.
The Strtotime function converts the string into time format
The STRUPPER function converts the characters in the string to uppercase
[String function is full]
The first Function AnsireSembleStext (const at youxt, aother: string): boolean;
$ [Strutils.pas
Function returns two strings to be similar
Description 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);
━━━━━━━━━━━━━━━━━━━
The first Function AnsicontAinstext (const attext, asubtext: String): boolean;
$ [Strutils.pas
Function Return Strings ATEXT contains substrings asubtext
Explain that it is not case sensitive
Reference Function Strutils.ansiuppercase; Function Strutils.ansipos
Example checkbox1.checked: = ansicontainstext (edit1.text, edit2.text);
━━━━━━━━━━━━━━━━━━━
The first Function AnsistartStext (const asubtext, attext: string): boolean
$ [Strutils.pas
Function Returns a string ATEXT be started with a child string asubtext
Explain that it is not case sensitive
Reference Function Windows.comPareString
Example Checkbox1.checked: = ansistartstext (edit1.text, edit2.text);
━━━━━━━━━━━━━━━━━━━
The first Function AnsiendStext (const asubtext, attext: string): boolean;
$ [Strutils.pas
Function return string ATEXT End of subquarters asubtext
Explain that it is not case sensitive
Reference Function Windows.comPareString
Example checkbox1.checked: = ansiendstext (edit1.text, edit2.text);
━━━━━━━━━━━━━━━━━━━
The first Function Ansireplacetext (Const AText, AFROMTEXT, Atotext: String): String; $ [Strutils.Pas
Function Returns ATEXT ATEXT Replace with SubtromText Results
Explain that it is not case sensitive
Reference function sysutils.stringReplace; type sysutils.treplaceflags
Example edit4.text: = ANSIREPLACETEXT (Edit1.Text, Edit2.Text, Edit3.Text);
━━━━━━━━━━━━━━━━━━━
First Function AnsimatchText (Const Atext: String; Const Avalues: array of
String): Boolean; $ [strutils.pas
Function Returns the string array Avalues contains a string ATEXT
Explain that it is not case sensitive
Reference Function Strutils.ansiIndexText
Example checkbox1.checked: = ANSIMATCHTEXT (Edit1.Text, ['A1', 'A2', 'A3',
'A4']);
━━━━━━━━━━━━━━━━━━━
The head of Function AnsiIndexText (Const Ate: String; Const Avalues: array of
String): Integer; $ [strutils.pas
Function Returns the location of the string ATEXT in the string array avateues
Explanation is not case sensitive; if it is not included, return -1
Reference Function Sysutils.ansisametext
Example spinedit1.value: = ANSIINDEXTEXT (Edit1.Text, ['A1', 'A2', 'A3', 'A4']);
━━━━━━━━━━━━━━━━━━━
The first Function AnsicontAinsStr (Const AText: String): Boolean;
$ [Strutils.pas
Function Return Strings ATEXT contains substrings asubtext
Explanation of case sensitive
Reference Function Strutils.ansipos
Example Checkbox1.checked: = ansicontainsstr (edit1.text, edit2.text);
━━━━━━━━━━━━━━━━━━━
The first Function AnsistStr (const asubtext, at: string): boolean;
$ [Strutils.pas
Function Returns a string ATEXT be started with a child string asubtext
Explanation of case sensitive
Reference Function Sysutils.ansisameStr
Example CheckBox1.checked: = ansistartsstr (edit1.text, edit2.text);
━━━━━━━━━━━━━━━━━━━
Head Function Ansiendsstr (const asubtext, at: string): boolean
$ [Strutils.pas
Function return string ATEXT End of subquarters asubtext
Explanation of case sensitive
Reference Function Sysutils.ansisameStr
Example checkbox1.checked: = ANSIENDSSTR (Edit1.Text, Edit2.Text);
━━━━━━━━━━━━━━━━━━━
The first Function AnsirePlaceStr (Const AText, AFROMText, Atotext: String): String; $ [Strutils.Pas
Function Returns ATEXT ATEXT Replace with SubtromText Results
Explanation of case sensitive
Reference function sysutils.stringReplace; type sysutils.treplaceflags
Example edit4.text: = ANSIREPLACESTR (Edit1.Text, Edit2.Text, Edit3.Text);
━━━━━━━━━━━━━━━━━━━
Head of Function AnsimatchStr (Const Ate: String; Const Avalues: array of
String): Boolean; $ [strutils.pas
Function Returns the string array Avalues contains a string ATEXT
Explanation of case sensitive
Reference Function Strutils.ansiInDexStr
Example Checkbox1.checked: = ANSIMATCHSTR (Edit1.Text, ['A1', 'A2', 'A3',
'A4']);
━━━━━━━━━━━━━━━━━━━
The head of Function AnsiIndexStr (Const Ate: String; Const Avalues: array of
String): Integer; $ [strutils.pas
Function Returns the location of the string ATEXT in the string array avateues
Explanation of case sensitive
Reference Function Sysutils.ansisameStr
Example spinedit1.value: = ANSIINDEXSTR (Edit1.Text, ['A1', 'A2', 'A3', 'A4']);
━━━━━━━━━━━━━━━━━━━
The headlight dupeString (const: integer): string;
$ [Strutils.pas
Function Returns a string ATEXT ACOUNT copy
Description When ACOUNT is 0, return ''
Reference Function System.setLength
Example edit3.text: = dupeString (Edit1.Text, Spinedit1.Value);
━━━━━━━━━━━━━━━━━━━
The first Function ReverseString (const at: string): String; $ [strutils.pas
Function Returns the reverse order of string ATEXT
Description ReverseString ('1234') = '4321'
Reference Function System.setLength
Example edit3.text: = reverseString (edit1.text);
━━━━━━━━━━━━━━━━━━━
The headlight stuffstring (const at: string; Astart, ALENGTH: Cardinal
Const asubText: string: String; $ [strutils.pas
Function returns a string
Description ASTART: Nested start position; ALENGTH: Nested length; stuffstring ('Abcd', 2, 0, '12') = 'A12BCD'
Reference in function system.copy
Example edit3.text: = stuffstring (edit1.text, spinedit1.value, spinedit2.value, edit2.text);
━━━━━━━━━━━━━━━━━━━
The first Function Randomfrom (Const Avalues): string; Overload;
$ [Strutils.pas
Function Random Returns an element in the array of strings Avalues
Explain Randomize
Reference Function System.random
Example Randomize; edit3.text: = RandomFrom (['A1', 'A2', 'A3', 'A4']);
━━━━━━━━━━━━━━━━━━━
The first Function ifthen (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);
━━━━━━━━━━━━━━━━━━━
The first Function Leftstr (Const ATEXT: STRING; Const Acount: Integer): String;
$ [Strutils.pas
Function Returns the ACOUNT character on the left of the string ATEXT
Description Leftstr ('123456', 3) = '123'
Reference in function system.copy
Example Edit3.Text: = Leftstr (Edit1.Text, Spinedit1.Value);
━━━━━━━━━━━━━━━━━━━
The first Function Rightstr (Const ATEXT: STRING; Const Acount: Integer): String;
$ [Strutils.pas
Function Returns the ACOUNT character on the right side of the string ATEXT
Description RightStr ('123456', 3) = '456'
Reference in function system.copy
Example Edit3.Text: = RightStr (Edit1.Text, Spinedit1.Value);
━━━━━━━━━━━━━━━━━━━
The first Function Midstr (Const ATEXT: STRING; Const Astart, ACOUNT: INTEGER):
String; $ [strutils.pas
Function Returns ATEXT from Astart Account
Explain, it is COPY
Reference in function system.copy
Example edit3.text: = midstr (Edit1.Text, Spinedit1.Value, Spinedit2.Value);
━━━━━━━━━━━━━━━━━━━
The first Function Searchbuf (BUF: PCHAR; BUFLEN: Integer; SELSTART, SELLENGTH:
Integer; searchString: string; options: tstringsearchOptions = [sodown]): PCHAR; $ [strutils.pas
Function Returns the first search pointer position
Description This function is often used in the text search string
Reference
example
/// begin searchbuf
Function Searchedit (EditControl: tcustomed); Const SearchString: String;
SearchOptions: TstringSearchOptions; Findfirst: Boolean = false: boolean;
VAR
Buffer, p: pchar;
Size: Word;
Begin
Result: = FALSE;
IF (length (searchString) = 0).
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 dam
EditControl.selstart: = p - buffer;
EditControl.sellength: = Length (SearchString);
RESULT: = TRUE;
END;
Finally
STRDISPOSE (BUFFER);
END;
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
Hello ') Reference
$ [SYSUTILS.PAS feature release string pointer P Resource Description Mix Function Newstr Using Reference Procedure System.Dispose Example
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 ━━━━━━━━━━━━━━━━━━━ 首 首 首 首 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 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 $ [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 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 // 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 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 ━━━━━━━━━━━━━━━━━━━━ 首 首 首 首 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 ━━━━━━━━━━━ 首━━━━━━━━ 首 首 f 首 f::: (Str: Pchar): Pchar; $ [SYSUTILS.PAS feature Return Point string STR lowercase Description non-uppercase characters do not process Reference ━━━━━━━━━━ 首 首━━━━━━━ 首 首 首 首 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 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 ━━━━━━━━━━━━━━━━━━━━ 首 首 首 首 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 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 $ [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 , 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 $ [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 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 $ [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 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;