Registriert seit: 28. Feb 2011
Ort: Mannheim
1.384 Beiträge
Delphi 10.4 Sydney
|
Inc(Word(Char))
27. Apr 2015, 09:06
Moin,
geht das bei Unicode?
Delphi-Quellcode:
{$IfDef UniCode}
function LowerCaseEx( const S: string): string; ???
const
CharSet: TSysCharSet = [' A'..' Z', ' Ä', ' Ö', ' Ü'];
var
I: integer;
begin
Result := S;
for I := 1 to Length(Result) do
if CharInSet(Result[I], CharSet) then
Inc(Word(Result[I]), 32);
end;
{$Else}
function LowerCaseEx( const S: string): string;
var
I: integer;
begin
Result := S;
for I := 1 to Length(Result) do
if Result[I] in [' A'..' Z', ' Ä', ' Ö', ' Ü'] then
Inc(Byte(Result[I]), 32);
end;
{$EndIf}
|
|
Zitat
|