Changeset 87 for branches/DirectWeb/UCommon.pas
- Timestamp:
- Dec 17, 2009, 9:36:15 AM (15 years ago)
- Location:
- branches/DirectWeb
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DirectWeb
- Property svn:ignore
-
old new 3 3 WoWHostingWebServer 4 4 Config.xml 5 Session
-
- Property svn:ignore
-
branches/DirectWeb/UCommon.pas
r82 r87 23 23 function BCDToInt(Value: Byte): Byte; 24 24 function CompareByteArray(Data1, Data2: TArrayOfByte): Boolean; 25 function Explode(Separator: Char; Data: string ): TArrayOfString;25 function Explode(Separator: Char; Data: string; SlicesCount: Integer = -1): TArrayOfString; 26 26 27 27 implementation … … 110 110 end; 111 111 112 function Explode(Separator: char; Data: string ): TArrayOfString;112 function Explode(Separator: char; Data: string; SlicesCount: Integer = -1): TArrayOfString; 113 113 begin 114 114 SetLength(Result, 0); 115 while Pos(Separator, Data) > 0 do begin 115 while (Pos(Separator, Data) > 0) and 116 ((Length(Result) < (SlicesCount - 1)) or (SlicesCount = -1)) do begin 116 117 SetLength(Result, Length(Result) + 1); 117 118 Result[High(Result)] := Copy(Data, 1, Pos(Separator, Data) - 1);
Note:
See TracChangeset
for help on using the changeset viewer.