Подпрограмма: RusToEng — замена символов с русского на английский.Программный код на Delphi.
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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
function RusToEng(Text: string): string; var i:integer; begin for i:=1 to Length(text)*3 do begin if copy(text,i,1)='а' then begin delete(text,i,1); insert('f',text,i); end; if copy(text,i,1)='б' then begin delete(text,i,1); insert(',',text,i); end; if copy(text,i,1)='в' then begin delete(text,i,1); insert('d',text,i); end; if copy(text,i,1)='г' then begin delete(text,i,1); insert('u',text,i); end; if copy(text,i,1)='д' then begin delete(text,i,1); insert('l',text,i); end; if copy(text,i,1)='е' then begin delete(text,i,1); insert('t',text,i); end; if copy(text,i,1)='ё' then begin delete(text,i,1); insert('`',text,i); end; if copy(text,i,1)='ж' then begin delete(text,i,1); insert(';',text,i); end; if copy(text,i,1)='з' then begin delete(text,i,1); insert('p',text,i); end; if copy(text,i,1)='и' then begin delete(text,i,1); insert('b',text,i); end; if copy(text,i,1)='й' then begin delete(text,i,1); insert('q',text,i); end; if copy(text,i,1)='к' then begin delete(text,i,1); insert('r',text,i); end; if copy(text,i,1)='л' then begin delete(text,i,1); insert('k',text,i); end; if copy(text,i,1)='м' then begin delete(text,i,1); insert('v',text,i); end; if copy(text,i,1)='н' then begin delete(text,i,1); insert('y',text,i); end; if copy(text,i,1)='о' then begin delete(text,i,1); insert('j',text,i); end; if copy(text,i,1)='п' then begin delete(text,i,1); insert('g',text,i); end; if copy(text,i,1)='р' then begin delete(text,i,1); insert('h',text,i); end; if copy(text,i,1)='с' then begin delete(text,i,1); insert('c',text,i); end; if copy(text,i,1)='т' then begin delete(text,i,1); insert('n',text,i); end; if copy(text,i,1)='у' then begin delete(text,i,1); insert('e',text,i); end; if copy(text,i,1)='ф' then begin delete(text,i,1); insert('a',text,i); end; if copy(text,i,1)='х' then begin delete(text,i,1); insert('[',text,i); end; if copy(text,i,1)='ц' then begin delete(text,i,1); insert('w',text,i); end; if copy(text,i,1)='ч' then begin delete(text,i,1); insert('x',text,i); end; if copy(text,i,1)='ш' then begin delete(text,i,1); insert('i',text,i); end; if copy(text,i,1)='щ' then begin delete(text,i,1); insert('o',text,i); end; if copy(text,i,1)='ъ' then begin delete(text,i,1); insert(']',text,i); end; if copy(text,i,1)='ы' then begin delete(text,i,1); insert('s',text,i); end; if copy(text,i,1)='ь' then begin delete(text,i,1); insert('m',text,i); end; if copy(text,i,1)='э' then begin delete(text,i,1); insert('''',text,i); end; if copy(text,i,1)='ю' then begin delete(text,i,1); insert('.',text,i); end; if copy(text,i,1)='я' then begin delete(text,i,1); insert('z',text,i); end; if copy(text,i,1)='А' then begin delete(text,i,1); insert('F',text,i); end; if copy(text,i,1)='Б' then begin delete(text,i,1); insert(',',text,i); end; if copy(text,i,1)='В' then begin delete(text,i,1); insert('D',text,i); end; if copy(text,i,1)='Г' then begin delete(text,i,1); insert('U',text,i); end; if copy(text,i,1)='Д' then begin delete(text,i,1); insert('L',text,i); end; if copy(text,i,1)='Е' then begin delete(text,i,1); insert('T',text,i); end; if copy(text,i,1)='Ё' then begin delete(text,i,1); insert('`',text,i); end; if copy(text,i,1)='Ж' then begin delete(text,i,1); insert(';',text,i); end; if copy(text,i,1)='З' then begin delete(text,i,1); insert('P',text,i); end; if copy(text,i,1)='И' then begin delete(text,i,1); insert('B',text,i); end; if copy(text,i,1)='Й' then begin delete(text,i,1); insert('Q',text,i); end; if copy(text,i,1)='К' then begin delete(text,i,1); insert('R',text,i); end; if copy(text,i,1)='Л' then begin delete(text,i,1); insert('K',text,i); end; if copy(text,i,1)='М' then begin delete(text,i,1); insert('V',text,i); end; if copy(text,i,1)='Н' then begin delete(text,i,1); insert('Y',text,i); end; if copy(text,i,1)='О' then begin delete(text,i,1); insert('J',text,i); end; if copy(text,i,1)='П' then begin delete(text,i,1); insert('G',text,i); end; if copy(text,i,1)='Р' then begin delete(text,i,1); insert('H',text,i); end; if copy(text,i,1)='С' then begin delete(text,i,1); insert('C',text,i); end; if copy(text,i,1)='Т' then begin delete(text,i,1); insert('N',text,i); end; if copy(text,i,1)='У' then begin delete(text,i,1); insert('E',text,i); end; if copy(text,i,1)='Ф' then begin delete(text,i,1); insert('A',text,i); end; if copy(text,i,1)='Х' then begin delete(text,i,1); insert('[',text,i); end; if copy(text,i,1)='Ц' then begin delete(text,i,1); insert('W',text,i); end; if copy(text,i,1)='Ч' then begin delete(text,i,1); insert('X',text,i); end; if copy(text,i,1)='Ш' then begin delete(text,i,1); insert('I',text,i); end; if copy(text,i,1)='Щ' then begin delete(text,i,1); insert('O',text,i); end; if copy(text,i,1)='Ъ' then begin delete(text,i,1); insert(']',text,i); end; if copy(text,i,1)='Ы' then begin delete(text,i,1); insert('S',text,i); end; if copy(text,i,1)='Ь' then begin delete(text,i,1); insert('M',text,i); end; if copy(text,i,1)='Э' then begin delete(text,i,1); insert('''',text,i); end; if copy(text,i,1)='Ю' then begin delete(text,i,1); insert('.',text,i); end; if copy(text,i,1)='Я' then begin delete(text,i,1); insert('Z',text,i); end; end; result:=Text; end; |