(Delphi DLL) Remove Accent Marks from Chars in String
Removes the accent marks from Latin and Central European chars in a string.
Note: The RemoveAccents method was added in Chilkat v9.5.0.91. This example requires Chilkat v9.5.0.91 or greater.
uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, StringBuilder;
...
procedure TForm1.Button1Click(Sender: TObject);
var
s: PWideChar;
sb: HCkStringBuilder;
success: Boolean;
begin
s := 'Números para Mí (Student Edition, Spanish)';
sb := CkStringBuilder_Create();
success := CkStringBuilder_Append(sb,s);
CkStringBuilder_RemoveAccents(sb);
Memo1.Lines.Add(CkStringBuilder__getAsString(sb));
// Output:
// Numeros para Mi (Student Edition, Spanish)
CkStringBuilder_Dispose(sb);
end;
|