Delphi delimited string using the function
Here comes Delphi string partition function, used according to your needs. . 1, ExtractStrings function ExtractStrings (Separators, WhiteSpace: TSysCharSet; the Content: the PChar; Strings: of TStrings): Integer; The first parameter is the separator, may be a plurality of, for example, [ ';', ',', ':'] press semicolons, commas, semicolons simultaneously split. The second parameter is the beginning characters are ignored, for example, [ '<', '>', ''], the segmented character, if there is greater than the number at the beginning, is less than the number, or semicolon, is divided out after ignore. The third parameter is a string divided. The fourth parameter returns the number of the divided character string. Note: This function only by dividing a single character, can not be divided by the string. 2, SplitString function SplitString ( const S, the Delimiters: String): TStringDynArray; The first argument is a string divided. The second parameter is the separator, the separator may comprise a plurality of, for example, ';,:' , You can press the semicolon, comma, semicolon at the same time to split. The return value is the result of segmentation. Note: This function is not in the early Delphi, with similar usage ExtractStrings, fewer parameters, use more convenient, to refer to this unit System.StrUtils
Guess you like
Origin www.cnblogs.com/jijm123/p/12310443.html
Recommended
Ranking