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/FileDialogForm.pas

    r97 r105  
    123123  PmWin,
    124124  SysUtils,
    125   ACLStringUtility,
    126125  FileUtilsUnit,
    127126  ACLDialogs,
     
    131130  SettingsUnit,
    132131  HelpFile,
     132  StringUtilsUnit,
    133133  DebugUnit;
    134134
     
    286286  filename: string;
    287287  ShowList: boolean;
    288   NameAndTitle: string;
     288  tmpNameAndTitle: string;
    289289Begin
    290290  CompletionsListBox.Items.Clear;
     
    295295    for i := 0 to FileListBox.Items.Count - 1 do
    296296    begin
    297       NameAndTitle := FileListBox.Items[ i ];
    298       Filename := ExtractNextValue( NameAndTitle, #9 );
    299 
    300       if StrStarts( search, filename ) then
     297      tmpNameAndTitle := FileListBox.Items[ i ];
     298      Filename := StrLeftUntil(tmpNameAndTitle, [StrTAB]);
     299
     300      if StrStartsWithIgnoringCase(filename, search) then
    301301        CompletionsListBox.Items.Add( filename );
    302302    end;
     
    306306  if CompletionsListBox.Items.Count = 1 then
    307307  begin
    308     if not StringsSame( CompletionsListBox.Items[ 0 ], search ) then
     308    if not StrEqualIgnoringCase(CompletionsListBox.Items[0], search) then
    309309      ShowList := true;
    310310  end
     
    436436    begin
    437437      NameAndTitle := FileListBox.Items[ FileIndex ];
    438       FileNames.Add( ExtractNextValue( NameAndTitle, #9 ) );
     438      FileNames.Add(StrLeftUntil(NameAndTitle, [StrTAB]));
    439439    end;
    440440  end;
     
    471471    begin
    472472      DoErrorDlg( InvalidFilterErrorTitle,
    473                   StrDoubleQuote( FileNameText )
     473                  StrInDoubleQuotes(FileNameText)
    474474                  + InvalidFilterError
    475                   + EndLine
     475                  + StrCRLF
    476476                  + '  \ / :' );
    477477      exit;
     
    611611                               + Filename );
    612612
    613     FileListBox.Items.Add( Filename
    614                            + #9
    615                            + Title );
     613    FileListBox.Items.Add(Filename + StrTAB + Title );
    616614  end;
    617615  FileListBox.Items.EndUpdate;
Note: See TracChangeset for help on using the changeset viewer.