Changeset 44 for trunk/UCore.pas
- Timestamp:
- Dec 4, 2010, 6:41:05 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UCore.pas
r27 r44 8 8 USqlDatabase, Classes, SysUtils, StrUtils; 9 9 10 type11 TArrayOfString = array of string;12 13 10 function NavigationLink(URL: string): string; 14 11 function MakeLink(Text, URL: string): string; … … 18 15 function ShowHeader(Title, Path: string): string; 19 16 function ShowFooter: string; 20 function Explode(Separator: Char; Data: string): TArrayOfString;21 17 function HumanDate(Date: TDateTime): string; 22 18 function PagesList(URL: string; Page, TotalCount, CountPerPage: Integer): string; 23 function StrRepeat(Data: string; Count: Integer): string;24 19 25 20 implementation … … 63 58 //ShowArray($GLOBALS); 64 59 Result := Result + '</body></html>'; 65 end;66 67 function Explode(Separator: Char; Data: string): TArrayOfString;68 begin69 SetLength(Result, 0);70 while Pos(Separator, Data) > 0 do begin71 SetLength(Result, Length(Result) + 1);72 Result[High(Result)] := Copy(Data, 1, Pos(Separator, Data) - 1);73 Delete(Data, 1, Pos(Separator, Data));74 end;75 SetLength(Result, Length(Result) + 1);76 Result[High(Result)] := Data;77 60 end; 78 61 … … 153 136 end; 154 137 155 function StrRepeat(Data: string; Count: Integer): string;156 var157 I: Integer;158 begin159 Result := '';160 for I := 1 to Count do161 Result := Result + Data;162 end;163 164 138 165 139 initialization
Note:
See TracChangeset
for help on using the changeset viewer.