1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
|
const SansAccents : array[Char] of Char
= #0#1#2#3#4#5#6#7#8#9#10#11#12#13#14#15 +
#16#17#18#19#20#21#22#23#24#25#26#27#28#29#30#31 +
' !"#$%&''()*+,-./0123456789:;<=>?' +
'@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_'+
'`abcdefghijklmnopqrstuvwxyz{|}~'#127 +
''#129'
S'#141''#143#144's'#157'zY' +
#160'¡¢£¤¥¦§¨©ª«¬*®¯°±²³´µ¶·¸¹º»¼½¾¿' +
'AAAAAAÆCEEEEIIIIDNOOOOOרUUUUYÞß' +
'aaaaaaæceeeeiiiidnooooo÷øuuuuyþy';
function EnleveAccentsPThot2(const AText : String) : string;
var
i:integer;
p:pchar;
begin
Result:=AText;
if Result='' then EXIT; //<<<
p:=@Result[1];
for i:=1 to Length(Result) do begin
p^:=SansAccents[p^];
inc(p);
end;
end; |
Partager