param["_nome"]; covertChar = toArray _nome; // Transforma a palavra _nome em um array de numeros { // Variantes com acentos _aA = [225, 224, 227, 226, 228, 229, 257, 259, 261, 193, 192, 195, 194, 196, 197, 256, 258, 260]; _eE = [233, 232, 234, 235, 275, 279, 281, 201, 200, 202, 203, 274, 278, 280]; _iI = [237, 236, 238, 239, 299, 303, 305, 205, 204, 206, 207, 298, 302]; _oO = [243, 242, 245, 244, 246, 333, 337, 248, 211, 210, 213, 212, 214, 332, 336, 216]; _uU = [250, 249, 251, 252, 363, 367, 369, 371, 218, 217, 219, 220, 362, 366, 368, 370]; _cC = [231, 199]; _nN = [241, 209]; _yY = [253, 255, 221, 376]; // Alfabeto normal _all = [97, 65, 98, 66, 99, 67, 100, 68, 101, 69, 102, 70, 103, 71, 104, 72, 105, 73, 106, 74, 107, 75, 108, 76, 109, 77, 110, 78, 111, 79, 112, 80, 113, 81, 114, 82, 115, 83, 116, 84, 117, 85, 118, 86, 119, 87, 120, 88, 121, 89, 122, 90]; if (!(_x in _all)) then { covertChar set [_forEachIndex, 32] // Se nao for do alfabeto coloque espaço "Sd.Pereira" => "Sd Pereira" }; if (_x in _aA) then { covertChar set [_forEachIndex, 97] // Se tiver acento tire-o Letra A "Ã" => "A" }; if (_x in _eE) then { covertChar set [_forEachIndex, 101] // Se tiver acento tire-o Letra E "É" => "E" }; if (_x in _iI) then { covertChar set [_forEachIndex, 105] // Se tiver acento tire-o Letra I "Í" => "I" }; if (_x in _oO) then { covertChar set [_forEachIndex, 111] // Se tiver acento tire-o "Diógenes" => "Diogenes" }; if (_x in _uU) then { covertChar set [_forEachIndex, 117] // Se tiver acento tire-o Letra U "Ú" => "U" }; if (_x in _cC) then { covertChar set [_forEachIndex, 99] // Se tiver acento tire-o Letra C "Ç" => "C" }; if (_x in _nN) then { covertChar set [_forEachIndex, 110] // Se tiver acento tire-o Letra N "Ñ" => "N" }; if (_x in _yY) then { covertChar set [_forEachIndex, 121] // Se tiver acento tire-o Letra Y "Ý" => "Y" }; } forEach covertChar; _nome = toString covertChar; _nome