NormalizePhoneNumber (rtl)
<source lang="delphi">Function NormalizePhoneNumber(const iNumber,iCountryCodeISO:string; iHuman:boolean):string;</source>
Cette fonction normalise un numéro de téléphone suivant le format international.
| Result | Le numéro de téléphone normalisé |
| iNumber | Le numéro à normaliser |
| iCountryCodeISO | Le code ISO du pays (3 ou 2) |
| iHuman | Formate le numéro pour être affiché. |
Exemple
<source lang="delphi">
procedure foo(); begin
....
if Assigned(contact) and (contact.phone<>) then
begin
json.result[indx].t := 'phone';
json.result[indx].v := Format('%s phone :%s',[contact.firstName,NormalizePhoneNumber(contact.phone,inst.countryISO,true)]);
json.result[indx].l := 'l';
json.result[indx].h := 'tel:'+NormalizePhoneNumber(contact.phone,inst.countryISO,false);
indx := indx+1;
end;
...
end; </source>
Voir aussi:
{{#if:Développement DSM|
{{#if:Développement DSM|— Développement DSM |}} — Développement DSM —
|
{{#if:|— [[{{{1}}}]] |}} — Développement DSM —
}}