浏览代码

+ Added LastDelimiter function

michael 25 年之前
父节点
当前提交
cf89d21e61
共有 2 个文件被更改,包括 17 次插入2 次删除
  1. 12 1
      rtl/objpas/sysstr.inc
  2. 5 1
      rtl/objpas/sysstrh.inc

+ 12 - 1
rtl/objpas/sysstr.inc

@@ -1161,6 +1161,14 @@ for i := 0 to SizeOf(Value) shr 1 - 1 do begin
    end ;
 end ;
 
+Function LastDelimiter(const Delimiters, S: string): Integer;
+
+begin
+  Result:=Length(S);
+  While (Result>0) and (Pos(S[Result],Delimiters)=0) do 
+    Dec(Result);
+end;
+
 {
    Case Translation Tables
    Can be used in internationalization support.
@@ -1219,7 +1227,10 @@ const
 
 {
   $Log$
-  Revision 1.1.2.3  2000-12-06 22:51:58  michael
+  Revision 1.1.2.4  2000-12-07 21:48:57  michael
+  + Added LastDelimiter function
+
+  Revision 1.1.2.3  2000/12/06 22:51:58  michael
   + Fixed formatting of 0-expanded negative integer
 
   Revision 1.1.2.2  2000/09/30 15:07:41  michael

+ 5 - 1
rtl/objpas/sysstrh.inc

@@ -83,6 +83,7 @@ Function FloatToStrF(Value: Extended; format: TFloatFormat; Precision, Digits: I
 Function FloatToStr(Value: Extended): String;
 Function StrToFloat(Value : String) : Extended;
 Function FloatToText(Buffer: PChar; Value: Extended; format: TFloatFormat; Precision, Digits: Integer): Longint;
+function LastDelimiter(const Delimiters, S: string): Integer;
 
 {==============================================================================}
 {   extra functions                                                            }
@@ -94,7 +95,10 @@ function BCDToInt(Value: integer): integer;
 
 {
   $Log$
-  Revision 1.1.2.1  2000-08-09 19:31:03  peter
+  Revision 1.1.2.2  2000-12-07 21:48:58  michael
+  + Added LastDelimiter function
+
+  Revision 1.1.2.1  2000/08/09 19:31:03  peter
     * int64 updates from Marco
 
   Revision 1.1  2000/07/13 06:31:01  michael