Split function in Delphi

zhaozj2021-02-16  59

/ / According to strings, split strings, equivalent to the Split function in VB Function Splitstring (const source, ch: string): TstringList; var temp: string; i: integer; begin result: = TSTRINGLIST.CREATE If it is empty self-string, return to the empty list if source = '' TEN EXIT; TEMP: = Source; i: = POS (ch, source); while i <> 0 do begin result.add (Copy (Temp, 0, i -1)); delete (TEMP, 1, I); I: = POS (CH, TEMP); End; Result.Add (TEMP);

Www.sinoprise.com

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

New Post(0)