Ignore:
Timestamp:
Apr 5, 2007, 8:34:33 PM (18 years ago)
Author:
RBRi
Message:

%more stringutils refactoring

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NewView/StringUtilsUnit.pas

    r102 r105  
    1313
    1414const
     15  StrTAB = chr(9);
    1516  StrCR = chr(13);
    1617  StrLF = chr(10);
     
    7677  Function StrLeftUntil(const aReceiver: String; const aSetOfChars: TSetOfChars) : String;
    7778
    78   // returns true if the String starts with the provides one
     79  // returns true if the String starts with the provided one
    7980  // this is case SENSITIVE
    8081  Function StrStartsWith(const aReceiver: String; const aStartString: String): Boolean;
    8182
    82   // returns true if the String starts with the provides one
     83  // returns true if the String starts with the provided one
    8384  // this is case INsensitive
    8485  Function StrStartsWithIgnoringCase(const aReceiver: String; const aStartString: String): Boolean;
     
    8889  Function StrEndsWith(const aReceiver: String; const anEndString: String): Boolean;
    8990
    90   // returns true if the String ends with the provides one
     91  // returns true if the String ends with the provided one
    9192  // this is case INsensitive
    9293  Function StrEndsWithIgnoringCase(const aReceiver: String; const anEndString: String): Boolean;
     94
     95  // returns true if the Strings are the same
     96  // this is case INsensitive
     97  Function StrEqualIgnoringCase(const aReceiver: String; const aSecondString: String): Boolean;
    9398
    9499  // the IntToStr generates wrong results
     
    106111
    107112  uses
     113    SysUtils,
    108114    DebugUnit;
    109115
     
    502508
    503509
     510  Function StrEqualIgnoringCase(const aReceiver: String; const aSecondString: String): Boolean;
     511  begin
     512    Result := CompareText(aReceiver, aSecondString) = 0;
     513  end;
     514
     515
    504516  Function LongWordToStr(const aLongWord: LongWord) : String;
    505517  Var
Note: See TracChangeset for help on using the changeset viewer.