Subversion Repositories oidplus

Rev

Rev 748 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 748 Rev 992
Line 1... Line 1...
1
unit STRLIST;
1
unit STRLIST;
2
 
2
 
3
(************************************************)
3
(************************************************)
4
(* STRLIST.PAS                                  *)
4
(* STRLIST.PAS                                  *)
5
(* Author:   Daniel Marschall                   *)
5
(* Author:   Daniel Marschall                   *)
6
(* Revision: 2022-02-19                         *)
6
(* Revision: 2022-10-10                         *)
7
(* License:  Apache 2.0                         *)
7
(* License:  Apache 2.0                         *)
8
(* This file contains:                          *)
8
(* This file contains:                          *)
9
(* - StringList implementation for Turbo Pascal *)
9
(* - StringList implementation for Turbo Pascal *)
10
(************************************************)
10
(************************************************)
11
 
11
 
Line 268... Line 268...
268
 
268
 
269
procedure SplitStrToList(str: string; list: PStringList; separator: string);
269
procedure SplitStrToList(str: string; list: PStringList; separator: string);
270
var
270
var
271
  p: integer;
271
  p: integer;
272
begin
272
begin
273
  str := str + separator;
-
 
274
  repeat
273
  repeat
275
    p := Pos(separator, str);
274
    p := Pos(separator, str);
-
 
275
    if p = 0 then
-
 
276
    begin
-
 
277
      ListAppend(list, str);
-
 
278
      Exit;
-
 
279
    end
-
 
280
    else
-
 
281
    begin
276
    ListAppend(list, Copy(str, 1, p-1));
282
      ListAppend(list, Copy(str, 1, p-1));
277
    str := copy(str, p+Length(separator), Length(str)-p);
283
      str := copy(str, p+Length(separator), Length(str)-p);
-
 
284
    end;
278
  until str = '';
285
  until str = '';
279
end;
286
end;
280
 
287
 
281
procedure OIDtoArcList(oid: string; list: PStringList);
288
procedure OIDtoArcList(oid: string; list: PStringList);
282
begin
289
begin