Ignore:
Timestamp:
Jul 27, 2009, 3:19:14 PM (15 years ago)
Author:
george
Message:
  • Přidáno: Objektová třída TPoint, TDouble.
Location:
ObjectBaseTypes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • ObjectBaseTypes

    • Property svn:ignore
      •  

        old new  
        33TestApplication.res
        44*.dcu
         5*.~dsk
  • ObjectBaseTypes/UObjectString.pas

    r3 r4  
    44
    55uses
    6   SysUtils, UObjectTypeBase, UObjectBoolean, UObjectInteger;
     6  SysUtils, UObjectTypeBase, UObjectBoolean, UObjectInteger, StrUtils;
    77
    88type
     
    1919    procedure Insert(Index: TInteger; SubString: TString);
    2020    function Pos(SubString: TString): TInteger;
     21    procedure Reverse;
     22    function LeftString(Count: TInteger): TString;
     23    function RightString(Count: TInteger): TString;
    2124  end;
    2225
     
    5356end;
    5457
     58function TString.LeftString(Count: TInteger): TString;
     59begin
     60  Result := TString.Create;
     61  Result.Value := StrUtils.LeftStr(Value, Count.Value);
     62end;
     63
    5564function TString.Length: TInteger;
    5665begin
     
    7079function TString.Pos(SubString: TString): TInteger;
    7180begin
     81  Result := TInteger.Create;
    7282  Result.Value := System.Pos(SubString.Value, Value);
     83end;
     84
     85procedure TString.Reverse;
     86begin
     87  Value := StrUtils.ReverseString(Value);
     88end;
     89
     90function TString.RightString(Count: TInteger): TString;
     91begin
     92  Result := TString.Create;
     93  Result.Value := StrUtils.RightStr(Value, Count.Value);
    7394end;
    7495
Note: See TracChangeset for help on using the changeset viewer.