|
@@ -1,3 +1,4 @@
|
|
|
+{%MainUnit sysutils.pp}
|
|
|
{ TGenericStringBuilder }
|
|
|
|
|
|
constructor TGenericStringBuilder.Create;
|
|
@@ -218,6 +219,29 @@ begin
|
|
|
Result:=Self;
|
|
|
end;
|
|
|
|
|
|
+{$IFDEF SBUNICODE}
|
|
|
+function TGenericStringBuilder.Append(const AValue: AnsiChar): TGenericStringBuilder;
|
|
|
+begin
|
|
|
+ DoAppend(WideChar(AValue));
|
|
|
+ Result:=Self;
|
|
|
+end;
|
|
|
+{$ELSE}
|
|
|
+function TGenericStringBuilder.Append(const AValue: WideChar): TGenericStringBuilder;
|
|
|
+begin
|
|
|
+ // We don't know what the target encoding is ?
|
|
|
+ DoAppend(AnsiChar(AValue));
|
|
|
+ Result:=Self;
|
|
|
+end;
|
|
|
+
|
|
|
+function TGenericStringBuilder.Append(const AValue: UnicodeString): TGenericStringBuilder;
|
|
|
+begin
|
|
|
+ // We don't know what the target encoding is ?
|
|
|
+ DoAppend(AnsiString(AValue));
|
|
|
+ Result:=Self;
|
|
|
+end;
|
|
|
+
|
|
|
+{$ENDIF}
|
|
|
+
|
|
|
function TGenericStringBuilder.Append(const AValue: Currency): TGenericStringBuilder;
|
|
|
begin
|
|
|
DoAppend(CurrToStr(AValue));
|
|
@@ -630,7 +654,12 @@ begin
|
|
|
end;
|
|
|
|
|
|
|
|
|
+{$IFDEF UNICODERTL}
|
|
|
+function TGenericStringBuilder.ToString: RTLString;
|
|
|
+{$ELSE}
|
|
|
function TGenericStringBuilder.ToString: SBString;
|
|
|
+{$ENDIF}
|
|
|
+
|
|
|
begin
|
|
|
Result:=ToString(0,Length);
|
|
|
end;
|