Retira Acentos De Strings

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Retira Acentos De Strings as PDF for free.

More details

  • Words: 277
  • Pages: 2
removendo caracteres com acento... esta fun��o pega um string informada como par�metro e retira todas as letras acentuadas substituindo-as por letras correspondentes sem acento. ideal para validar nomes de usu�rios, por exemplo... function ansitoascii ( str: string ): string; var i: integer; begin for i := 1 to length ( str ) do case str[i] of '�': str[i] := 'a'; '�': str[i] := 'e'; '�': str[i] := 'i'; '�': str[i] := 'o'; '�': str[i] := 'u'; '�': str[i] := 'a'; '�': str[i] := 'e'; '�': str[i] := 'i'; '�': str[i] := 'o'; '�': str[i] := 'u'; '�': str[i] := 'a'; '�': str[i] := 'e'; '�': str[i] := 'i'; '�': str[i] := 'o'; '�': str[i] := 'u'; '�': str[i] := 'a'; '�': str[i] := 'e'; '�': str[i] := 'i'; '�': str[i] := 'o'; '�': str[i] := 'u'; '�': str[i] := 'a'; '�': str[i] := 'o'; '�': str[i] := 'n'; '�': str[i] := 'c'; '�': str[i] := 'a'; '�': str[i] := 'e'; '�': str[i] := 'i'; '�': str[i] := 'o'; '�': str[i] := 'u'; '�': str[i] := 'a'; '�': str[i] := 'e'; '�': str[i] := 'i'; '�': str[i] := 'o'; '�': str[i] := 'u'; '�': str[i] := 'a'; '�': str[i] := 'e'; '�': str[i] := 'i'; '�': str[i] := 'o'; '�': str[i] := 'u'; '�': str[i] := 'a'; '�': str[i] := 'e'; '�': str[i] := 'i'; '�': str[i] := 'o'; '�': str[i] := 'u'; '�': str[i] := 'a'; '�': str[i] := 'o';

'�': str[i] := 'n'; '�': str[i] := 'c'; end; result := str; end;

um exemplo de como cham�-la: procedure tform1.button1click(sender: tobject); begin edit1.text := ansitoascii(edit1.text); end; nesse caso, eliminaria os acentos do campo edit1 marcos elias www.mep.rg3.net

Related Documents

Retira Acentos De Strings
November 2019 17
Acentos
May 2020 9
Strings
April 2020 19
Strings
May 2020 23
Repaso Acentos
June 2020 7
Strings
November 2019 20