Browse Source

+ Added setstring for Delphi compatibility

michael 26 years ago
parent
commit
5b750c0345
2 changed files with 15 additions and 2 deletions
  1. 10 1
      rtl/inc/sstrings.inc
  2. 5 1
      rtl/inc/systemh.inc

+ 10 - 1
rtl/inc/sstrings.inc

@@ -968,10 +968,19 @@ begin
 end;
 {$endif SUPPORT_FIXED}
 
+Procedure SetString (Var S : Shortstring; Buf : PChar; Len : Longint);
+
+begin
+  Move (Buf[0],S[1],Len);
+  S[0]:=chr(len);
+end;
 
 {
   $Log$
-  Revision 1.19  1999-01-25 20:24:28  peter
+  Revision 1.20  1999-03-03 15:23:57  michael
+  + Added setstring for Delphi compatibility
+
+  Revision 1.19  1999/01/25 20:24:28  peter
     * fixed insert to support again the max string length
 
   Revision 1.18  1999/01/11 19:26:55  jonas

+ 5 - 1
rtl/inc/systemh.inc

@@ -195,6 +195,7 @@ Procedure Insert(source:Char;Var s:shortstring;index:StrLenInt);
 Function  Pos(const substr:shortstring;const s:shortstring):StrLenInt;
 Function  Pos(C:Char;const s:shortstring):StrLenInt;
 Procedure SetLength(var s:shortstring;len:StrLenInt);
+Procedure SetString (Var S : Shortstring; Buf : PChar; Len : Longint);
 Function  Length(s:string):byte;
 
 { Char functions to overcome overloading problem with ansistrings }
@@ -434,7 +435,10 @@ const
 
 {
   $Log$
-  Revision 1.50  1999-02-01 00:05:16  florian
+  Revision 1.51  1999-03-03 15:23:58  michael
+  + Added setstring for Delphi compatibility
+
+  Revision 1.50  1999/02/01 00:05:16  florian
     + functions lo/hi for DWord type implemented
 
   Revision 1.49  1999/01/29 09:23:10  pierre