Skip to content

Commit

Permalink
lowercase compare
Browse files Browse the repository at this point in the history
  • Loading branch information
URUWorks committed Mar 10, 2024
1 parent 9997597 commit 1a5e510
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions TeroSubtitler/src/procConventions.pas
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ TProfiles = class

implementation

uses UWSubtitleAPI.Utils;
uses UWSubtitleAPI.Utils, LazUTF8;

// -----------------------------------------------------------------------------

Expand Down Expand Up @@ -287,13 +287,16 @@ function TProfiles.SaveToFile(const AFileName: String): Boolean;

function TProfiles.AddItem(const AName: String; const ANewSubtitleMs, AMinDuration, AMinDurationPerWord, AMaxDuration, AMaxLines, AMinPause, AMaxCPS, AWPM, ACPL, AShotcutSnapArea, AShotcutThreshold, AShotcutInCues, AShotcutOutCues, AChaining: Cardinal; const APauseInFrames: Boolean; const ARepeatableChars, AProhibitedChars: String; const ADotsOnSplit: Boolean; const ACPSLineLenStrategy: String; const AUpdate: Boolean = False; const AUpdateIndex: Integer = -1): Integer;
var
Item: PProfileItem;
i: Integer;
s : String;
Item : PProfileItem;
i : Integer;
begin
Result := -1;

s := UTF8LowerCase(AName);

for i := 0 to FList.Count-1 do
if FList.Items[i]^.Name = AName then
if UTF8LowerCase(FList.Items[i]^.Name) = s then
if not AUpdate or (i <> AUpdateIndex) then
Exit;

Expand Down

0 comments on commit 1a5e510

Please sign in to comment.