RemObjects Software RemObjects Software

ShineOn

ShineOn Commit Details

Date:2010-10-14 12:42:55 (2 years 7 months ago)
Author:Roman Kassebaum
Commit:163
Parents: 162
Message:New methods BytesOf and StringOf

File differences

trunk/Source/ShineOn.RTL/SysUtils.pas
128128    class function TimeToStr(ATime:TDateTime):String;
129129    class procedure FreeAndNil(var Obj);
130130
131    class function BytesOf(S: String): TBytes;
132    class function StringOf(B: TBytes): String;
133
131134    class function FileAge(const FileName: String; out FileDateTime: TDateTime): Boolean;
132135    class function FileCreate(const FileName: String): TOpenedFile;
133136    class function FileExists(FileName: String): Boolean;
...... 
321324function PathSep: Char; public;
322325function PathSeparator: Char; public;
323326
327function BytesOf(S: String): TBytes; public;
328function StringOf(B: TBytes): String; public;
329
324330function FloatToStr(Value: Extended): String; public;
325331function FloatToStrF(Value: Extended; Format: TFloatFormat; Precision, Digits: Integer): String; public;
326332function FloatToStrF(Value: Extended; Format: TFloatFormat; Precision, Digits: Integer; const FormatSettings: TFormatSettings ): String; public;
...... 
15391545  NotImplemented;
15401546end;
15411547
1548class function SysUtils.BytesOf(S: String): TBytes;
1549begin
1550  Result := TEncoding.Unicode.GetBytes(S);
1551end;
1552
1553class function SysUtils.StringOf(B: TBytes): String;
1554begin
1555  Result := TEncoding.Unicode.GetString(B);
1556end;
1557
15421558// DELPHI COMPATIBLE GLOBAL METHODS
15431559
1560function BytesOf(S: String): TBytes;
1561begin
1562  Result := ShineOn.Rtl.SysUtils.BytesOf(S);
1563end;
1564
1565function StringOf(B: TBytes): String;
1566begin
1567  Result := ShineOn.Rtl.SysUtils.StringOf(B);
1568end;
1569
15441570function FloatToStr(Value: Extended): String;
15451571begin
15461572  result := ShineOn.Rtl.SysUtils.FloatToStr(Value);

Archive Download the corresponding diff file

Revision: 163