Changeset 4 for ObjectBaseTypes/UObjectString.pas
- Timestamp:
- Jul 27, 2009, 3:19:14 PM (15 years ago)
- Location:
- ObjectBaseTypes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ObjectBaseTypes
- Property svn:ignore
-
old new 3 3 TestApplication.res 4 4 *.dcu 5 *.~dsk
-
- Property svn:ignore
-
ObjectBaseTypes/UObjectString.pas
r3 r4 4 4 5 5 uses 6 SysUtils, UObjectTypeBase, UObjectBoolean, UObjectInteger ;6 SysUtils, UObjectTypeBase, UObjectBoolean, UObjectInteger, StrUtils; 7 7 8 8 type … … 19 19 procedure Insert(Index: TInteger; SubString: TString); 20 20 function Pos(SubString: TString): TInteger; 21 procedure Reverse; 22 function LeftString(Count: TInteger): TString; 23 function RightString(Count: TInteger): TString; 21 24 end; 22 25 … … 53 56 end; 54 57 58 function TString.LeftString(Count: TInteger): TString; 59 begin 60 Result := TString.Create; 61 Result.Value := StrUtils.LeftStr(Value, Count.Value); 62 end; 63 55 64 function TString.Length: TInteger; 56 65 begin … … 70 79 function TString.Pos(SubString: TString): TInteger; 71 80 begin 81 Result := TInteger.Create; 72 82 Result.Value := System.Pos(SubString.Value, Value); 83 end; 84 85 procedure TString.Reverse; 86 begin 87 Value := StrUtils.ReverseString(Value); 88 end; 89 90 function TString.RightString(Count: TInteger): TString; 91 begin 92 Result := TString.Create; 93 Result.Value := StrUtils.RightStr(Value, Count.Value); 73 94 end; 74 95
Note:
See TracChangeset
for help on using the changeset viewer.