Browse Source

+ Implemented missing StringReplace function

michael 24 years ago
parent
commit
f412e31618
1 changed files with 8 additions and 5 deletions
  1. 8 5
      rtl/objpas/sysstrh.inc

+ 8 - 5
rtl/objpas/sysstrh.inc

@@ -30,12 +30,15 @@ type
    
    
    { For FloatToText } 
    { For FloatToText } 
    TFloatFormat = (ffGeneral, ffExponent, ffFixed, ffNumber, ffCurrency);
    TFloatFormat = (ffGeneral, ffExponent, ffFixed, ffNumber, ffCurrency);
+   TReplaceFlags = set of (rfReplaceAll, rfIgnoreCase);
    
    
 const
 const
   { For floattodatetime }
   { For floattodatetime }
   MinDateTime: TDateTime = -657434.0;      { 01/01/0100 12:00:00.000 AM }
   MinDateTime: TDateTime = -657434.0;      { 01/01/0100 12:00:00.000 AM }
   MaxDateTime: TDateTime =  2958465.99999; { 12/31/9999 11:59:59.999 PM }
   MaxDateTime: TDateTime =  2958465.99999; { 12/31/9999 11:59:59.999 PM }
        
        
+
+
 function NewStr(const S: string): PString;
 function NewStr(const S: string): PString;
 procedure DisposeStr(S: PString);
 procedure DisposeStr(S: PString);
 procedure AssignStr(var P: PString; const S: string);
 procedure AssignStr(var P: PString; const S: string);
@@ -93,8 +96,8 @@ Function CurrToStr(Value: Currency): string;
 function StrToCurr(const S: string): Currency;
 function StrToCurr(const S: string): Currency;
 function StrToBool(const S: string): Boolean;
 function StrToBool(const S: string): Boolean;
 function BoolToStr(B: Boolean): string;
 function BoolToStr(B: Boolean): string;
-
 function LastDelimiter(const Delimiters, S: string): Integer;
 function LastDelimiter(const Delimiters, S: string): Integer;
+function StringReplace(const S, OldPattern, NewPattern: string;  Flags: TReplaceFlags): string;
 
 
 {==============================================================================}
 {==============================================================================}
 {   extra functions                                                            }
 {   extra functions                                                            }
@@ -106,15 +109,15 @@ function BCDToInt(Value: integer): integer;
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.8  2001-09-20 14:39:43  michael
+  Revision 1.9  2001-09-20 14:42:34  michael
   + Implemented missing StringReplace function
   + Implemented missing StringReplace function
 
 
-  Revision 1.7  2001/09/20 14:38:41  michael
-   Implemented missing StringReplace function
-
   Revision 1.6  2000/12/09 10:39:50  florian
   Revision 1.6  2000/12/09 10:39:50  florian
     * fixed merging problem
     * fixed merging problem
 
 
+  Revision 1.1.2.3  2001/09/20 14:35:34  michael
+   Implemented missing StringReplace function
+
   Revision 1.1.2.2  2000/12/07 21:48:58  michael
   Revision 1.1.2.2  2000/12/07 21:48:58  michael
   + Added LastDelimiter function
   + Added LastDelimiter function