You've already forked lazarus-ccr
Object Pascal "record" serialization ( first commit! )
TTest_TIntfPoolItem TTest_TSimpleItemFactory TTest_XmlRpcFormatterExceptionBlock TTest_SoapFormatterExceptionBlock Record serialization test git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@243 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -19,9 +19,6 @@ uses
|
||||
Classes, SysUtils, TypInfo,
|
||||
base_service_intf;
|
||||
|
||||
{$INCLUDE wst.inc}
|
||||
{$INCLUDE wst_delphi.inc}
|
||||
|
||||
Type
|
||||
|
||||
EPropertyManagerException = class(EServiceException)
|
||||
@ -46,15 +43,35 @@ Type
|
||||
End;
|
||||
|
||||
function IsStrEmpty(Const AStr:String):Boolean;
|
||||
function GetToken(var ABuffer : string; const ADelimiter : string): string;
|
||||
function ExtractOptionName(const ACompleteName : string):string;
|
||||
|
||||
implementation
|
||||
uses wst_types;
|
||||
|
||||
function IsStrEmpty(Const AStr:String):Boolean;
|
||||
begin
|
||||
Result := ( Length(Trim(AStr)) = 0 );
|
||||
end;
|
||||
|
||||
function GetToken(var ABuffer : string; const ADelimiter : string): string;
|
||||
var
|
||||
locPos, locOfs, locLen : PtrInt;
|
||||
locStr : string;
|
||||
begin
|
||||
locPos := Pos(ADelimiter, ABuffer);
|
||||
locLen := Length(ADelimiter);
|
||||
locOfs := locLen - 1;
|
||||
if (IsStrEmpty(ABuffer)) or ((locPos = 0) and (Length(ABuffer) > 0)) then begin
|
||||
Result := ABuffer;
|
||||
ABuffer := '';
|
||||
end else begin
|
||||
locStr := Copy(ABuffer, 1, locPos + locOfs);
|
||||
ABuffer := Copy(ABuffer, locPos + locLen, Length(ABuffer));
|
||||
Result := Copy(locStr, 1, Length(locStr) - locLen);
|
||||
end;
|
||||
end;
|
||||
|
||||
function ExtractOptionName(const ACompleteName : string):string;
|
||||
var
|
||||
i, c : Integer;
|
||||
|
Reference in New Issue
Block a user