mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-28 10:02:14 +00:00
FIX: TrimQuotes function
This commit is contained in:
parent
7e0eb80dec
commit
398ae373f8
1 changed files with 11 additions and 1 deletions
|
|
@ -580,7 +580,17 @@ end;
|
|||
|
||||
function TrimQuotes(const Str: String): String;
|
||||
begin
|
||||
Result:= TrimSet(Str, ['"', '''']);
|
||||
Result:= Str;
|
||||
if (Length(Str) > 0) then
|
||||
begin
|
||||
if (Str[1] in ['"', '''']) then
|
||||
begin
|
||||
if (Length(Str) = 1) then
|
||||
Result:= EmptyStr
|
||||
else if (Str[1] = Str[Length(Str)]) then
|
||||
Result:= Copy(Str, 2, Length(Str) - 2);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function QuoteStr(const Str: String): String;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue