mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-13 10:49:17 +02:00
* add missing condition for empty string in Unicode uppercase and lowercase conversion routines
git-svn-id: trunk@29625 -
This commit is contained in:
parent
35a84ab6bd
commit
5a56228011
@ -1221,8 +1221,9 @@ var
|
|||||||
I: cardinal;
|
I: cardinal;
|
||||||
begin
|
begin
|
||||||
SetLength (Result, Length (S));
|
SetLength (Result, Length (S));
|
||||||
for I := 0 to Pred (Length (S)) do
|
if Length (S) > 0 then
|
||||||
PWideChar (Result) [I] := Sys_UniToUpper (S [Succ (I)]);
|
for I := 0 to Pred (Length (S)) do
|
||||||
|
PWideChar (Result) [I] := Sys_UniToUpper (S [Succ (I)]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -1231,8 +1232,9 @@ var
|
|||||||
I: cardinal;
|
I: cardinal;
|
||||||
begin
|
begin
|
||||||
SetLength (Result, Length (S));
|
SetLength (Result, Length (S));
|
||||||
for I := 0 to Pred (Length (S)) do
|
if Length (S) > 0 then
|
||||||
PWideChar (Result) [I] := Sys_UniToLower (S [Succ (I)]);
|
for I := 0 to Pred (Length (S)) do
|
||||||
|
PWideChar (Result) [I] := Sys_UniToLower (S [Succ (I)]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -1242,9 +1244,10 @@ var
|
|||||||
begin
|
begin
|
||||||
Result := S;
|
Result := S;
|
||||||
UniqueString (Result);
|
UniqueString (Result);
|
||||||
for I := 1 to Length (S) do
|
if Length (S) > 0 then
|
||||||
if Result [I] = WNull then
|
for I := 1 to Length (S) do
|
||||||
Result [I] := ' ';
|
if Result [I] = WNull then
|
||||||
|
Result [I] := ' ';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user