The processing of strings is often used in many places. For a string, you can use the following method.
TYPE USERARRY = array of string;
Function TForm1.Split (String; Dot: Char): Userarray; Var Str: Userarray; I, J: Integer; Begin i: = 1; J: = 0; SETLENGTH (STR, 255); While Pos (DOT, s)> 0 Do Begin Str [J]: = COPY (S, I, POS (DOT, S) -i); i: = POS (DOT, S) 1; S [I-1]: = CHR ( ORD (DOT) 1); J: = J 1; End; Str [J]: = COPY (S, I, Strlen (PCHAR (S)) - i 1); Result: = Str; End;
You can transform, let it reach the results you need.